A118977 a(0)=0, a(1)=1; a(2^i+j) = a(j) + a(j+1) for 0 <= j < 2^i.
0, 1, 1, 2, 1, 2, 3, 3, 1, 2, 3, 3, 3, 5, 6, 4, 1, 2, 3, 3, 3, 5, 6, 4, 3, 5, 6, 6, 8, 11, 10, 5, 1, 2, 3, 3, 3, 5, 6, 4, 3, 5, 6, 6, 8, 11, 10, 5, 3, 5, 6, 6, 8, 11, 10, 7, 8, 11, 12, 14, 19, 21, 15, 6, 1, 2, 3, 3, 3, 5, 6, 4, 3, 5, 6, 6, 8, 11, 10, 5, 3, 5, 6, 6, 8, 11, 10, 7, 8, 11, 12, 14, 19, 21, 15
Offset: 0
Keywords
Examples
From _N. J. A. Sloane_, Jun 01 2009: (Start) Has a natural structure as a triangle: 0, 1, 1,2, 1,2,3,3, 1,2,3,3,3,5,6,4, 1,2,3,3,3,5,6,4,3,5,6,6,8,11,10,5, 1,2,3,3,3,5,6,4,3,5,6,6,8,11,10,5,3,5,6,6,8,11,10,7,8,11,12,14,19,21,15,6, 1,2,3,3,3,5,6,4,3,5,... In this form the rows converge to (1 followed by A160573) or A151687. (End)
Links
- N. J. A. Sloane, Table of n, a(n) for n = 0..9999
- 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.]
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
Crossrefs
For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.
Cf. A163267 (partial sums). - N. J. A. Sloane, Jan 07 2010
Programs
-
Maple
Maple code for the rows of the triangle (PP(n) is a g.f. for the (n+1)-st row): g:=n->1+x^(2^n-1)+x^(2^n); c:=n->x^(2^n-1)*(1-x^(2^n)); PP:=proc(n) option remember; global g,c; if n=1 then 1+2*x else series(g(n-1)*PP(n-1)-c(n-1),x,10000); fi; end; # N. J. A. Sloane, Jun 01 2009
-
Mathematica
a[0] = 0; a[1] = 1; a[n_] := a[n] = (j = n - 2^Floor[Log[2, n]]; a[j] + a[j + 1]); Array[a, 95, 0] (* Jean-François Alcover, Nov 10 2016 *)
Formula
a(0)=0; a(2^i)=1. For n >= 3 let n = 2^i + j, where 1 <= j < 2^i. Then a(n) = Sum_{k >= 0} binomial( wt(j+k),k ), where wt() = A000120(). - N. J. A. Sloane, Jun 01 2009
G.f.: ( x + x^2 * Product_{ n >= 0} (1 + x^(2^n-1) + x^(2^n)) ) / (1+x). - N. J. A. Sloane, Jun 08 2009
Extensions
New definition and more terms from N. J. A. Sloane, May 25 2009
Comments