[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a006046 -id:a006046
     Sort: relevance | references | number | modified | created      Format: long | short | data
Values of n such that A006046(n)/n^theta, where theta=log(3)/log(2), is a local minimum, computed according to Harborth's recurrence.
+20
10
1, 3, 5, 11, 21, 43, 87, 173, 347, 693, 1387, 2775, 5549, 11099, 22197, 44395, 88789, 177579, 355159, 710317, 1420635, 2841269, 5682539, 11365079, 22730157, 45460315, 90920629, 181841259, 363682519, 727365037, 1454730075
OFFSET
1,2
COMMENTS
Harborth's recurrence can miss local minima that are 2 less than values in this sequence. A complete listing of cumulative minima is given by A084230.
LINKS
H. Harborth, Number of Odd Binomial Coefficients, Proc. Amer. Math. Soc. 62, 19-22, 1977.
Eric Weisstein's World of Mathematics, Stolarsky-Harborth Constant
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Eric W. Weisstein, Nov 05 2002
STATUS
approved
Cumulative minima of A006046(n)/n^theta, where theta=log(3)/log(2), is a local minimum.
+20
8
1, 3, 5, 11, 21, 43, 87, 171, 173, 347, 693, 1387, 2775, 5547, 5549, 11099, 22197, 44395, 88789, 177579, 355159, 710315, 710317, 1420635, 2841269, 5682539, 11365079, 22730155, 22730157, 45460315, 90920629, 181841259, 363682519
OFFSET
1,2
COMMENTS
Includes terms missed by Horbarth's recurrence.
LINKS
H. Harborth, Number of Odd Binomial Coefficients, Proc. Amer. Math. Soc. 62, 19-22, 1977.
Eric Weisstein's World of Mathematics, Stolarsky-Harborth Constant
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Eric W. Weisstein, May 20 2003
STATUS
approved
a(n) = 2*A006046(n) + 1.
+20
4
1, 3, 7, 11, 19, 23, 31, 39, 55, 59, 67, 75, 91, 99, 115, 131, 163, 167, 175, 183, 199, 207, 223, 239, 271, 279, 295, 311, 343, 359, 391, 423, 487, 491, 499, 507, 523, 531, 547, 563, 595, 603, 619, 635, 667, 683, 715, 747, 811, 819, 835, 851, 883, 899, 931, 963
OFFSET
0,2
COMMENTS
The number of edges in A080973-trees.
Conjectured partial sums of A131136. - Sean A. Irvine, Jun 25 2022
LINKS
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 6, 30.
MATHEMATICA
Map[2 # + 1 &, {0}~Join~Accumulate@ Map[Count[#, _?OddQ] &, Table[Binomial[n, k], {n, 0, 54}, {k, 0, n}]]] (* Michael De Vlieger, Oct 30 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 02 2003
STATUS
approved
a(n) = A006046(A077465(n)).
+20
3
1, 5, 11, 37, 103, 317, 967, 2869, 8639, 25853, 77623, 232997, 698735, 2096461, 6288871, 18867125, 56600351, 169802077, 509408279, 1528220741, 4584666319, 13753990765, 41261980487, 123785957845, 371357840767, 1114073555069
OFFSET
1,2
LINKS
H. Harborth, Number of Odd Binomial Coefficients, Proc. Amer. Math. Soc. 62, 19-22, 1977.
Eric Weisstein's World of Mathematics, Stolarsky-Harborth Constant
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Eric W. Weisstein, Nov 05 2002
STATUS
approved
a(n) = b(n+2) + b(n), where b(n) = A006046(n) is the sequence defined by b(0)=0, b(1)=1, b(n) = 2*b((n-1)/2) + b((n+1)/2) for n =3,5,7,... and b(n) = 3*b(n/2) for n =2,4,6,....
+20
1
3, 6, 12, 16, 24, 30, 42, 48, 60, 66, 78, 86, 102, 114, 138, 148, 168, 174, 186, 194, 210, 222, 246, 258, 282, 294, 318, 334, 366, 390, 438, 456, 492, 498, 510, 518, 534, 546, 570, 582, 606, 618, 642, 658, 690, 714, 762, 782, 822, 834, 858, 874, 906, 930, 978
OFFSET
0,1
COMMENTS
A similar definition applied to the Fibonacci sequence (A000045) leads to the Lucas sequence (A000032). b(n) in the definition is also the number of odd entries in the first n rows of the Pascal triangle.
LINKS
FORMULA
a(n) = A006046(n+2) + A006046(n) for n>=1.
MAPLE
b:=proc(n) option remember: if n = 0 then 0 elif n=1 then 1 elif n mod 2 = 0 then 3*b(n/2) else 2*b((n-1)/2)+b((n+1)/2) fi end: a:=n->b(n+2)+b(n): seq(a(n), n=0..60);
MATHEMATICA
b[0] := 0 b[1] := 1; b[n_?EvenQ] := b[n] = 3*b[n/2]; b[n_?OddQ] := b[n] = 2*b[(n - 1)/2] + b[(n + 1)/2]; L[0] = 1; L[n_] := L[n] = b[n - 1] + b[n + 1]; Table[L[n], {n, 1, 200}]
CROSSREFS
Cf. A006046.
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 27 2006
EXTENSIONS
Edited by N. J. A. Sloane, Apr 15 2006
STATUS
approved
a(n) = (n+1)^2 - A006046(n+1).
+20
1
0, 1, 4, 7, 14, 21, 30, 37, 52, 67, 84, 99, 120, 139, 160, 175, 206, 237, 270, 301, 338, 373, 410, 441, 486, 529, 574, 613, 662, 705, 750, 781, 844, 907, 972, 1035, 1104, 1171, 1240, 1303, 1380, 1455, 1532, 1603, 1684, 1759, 1836, 1899, 1992, 2083, 2176, 2263
OFFSET
0,3
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..10000 (a(0..999) from Robert Price)
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, pp. 6, 30.
MATHEMATICA
Table[(n+1)^2 -Sum[Sum[Mod[Binomial[m, k], 2], {k, 0, m}], {m, 0, n}], {n, 0, 60}]
a[0] = 0; a[1] = 1; a[n_] := a[n] = 2 a[Floor[#]] + a[Ceiling[#]] &[n/2]; Array[(# + 1)^2 - a[# + 1] &, 52, 0] (* Michael De Vlieger, Nov 01 2022 *)
PROG
(PARI) {a(n) = (n+1)^2 - sum(m=0, n, sum(k=0, m, binomial(m, k)%2))};
for(n=0, 60, print1(a(n), ", ")) \\ G. C. Greubel, Apr 11 2019
(Magma) [(n+1)^2 - (&+[ (&+[ Binomial(m, k) mod 2: k in [0..m]]): m in [0..n]]): n in [0..60]]; // G. C. Greubel, Apr 11 2019
(Sage) [(n+1)^2 - sum(sum(binomial(m, k)%2 for k in (0..m)) for m in (0..n)) for n in (0..60)] # G. C. Greubel, Apr 11 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Dec 07 2009
EXTENSIONS
Edited by G. C. Greubel, Apr 11 2019
Definition corrected by Georg Fischer, Jun 21 2020
STATUS
approved
a(0)=0; for n >= 1, a(n) = f(n) - 2*f(floor((n-1)/2)), where f(n) = A006046(n).
+20
1
0, 1, 3, 3, 7, 5, 9, 9, 17, 11, 15, 15, 23, 19, 27, 27, 43, 29, 33, 33, 41, 37, 45, 45, 61, 49, 57, 57, 73, 65, 81, 81, 113, 83, 87, 87, 95, 91, 99, 99, 115, 103, 111, 111, 127, 119, 135, 135, 167, 139, 147, 147, 163, 155, 171, 171, 203, 179, 195, 195, 227, 211, 243, 243, 307, 245, 249, 249, 257
OFFSET
0,3
COMMENTS
For n >= 1, a(n) is the number of ON cells in the n-th generation of the 2-D Mitra-Kumar cellular automaton defined as follows. The state of a cell depends on the states of its NW and NE neighbors at the previous generation.
An ON cell remains ON iff 0 or 2 of its neighbors were ON, and an OFF cell turns ON iff exactly one of its neighbors was ON.
REFERENCES
Sugata Mitra and Sujai Kumar. "Fractal replication in time-manipulated one-dimensional cellular automata." Complex Systems, 16.3 (2006): 191-207. See Fig. 16.
EXAMPLE
The first few generations of the automaton are:
X 0X0 00X00 000X000 0000X0000
X0X 00000 0000000 000000000
X000X 0X000X0 00X000X00
X0X0X0X 000000000
X0000000X
The rows are a subset of the rows of Pascal's triangle A007318 read mod 2 (see A006943). The binary weights of these rows are given by A001316, whose partial sums are A006046, and the formula in the definition follows easily from this.
MAPLE
f:=proc(n) option remember; # A006046
if n <= 1 then n elif n mod 2 = 0 then 3*f(n/2)
else 2*f((n-1)/2)+f((n+1)/2); fi; end;
g:=n->f(n)-2*f(floor((n-1)/2));
[0, seq(g(n), n=1..130)];
PROG
(Haskell)
a245550 n = a245550_list !! n
a245550_list = 0 : zipWith (-) (tail a006046_list) (h a006046_list)
where h (x:xs) = (2 * x) : (2 * x) : h xs
-- Reinhard Zumkeller, Jul 29 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 29 2014
STATUS
approved
Gould's sequence: a(n) = Sum_{k=0..n} (binomial(n,k) mod 2); number of odd entries in row n of Pascal's triangle (A007318); a(n) = 2^A000120(n).
(Formerly M0297 N0109)
+10
199
1, 2, 2, 4, 2, 4, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32
OFFSET
0,2
COMMENTS
Also called Dress's sequence.
This sequence might be better called Glaisher's sequence, since James Glaisher showed that odd binomial coefficients are counted by 2^A000120(n) in 1899. - Eric Rowland, Mar 17 2017 [However, the name "Gould's sequence" is deeply entrenched in the literature. - N. J. A. Sloane, Mar 17 2017] [Named after the American mathematician Henry Wadsworth Gould (b. 1928). - Amiram Eldar, Jun 19 2021]
All terms are powers of 2. The first occurrence of 2^k is at n = 2^k - 1; e.g., the first occurrence of 16 is at n = 15. - Robert G. Wilson v, Dec 06 2000
a(n) is the highest power of 2 dividing binomial(2n,n) = A000984(n). - Benoit Cloitre, Jan 23 2002
Also number of 1's in n-th row of triangle in A070886. - Hans Havermann, May 26 2002. Equivalently, number of live cells in generation n of a one-dimensional cellular automaton, Rule 90, starting with a single live cell. - Ben Branman, Feb 28 2009. Ditto for Rule 18. - N. J. A. Sloane, Aug 09 2014. This is also the odd-rule cellular automaton defined by OddRule 003 (see Ekhad-Sloane-Zeilberger "Odd-Rule Cellular Automata on the Square Grid" link). - N. J. A. Sloane, Feb 25 2015
Also number of numbers k, 0<=k<=n, such that (k OR n) = n (bitwise logical OR): a(n) = #{k : T(n,k)=n, 0<=k<=n}, where T is defined as in A080098. - Reinhard Zumkeller, Jan 28 2003
To construct the sequence, start with 1 and use the rule: If k >= 0 and a(0),a(1),...,a(2^k-1) are the first 2^k terms, then the next 2^k terms are 2*a(0),2*a(1),...,2*a(2^k-1). - Benoit Cloitre, Jan 30 2003
Also, numerator((2^k)/k!). - Mohammed Bouayoun (mohammed.bouayoun(AT)sanef.com), Mar 03 2004
The odd entries in Pascal's triangle form the Sierpiński Gasket (a fractal). - Amarnath Murthy, Nov 20 2004
Row sums of Sierpiński's Gasket A047999. - Johannes W. Meijer, Jun 05 2011
Fixed point of the morphism "1" -> "1,2", "2" -> "2,4", "4" -> "4,8", ..., "2^k" -> "2^k,2^(k+1)", ... starting with a(0) = 1; 1 -> 12 -> 1224 -> = 12242448 -> 122424482448488(16) -> ... . - Philippe Deléham, Jun 18 2005
a(n) = number of 1's of stage n of the one-dimensional cellular automaton with Rule 90. - Andras Erszegi (erszegi.andras(AT)chello.hu), Apr 01 2006
a(33)..a(63) = A117973(1)..A117973(31). - Stephen Crowley, Mar 21 2007
Or the number of solutions of the equation: A000120(x) + A000120(n-x) = A000120(n). - Vladimir Shevelev, Jul 19 2009
For positive n, a(n) equals the denominator of the permanent of the n X n matrix consisting entirely of (1/2)'s. - John M. Campbell, May 26 2011
Companions to A001316 are A048896, A105321, A117973, A151930 and A191488. They all have the same structure. We observe that for all these sequences a((2*n+1)*2^p-1) = C(p)*A001316(n), p >= 0. If C(p) = 2^p then a(n) = A001316(n), if C(p) = 1 then a(n) = A048896(n), if C(p) = 2^p+2 then a(n) = A105321(n+1), if C(p) = 2^(p+1) then a(n) = A117973(n), if C(p) = 2^p-2 then a(n) = (-1)*A151930(n) and if C(p) = 2^(p+1)+2 then a(n) = A191488(n). Furthermore for all a(2^p - 1) = C(p). - Johannes W. Meijer, Jun 05 2011
a(n) = number of zeros in n-th row of A219463 = number of ones in n-th row of A047999. - Reinhard Zumkeller, Nov 30 2012
This is the Run Length Transform of S(n) = {1,2,4,8,16,...} (cf. A000079). The Run Length Transform of a sequence {S(n), n>=0} is defined to be the sequence {T(n), n>=0} given by T(n) = Product_i S(i), where i runs through the lengths of runs of 1's in the binary expansion of n. E.g., 19 is 10011 in binary, which has two runs of 1's, of lengths 1 and 2. So T(19) = S(1)*S(2). T(0)=1 (the empty product). - N. J. A. Sloane, Sep 05 2014
A105321(n+1) = a(n+1) + a(n). - Reinhard Zumkeller, Nov 14 2014
a(n) = A261363(n,n) = number of distinct terms in row n of A261363 = number of odd terms in row n+1 of A261363. - Reinhard Zumkeller, Aug 16 2015
From Gary W. Adamson, Aug 26 2016: (Start)
A production matrix for the sequence is lim_{k->infinity} M^k, the left-shifted vector of M:
1, 0, 0, 0, 0, ...
2, 0, 0, 0, 0, ...
0, 1, 0, 0, 0, ...
0, 2, 0, 0, 0, ...
0, 0, 1, 0, 0, ...
0, 0, 2, 0, 0, ...
0, 0, 0, 1, 0, ...
...
The result is equivalent to the g.f. of Apr 06 2003: Product_{k>=0} (1 + 2*z^(2^k)). (End)
Number of binary palindromes of length n for which the first floor(n/2) symbols are themselves a palindrome (Ji and Wilf 2008). - Jeffrey Shallit, Jun 15 2017
REFERENCES
Arthur T. Benjamin and Jennifer J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A., 2003, p. 75ff.
Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 145-151.
James W. L. Glaisher, On the residue of a binomial-theorem coefficient with respect to a prime modulus, Quarterly Journal of Pure and Applied Mathematics, Vol. 30 (1899), pp. 150-156.
H. W. Gould, Exponential Binomial Coefficient Series. Tech. Rep. 4, Math. Dept., West Virginia Univ., Morgantown, WV, Sep 1961.
Olivier Martin, Andrew M. Odlyzko, and Stephen Wolfram, Algebraic properties of cellular automata, Comm. Math. Physics, Vol. 93 (1984), pp. 219-258. Reprinted in Theory and Applications of Cellular Automata, S Wolfram, Ed., World Scientific, 1986, pp. 51-90 and in Cellular Automata and Complexity: Collected Papers of Stephen Wolfram, Addison-Wesley, 1994, pp. 71-113
Manfred R. Schroeder, Fractals, Chaos, Power Laws, W. H. Freeman, NY, 1991, page 383.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Andrew Wuensche, Exploring Discrete Dynamics, Luniver Press, 2011. See Fig. 2.3.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..50000 (terms 0..1000 from T. D. Noe)
David Applegate, Omar E. Pol, and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), pp. 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]
Jean-Paul Allouche and Jeffrey Shallit, The ring of k-regular sequences, Theoretical Computer Sci., Vol. 98 (1992), pp. 163-197.
Paul Barry, A Note on Riordan Arrays with Catalan Halves, arXiv:1912.01124 [math.CO], 2019.
George Beck and Karl Dilcher, A Matrix Related to Stern Polynomials and the Prouhet-Thue-Morse Sequence, arXiv:2106.10400 [math.CO], 2021.
Christina Talar Bekaroğlu, Analyzing Dynamics of Larger than Life: Impacts of Rule Parameters on the Evolution of a Bug's Geometry, Master's thesis, Calif. State Univ. Northridge (2023). See pp. 91-92.
Neil J. Calkin, Eunice Y. S. Chan, and Robert M. Corless, Some Facts and Conjectures about Mandelbrot Polynomials, Maple Transactions (2021) Vol. 1, No. 1, Article 1.
Neil J. Calkin, Eunice Y. S. Chan, Robert M. Corless, David J. Jeffrey, and Piers W. Lawrence, A Fractal Eigenvector, arXiv:2104.01116 [math.DS], 2021.
Emeric Deutsch and Bruce E. Sagan, Congruences for Catalan and Motzkin numbers and related sequences, arXiv:math/0407326 [math.CO], 2004.
Emeric Deutsch and Bruce E. Sagan, Congruences for Catalan and Motzkin numbers and related sequences, J. Num. Theory, Vol. 117 (2006), pp. 191-215.
Philippe Dumas, Diviser pour régner Comportement asymptotique. (has many references)
Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, A Meta-Algorithm for Creating Fast Algorithms for Counting ON Cells in Odd-Rule Cellular Automata, arXiv:1503.01796 [math.CO], 2015; see also the Accompanying Maple Package.
Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, Odd-Rule Cellular Automata on the Square Grid, arXiv:1503.04249 [math.CO], 2015.
Steven R. Finch, Stolarsky-Harborth Constant. [Broken link]
Steven R. Finch, Stolarsky-Harborth Constant. [From the Wayback machine]
Po-Yi Huang and Wen-Fong Ke, Sequences Derived from The Symmetric Powers of {1, 2, ..., k}, arXiv:2307.07733 [math.CO], 2023.
Kathy Q. Ji and Herbert S. Wilf, Extreme Palindromes, Amer. Math. Monthly, Vol. 115, No. 5 (2008), pp. 447-451.
Hans Montanus and Ron Westdijk, Cellular Automation and Binomials, Green Blue Mathematics (2022), p. 57.
Sam Northshield, Stern's Diatomic Sequence 0,1,1,2,1,3,2,3,1,4,..., Amer. Math. Month., Vol. 117, No. 7 (2010), pp. 581-598.
Tomaz Pisanski and Thomas W. Tucker, Growth in Repeated Truncations of Maps, Atti Sem. Mat. Fis. Univ. Modena, Vol. 49 (2001), suppl., pp. 167-176.
David G. Poole, The towers and triangles of Professor Claus (or, Pascal knows Hanoi), Math. Mag., Vol. 67, No. 5 (1994), pp. 323-344.
Joseph M. Shunia, A Polynomial Ring Connecting Central Binomial Coefficients and Gould's Sequence, arXiv:2312.00302 [math.GM], 2023.
N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
Lukas Spiegelhofer and Michael Wallner, Divisibility of binomial coefficients by powers of two, arXiv:1710.10884 [math.NT], 2017.
Ralf Stephan, Divide-and-conquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.
Alexander Yu. Vlasov, Modelling reliability of reversible circuits with 2D second-order cellular automata, arXiv:2312.13034 [nlin.CG], 2023. See page 12.
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton.
Stephen Wolfram, Statistical mechanics of cellular automata, Rev. Mod. Phys., Vol. 55 (1983), pp. 601-644.
Stephen Wolfram, Geometry of Binomial Coefficients, Amer. Math. Monthly, Vol. 91, No. 9 (November 1984), pp. 566-571.
Chai Wah Wu, Sums of products of binomial coefficients mod 2 and run length transforms of sequences, arXiv preprint arXiv:1610.06166 [math.CO], 2016.
Zhujun Zhang, A Note on Counting Binomial Heaps, ResearchGate (2019).
FORMULA
a(n) = 2^A000120(n).
a(0) = 1; for n > 0, write n = 2^i + j where 0 <= j < 2^i; then a(n) = 2*a(j).
a(n) = 2*a(n-1)/A006519(n) = A000079(n)*A049606(n)/A000142(n).
a(n) = A038573(n) + 1.
G.f.: Product_{k>=0} (1+2*z^(2^k)). - Ralf Stephan, Apr 06 2003
a(n) = Sum_{i=0..2*n} (binomial(2*n, i) mod 2)*(-1)^i. - Benoit Cloitre, Nov 16 2003
a(n) mod 3 = A001285(n). - Benoit Cloitre, May 09 2004
a(n) = 2^n - 2*Sum_{k=0..n} floor(binomial(n, k)/2). - Paul Barry, Dec 24 2004
a(n) = Product_{k=0..log_2(n)} 2^b(n, k), b(n, k) = coefficient of 2^k in binary expansion of n. - Paul D. Hanna
Sum_{k=0..n-1} a(k) = A006046(n).
a(n) = n/2 + 1/2 + (1/2)*Sum_{k=0..n} (-(-1)^binomial(n,k)). - Stephen Crowley, Mar 21 2007
G.f. for a(n)/A156769(n): (1/2)*z^(1/2)*sinh(2*z^(1/2)). - Johannes W. Meijer, Feb 20 2009
Equals infinite convolution product of [1,2,0,0,0,0,0,0,0] aerated (A000079 - 1) times, i.e., [1,2,0,0,0,0,0,0,0] * [1,0,2,0,0,0,0,0,0] * [1,0,0,0,2,0,0,0,0]. - Mats Granvik, Gary W. Adamson, Oct 02 2009
a(n) = f(n, 1) with f(x, y) = if x = 0 then y otherwise f(floor(x/2), y*(1 + x mod 2)). - Reinhard Zumkeller, Nov 21 2009
a(n) = 2^(number of 1's in binary form of (n-1)). - Gabriel C. Benamy, Dec 08 2009
a((2*n+1)*2^p-1) = (2^p)*a(n), p >= 0. - Johannes W. Meijer, Jun 05 2011
a(n) = A000120(A001317(n)). - Reinhard Zumkeller, Nov 24 2012
a(n) = A226078(n,1). - Reinhard Zumkeller, May 25 2013
a(n) = lcm(n!, 2^n) / n!. - Daniel Suteu, Apr 28 2017
a(n) = A061142(A005940(1+n)). - Antti Karttunen, May 29 2017
a(0) = 1, a(2*n) = a(n), a(2*n+1) = 2*a(n). - Daniele Parisse, Feb 15 2024
EXAMPLE
Has a natural structure as a triangle:
.1,
.2,
.2,4,
.2,4,4,8,
.2,4,4,8,4,8,8,16,
.2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,
.2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,4,8,8,16,8,16,16,32,8,16,16,32,16,32,32,64,
....
The rows converge to A117973.
From Omar E. Pol, Jun 07 2009: (Start)
Also, triangle begins:
.1;
.2,2;
.4,2,4,4;
.8,2,4,4,8,4,8,8;
16,2,4,4,8,4,8,8,16,4,8,8,16,8,16,16;
32,2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,4,8,8,16,8,16,16,32,8,16,16,32,16,32,32;
64,2,4,4,8,4,8,8,16,4,8,8,16,8,16,16,32,4,8,8,16,8,16,16,32,8,16,16,32,16,32,...
(End)
G.f. = 1 + 2*x + 2*x^2 + 4*x^3 + 2*x^4 + 4*x^5 + 4*x^6 + 8*x^7 + 2*x^8 + ...
MAPLE
A001316 := proc(n) local k; add(binomial(n, k) mod 2, k=0..n); end;
S:=[1]; S:=[op(S), op(2*s)]; # repeat ad infinitum!
a := n -> 2^add(i, i=convert(n, base, 2)); # Peter Luschny, Mar 11 2009
MATHEMATICA
Table[ Sum[ Mod[ Binomial[n, k], 2], {k, 0, n} ], {n, 0, 100} ]
Nest[ Join[#, 2#] &, {1}, 7] (* Robert G. Wilson v, Jan 24 2006 and modified Jul 27 2014 *)
Map[Function[Apply[Plus, Flatten[ #1]]], CellularAutomaton[90, {{1}, 0}, 100]] (* Produces counts of ON cells. N. J. A. Sloane, Aug 10 2009 *)
ArrayPlot[CellularAutomaton[90, {{1}, 0}, 20]] (* Illustration of first 20 generations. - N. J. A. Sloane, Aug 14 2014 *)
Table[2^(RealDigits[n - 1, 2][[1]] // Total), {n, 1, 100}] (* Gabriel C. Benamy, Dec 08 2009 *)
CoefficientList[Series[Exp[2*x], {x, 0, 100}], x] // Numerator (* Jean-François Alcover, Oct 25 2013 *)
Count[#, _?OddQ]&/@Table[Binomial[n, k], {n, 0, 90}, {k, 0, n}] (* Harvey P. Dale, Sep 22 2015 *)
PROG
(PARI) {a(n) = if( n<0, 0, numerator(2^n / n!))};
(PARI) A001316(n)=1<<norml2(binary(n)) \\ M. F. Hasler, May 03 2009
(PARI) a(n)=2^hammingweight(n) \\ Charles R Greathouse IV, Jan 04 2013
(Haskell)
import Data.List (transpose)
a001316 = sum . a047999_row -- Reinhard Zumkeller, Nov 24 2012
a001316_list = 1 : zs where
zs = 2 : (concat $ transpose [zs, map (* 2) zs])
-- Reinhard Zumkeller, Aug 27 2014, Sep 16 2011
(Sage, Python)
from functools import cache
@cache
def A001316(n):
if n <= 1: return n+1
return A001316(n//2) << n%2
print([A001316(n) for n in range(88)]) # Peter Luschny, Nov 19 2012
(Python)
def A001316(n):
return 2**bin(n)[2:].count("1") # Indranil Ghosh, Feb 06 2017
(Scheme) (define (A001316 n) (let loop ((n n) (z 1)) (cond ((zero? n) z) ((even? n) (loop (/ n 2) z)) (else (loop (/ (- n 1) 2) (* z 2)))))) ;; Antti Karttunen, May 29 2017
CROSSREFS
Equals left border of triangle A166548. - Gary W. Adamson, Oct 16 2009
For generating functions Product_{k>=0} (1+a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.
For partial sums see A006046. For first differences see A151930.
This is the numerator of 2^n/n!, while A049606 gives the denominator.
If we subtract 1 from the terms we get a pair of essentially identical sequences, A038573 and A159913.
A163000 and A163577 count binomial coefficients with 2-adic valuation 1 and 2. A275012 gives a measure of complexity of these sequences. - Eric Rowland, Mar 15 2017
Cf. A286575 (run-length transform), A368655 (binomial transform), also A037445.
KEYWORD
nonn,easy,nice,changed
EXTENSIONS
Additional comments from Henry Bottomley, Mar 12 2001
Further comments from N. J. A. Sloane, May 30 2009
STATUS
approved
Number of "ON" cells at n-th stage in the "Ulam-Warburton" two-dimensional cellular automaton.
+10
91
0, 1, 5, 9, 21, 25, 37, 49, 85, 89, 101, 113, 149, 161, 197, 233, 341, 345, 357, 369, 405, 417, 453, 489, 597, 609, 645, 681, 789, 825, 933, 1041, 1365, 1369, 1381, 1393, 1429, 1441, 1477, 1513, 1621, 1633, 1669, 1705, 1813, 1849, 1957, 2065, 2389, 2401, 2437, 2473
OFFSET
0,3
COMMENTS
Studied by Holladay and Ulam circa 1960. See Fig. 1 and Example 1 of the Ulam reference. - N. J. A. Sloane, Aug 02 2009.
Singmaster calls this the Ulam-Warburton cellular automaton. - N. J. A. Sloane, Aug 05 2009
On the infinite square grid, start with all cells OFF.
Turn a single cell to the ON state.
At each subsequent step, each cell with exactly one neighbor ON is turned ON, and everything that is already ON remains ON.
Here "neighbor" refers to the four adjacent cells in the X and Y directions.
Note that "neighbor" could equally well refer to the four adjacent cells in the diagonal directions, since the graph formed by Z^2 with "one-step rook" adjacencies is isomorphic to Z^2 with "one-step bishop" adjacencies.
Also toothpick sequence starting with a central X-toothpick followed by T-toothpicks (see A160170 and A160172). The sequence gives the number of polytoothpicks in the structure after n-th stage. - Omar E. Pol, Mar 28 2011
It appears that this sequence shares infinitely many terms with both A162795 and A169707, see Formula section and Example section. - Omar E. Pol, Feb 20 2015
It appears that the positive terms are also the odd terms (a bisection) of A151920. - Omar E. Pol, Mar 06 2015
Also, the number of active (ON, black) cells in the n-th stage of growth of two-dimensional cellular automaton defined by Wolfram's "Rule 558" or "Rule 686" based on the 5-celled von Neumann neighborhood. - Robert Price, May 10 2016
From Omar E. Pol, Mar 05 2019: (Start)
a(n) is also the total number of "hidden crosses" after 4*n stages in the toothpick structure of A139250, including the central cross, beginning to count the crosses when their nuclei are totally formed with 4 quadrilaterals.
a(n) is also the total number of "flowers with six petals" after 4*n stages in the toothpick structure of A323650.
Note that the location of the "nuclei of the hidden crosses" and the "flowers with six petals" in both toothpick structures is essentially the same as the location of the "ON" cells in the version "one-step bishop" of this sequence (see the illustration of initial terms, figure 2). (End)
This sequence has almost exactly the same graph as A187220, A162795, A169707 and A160164 which is twice A139250. - Omar E. Pol, Jun 18 2022
REFERENCES
S. Ulam, On some mathematical problems connected with patterns of growth of figures, pp. 215-224 of R. E. Bellman, ed., Mathematical Problems in the Biological Sciences, Proc. Sympos. Applied Math., Vol. 14, Amer. Math. Soc., 1962.
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 928.
LINKS
David Applegate, The movie version
David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.]
Steven R. Finch, Toothpicks and Live Cells, July 21, 2015. [Cached copy, with permission of the author]
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 31.
David Singmaster, On the cellular automaton of Ulam and Warburton, M500 Magazine of the Open University, #195 (December 2003), pp. 2-7. Also scanned annotated cached copy, included with permission.
N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
N. J. A. Sloane, Exciting Number Sequences (video of talk), Mar 05 2021
N. J. A. Sloane and Brady Haran, Terrific Toothpick Patterns, Numberphile video (2018).
Mike Warburton, Ulam-Warburton Automaton - Counting Cells with Quadratics, arXiv:1901.10565 [math.CO], 2019.
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
FORMULA
a(n) = 1 + 4*Sum_{k=1..n-1} 3^(wt(k)-1) for n>1, where wt() = A000120(). [Corrected by Paolo Xausa, Aug 12 2022]
For asymptotics see the discussion in the comments in A006046. - N. J. A. Sloane, Mar 11 2021
From Omar E. Pol, Mar 13 2011: (Start)
a(n) = 2*A151917(n) - 1, for n >= 1.
a(n) = 1 + 4*A151920(n-2), for n >= 2.
(End)
It appears that a(n) = A162795(n) = A169707(n), if n is a member of A048645, otherwise a(n) < A162795(n) < A169707(n). - Omar E. Pol, Feb 20 2015
It appears that a(n) = A151920(2n-2), n >= 1. - Omar E. Pol, Mar 06 2015
It appears that a(n) = (A130665(2n-1) - 1)/3, n >= 1. - Omar E. Pol, Mar 07 2015
a(n) = 1 + 4*(A130665(n-1) - 1)/3, n >= 1. Omar E. Pol, Mar 07 2015
a(n) = A323650(2n)/3. - Omar E. Pol, Mar 04 2019
EXAMPLE
If we label the generations of cells turned ON by consecutive numbers we get a rosetta cell pattern:
. . . . . . . . . . . . . . . . .
. . . . . . . . 4 . . . . . . . .
. . . . . . . 4 3 4 . . . . . . .
. . . . . . 4 . 2 . 4 . . . . . .
. . . . . 4 3 2 1 2 3 4 . . . . .
. . . . . . 4 . 2 . 4 . . . . . .
. . . . . . . 4 3 4 . . . . . . .
. . . . . . . . 4 . . . . . . . .
. . . . . . . . . . . . . . . . .
In the first generation, only the central "1" is ON, a(1)=1. In the next generation, we turn ON four "2", leading to a(2)=a(1)+4=5. In the third generation, four "3" are turned ON, a(3)=a(2)+4=9. In the fourth generation, each of the four wings allows three 4's to be turned ON, a(4)=a(3)+4*3=21.
From Omar E. Pol, Feb 18 2015: (Start)
Also, written as an irregular triangle T(j,k), j>=0, k>=1, in which the row lengths are the terms of A011782:
1;
5;
9, 21;
25, 37, 49, 85;
89, 101,113,149,161,197,233,341;
345,357,369,405,417,453,489,597,609,645,681,789,825,933,1041,1365;
...
The right border gives the positive terms of A002450.
(End)
It appears that T(j,k) = A162795(j,k) = A169707(j,k), if k is a power of 2, for example: it appears that the three mentioned triangles only share the elements from the columns 1, 2, 4, 8, 16, ... - Omar E. Pol, Feb 20 2015
MAPLE
Since this is the partial sum sequence of A147582, it is most easily obtained using the Maple code given in A147582.
# [x, y] coordinates of cells on
Lse := [[0, 0]] ;
# enclosing rectangle of the cells on (that is, minima and maxima in Lse)
xmin := 0 ;
xmax := 0 ;
ymin := 0 ;
ymax := 0 ;
# count neighbors of x, y which are on; return 0 if [x, y] is in L
cntnei := proc(x, y, L)
local a, p, xpt, ypt;
a := 0 ;
if not [x, y] in L then
for p in Lse do
xpt := op(1, p) ;
ypt := op(2, p) ;
if ( abs(xpt-x) = 1 and ypt=y ) or ( x=xpt and abs(ypt-y) = 1) then
a := a+1 ;
fi;
od:
fi:
RETURN(a) ;
end:
# loop over generations/steps
for stp from 1 to 10 do
Lnew := [] ;
for x from xmin-1 to xmax+1 do
for y from ymin-1 to ymax+1 do
if cntnei(x, y, Lse) = 1 then
Lnew := [op(Lnew), [x, y]] ;
fi;
od:
od:
for p in Lnew do
xpt := op(1, p) ;
ypt := op(2, p) ;
xmin := min(xmin, xpt) ;
xmax := max(xmax, xpt) ;
ymin := min(ymin, ypt) ;
ymax := max(ymax, ypt) ;
od:
Lse := [op(Lse), op(Lnew)] ;
print(nops(Lse)) ;
MATHEMATICA
Join[{0}, Map[Function[Apply[Plus, Flatten[ #1]]], CellularAutomaton[{686, {2, {{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}}, {1, 1}}, {{{1}}, 0}, 200]]] (* Nadia Heninger and N. J. A. Sloane, Aug 11 2009; modified by Paolo Xausa, Aug 12 2022 to include the a(0) term *)
ArrayPlot /@ CellularAutomaton[{686, {2, {{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}}, {1, 1}}, {{{1}}, 0}, 16] (* N. J. A. Sloane, Nov 08 2014 *)
A147562list[nmax_]:=Accumulate[Join[{0, 1}, 4*3^(DigitCount[Range[nmax-1], 2, 1]-1)]]; A147562list[100] (* Paolo Xausa, May 21 2023 *)
PROG
(PARI) a(n) = if (n, 1 + 4*sum(k=1, n-1, 3^(hammingweight(k)-1)), 0); \\ Michel Marcus, Jul 05 2022
CROSSREFS
KEYWORD
nonn,nice,changed
AUTHOR
EXTENSIONS
Offset and initial terms changed by N. J. A. Sloane, Jun 07 2009
Numbers in the comment adapted to the offset by R. J. Mathar, Mar 03 2010
STATUS
approved
Number of entries in n-th row of Pascal's triangle not divisible by 3.
(Formerly M0422)
+10
29
1, 2, 3, 2, 4, 6, 3, 6, 9, 2, 4, 6, 4, 8, 12, 6, 12, 18, 3, 6, 9, 6, 12, 18, 9, 18, 27, 2, 4, 6, 4, 8, 12, 6, 12, 18, 4, 8, 12, 8, 16, 24, 12, 24, 36, 6, 12, 18, 12, 24, 36, 18, 36, 54, 3, 6, 9, 6, 12, 18, 9, 18, 27, 6, 12, 18, 12, 24, 36, 18, 36, 54, 9, 18, 27, 18, 36, 54, 27, 54
OFFSET
0,2
COMMENTS
Fixed point of the morphism a -> a, 2a, 3a, starting from a(1) = 1. - Robert G. Wilson v, Jan 24 2006
This is a particular case of the number of entries in n-th row of Pascal's triangle not divisible by a prime p, which is given by a simple recursion using ⊗, the Kronecker (or tensor) product of vectors. Let v_0=(1,2,...,p). Then v_{n+1}=v_0 ⊗ v_n, where the vector v_n contains the values for the first p^n rows of Pascal's triangle (rows 0 through p^n-1). - William B. Everett (bill(AT)chgnet.ru), Mar 29 2008
a(n) = A206424(n) + A227428(n); number of nonzero terms in row n of triangle A083093. - Reinhard Zumkeller, Jul 11 2013
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller (terms 0..1000) & Antti Karttunen, Table of n, a(n) for n = 0..19683
J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.
H. Harborth, Number of Odd Binomial Coefficients, Proc. Amer. Math. Soc. 62.1 (1977), 19-22. (Annotated scanned copy)
Sam Northshield, Sums across Pascal’s triangle modulo 2, Congressus Numerantium, 200, pp. 35-52, 2010.
FORMULA
Write n in base 3; if the representation contains r 1's and s 2's then a(n) = 3^s * 2^r. Also a(n) = Sum_{k=0..n} (C(n, k)^2 mod 3). - Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001
a(n) = b(n+1), with b(1)=1, b(2)=2, b(3n)=3b(n), b(3n+1)=b(n+1), b(3n+2)=2b(n+1). - Ralf Stephan, Sep 15 2003
G.f.: Product_{n>=0} (1+2*x^(3^n)+3*x^(2*3^n)) (Northshield). - Johannes W. Meijer, Jun 05 2011
G.f. g(x) satisfies g(x) = (1 + 2*x + 3*x^2)*g(x^3). - Robert Israel, Oct 15 2015
From Tom Edgar, Oct 15 2015: (Start)
a(3^k) = 2 for k>=0;
a(2*3^k) = 3 for k>=0;
a(n) = Product_{b_j != 0} a(b_j*3^j) where n = Sum_{j>=0} b_j*3^j is the ternary representation of n. (End)
A056239(a(n)) = A053735(n). - Antti Karttunen, Jun 03 2017
a(n) = Sum_{k = 0..n} mod(C(n,k)^2, 3). - Peter Bala, Dec 17 2020
EXAMPLE
15 in base 3 is 120, here r=1 and s=1 so a(15) = 3*2 = 6.
William B. Everett's comment with p=3, n=2: v_0 = (1,2,3), v_1 = (1,2,3) => v_2 = (1*1,1*2,1*3,2*1,2*2,2*3,3*1,3*2,3*3) = (1,2,3,2,4,6,3,6,9), the first 3^2 values of the present sequence. - Wolfdieter Lang, Mar 19 2014
MAPLE
p:=proc(n) local ct, k: ct:=0: for k from 0 to n do if binomial(n, k) mod 3 = 0 then else ct:=ct+1 fi od: end: seq(p(n), n=0..82); # Emeric Deutsch
f:= proc(n) option remember; ((n mod 3)+1)*procname(ceil((n+1)/3)-1) end proc:
f(0):= 1: f(1):= 2:
seq(f(i), i=0..100); # Robert Israel, Oct 15 2015
MATHEMATICA
Nest[Flatten[ # /. a_Integer -> {a, 2a, 3a}] &, {1}, 4] (* Robert G. Wilson v, Jan 24 2006 *)
Nest[ Join[#, 2#, 3#] &, {1}, 4] (* Robert G. Wilson v, Jul 27 2014 *)
PROG
(PARI) b(n)=if(n<3, n, if(n%3==0, 3*b(n/3), if(n%3==1, 1*b((n+2)/3), 2*b((n+1)/3)))) \\ Ralf Stephan
(PARI) A006047(n) = b(1+n); \\ (The above PARI-program by Ralf Stephan is for offset-1-version of this sequence.) - Antti Karttunen, May 28 2017
(PARI) A006047(n) = { my(m=1, d); while(n, d = (n%3); m *= (1+d); n \= 3); m; }; \\ Antti Karttunen, May 28 2017
(PARI) a(n) = prod(i=1, #d=digits(n, 3), (1+d[i])) \\ David A. Corneth, May 28 2017
(PARI) upto(n) = my(res = [1], v); while(#res < n, v = concat(2*res, 3*res); res = concat(res, v)); res \\ David A. Corneth, May 29 2017
(Haskell)
a006047 = sum . map signum . a083093_row
-- Reinhard Zumkeller, Jul 11 2013
(Scheme) (define (A006047 n) (if (zero? n) 1 (let ((d (mod n 3))) (* (+ 1 d) (A006047 (/ (- n d) 3)))))) ;; For R6RS standard. Use modulo instead of mod in older Schemes like MIT/GNU Scheme. - Antti Karttunen, May 28 2017
(Python)
from sympy.ntheory.factor_ import digits
from sympy import prod
def a(n):
d=digits(n, 3)
return n + 1 if n<3 else prod(1 + d[i] for i in range(1, len(d)))
print([a(n) for n in range(51)]) # Indranil Ghosh, Jun 06 2017
KEYWORD
nonn
EXTENSIONS
More terms from Ralf Stephan, Sep 15 2003
STATUS
approved

Search completed in 0.043 seconds