OFFSET
0,1
LINKS
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
MAPLE
read format;
G := proc(a, b, c); mul( 1 + a*x^(2^n-1) + b*x^(2^n), n=c..20); end;
f := proc(a, b, c) seriestolist(series(G(a, b, c), x, 120)); end;
at:=170838:
for a from 1 to 2 do for c from 0 to 2 do
b:=3;
t1:=f(a, b, c);
lprint( format(t1, at) );
lprint("G.f.: Prod_{k >= ", c, "} (1 +", a, "* x^(2^k-1) +", b, "* x^(2^k)).");
at:=at+1; od: od:
for b from 1 to 3 do for c from 0 to 2 do
a:=3;
t1:=f(a, b, c);
lprint( format(t1, at) );
lprint("G.f.: Prod_{k >= ", c, "} (1 +", a, "* x^(2^k-1) +", b, "* x^(2^k)).");
at:=at+1; od: od:
h:=proc(r, s, a, b) local s1, n, i, j;
s1:=array(0..120);
s1[0]:=r; s1[1]:=s;
for n from 2 to 120 do i:=floor(log(n)/log(2));
j:=n-2^i; s1[n]:=a*s1[j]+b*s1[j+1]; od:
[seq(s1[n], n=0..120)];
end;
l1:=[[0, 1], [1, 0], [1, 1], [1, 2]];
l2:=[[3, 1], [3, 2], [1, 3], [2, 3], [3, 3]];
for i from 1 to 4 do for j from 1 to 5 do
r:=l1[i][1];
s:=l1[i][2];
a:=l2[j][1];
b:=l2[j][2];
t1:=h(r, s, a, b);
lprint(format(t1, at)); at:=at+1;
lprint("a(0)=", r, ", a(1)=", s, "; a(2^i+j)=", a, "*a(j)+", b, "a(j+1) for 0 <= j < 2^i.");
od: od:
MATHEMATICA
With[{nn=60}, CoefficientList[Series[Product[1+x^(2^k-1)+3x^2^k, {k, 0, nn}], {x, 0, nn}], x]] (* Harvey P. Dale, Dec 29 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 02 2010
STATUS
approved