A153000 Toothpick sequence in the first quadrant.
0, 1, 2, 3, 5, 8, 10, 11, 13, 16, 19, 23, 30, 38, 42, 43, 45, 48, 51, 55, 62, 70, 75, 79, 86, 95, 105, 120, 142, 162, 170, 171, 173, 176, 179, 183, 190, 198, 203, 207, 214, 223, 233, 248, 270, 290, 299, 303, 310, 319, 329, 344, 366, 387
Offset: 0
Keywords
References
- D. 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
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.], which is also available at arXiv:1004.3036v2, [math.CO], 2010.
- Omar E. Pol, Illustration of initial terms [From Omar E. Pol, Nov 29 2009]
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
- Index entries for sequences related to toothpick sequences
- Index entries for sequences related to cellular automata
Programs
-
Maple
G := (1+x)*(mul(1+x^(2^k-1)+2*x^(2^k),k=1..20)-1)/((1-x)*(1+2*x)); # N. J. A. Sloane, May 20 2009
-
Python
def msb(n): t=0 while n>>t>0: t+=1 return 2**(t - 1) def a139250(n): k=(2*msb(n)**2 + 1)//3 return 0 if n==0 else k if n==msb(n) else k + 2*a139250(n - msb(n)) + a139250(n - msb(n) + 1) - 1 def a(n): return 0 if n==0 else (a139250(n + 2) - 3)//4 print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 01 2017
Formula
G.f.: (1+x)*(Product_{k>=1} (1+x^(2^k-1)+2*x^(2^k))-1)/((1-x)*(1+2*x)). - N. J. A. Sloane, May 20 2009
Contribution from Omar E. Pol, Oct 01 2011: (Start)
(End)
a(n) = (A187220(n+3) - 7)/8. - Omar E. Pol, Feb 16 2013
Comments