This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A170838 #13 Dec 29 2021 12:24:49 %S A170838 2,5,9,11,11,24,36,29,11,24,38,44,57,108,135,83,11,24,38,44,57,108, %T A170838 137,98,57,110,158,189,279,459,486,245,11,24,38,44,57,108,137,98,57, %U A170838 110,158,189,279,459,488,260,57,110,158,189,279,461,509,351,281,488,663,846,1296 %N A170838 G.f.: Product_{k>=0} (1 + x^(2^k-1) + 3x^(2^k)). %H A170838 David Applegate, Omar E. Pol and N. J. A. Sloane, <a href="/A000695/a000695_1.pdf">The Toothpick Sequence and Other Sequences from Cellular Automata</a>, 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.] %H A170838 N. J. A. Sloane, <a href="/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a> %p A170838 Maple program for A170838-A170852, A162956, A170854-A170872. %p A170838 read format; %p A170838 G := proc(a,b,c); mul( 1 + a*x^(2^n-1) + b*x^(2^n), n=c..20); end; %p A170838 f := proc(a,b,c) seriestolist(series(G(a,b,c),x,120)); end; %p A170838 at:=170838: %p A170838 for a from 1 to 2 do for c from 0 to 2 do %p A170838 b:=3; %p A170838 t1:=f(a,b,c); %p A170838 lprint( format(t1,at) ); %p A170838 lprint("G.f.: Prod_{k >= ", c, "} (1 +",a,"* x^(2^k-1) +",b,"* x^(2^k))."); %p A170838 at:=at+1; od: od: %p A170838 for b from 1 to 3 do for c from 0 to 2 do %p A170838 a:=3; %p A170838 t1:=f(a,b,c); %p A170838 lprint( format(t1,at) ); %p A170838 lprint("G.f.: Prod_{k >= ", c, "} (1 +",a,"* x^(2^k-1) +",b,"* x^(2^k))."); %p A170838 at:=at+1; od: od: %p A170838 h:=proc(r,s,a,b) local s1,n,i,j; %p A170838 s1:=array(0..120); %p A170838 s1[0]:=r; s1[1]:=s; %p A170838 for n from 2 to 120 do i:=floor(log(n)/log(2)); %p A170838 j:=n-2^i; s1[n]:=a*s1[j]+b*s1[j+1]; od: %p A170838 [seq(s1[n],n=0..120)]; %p A170838 end; %p A170838 l1:=[[0,1],[1,0],[1,1],[1,2]]; %p A170838 l2:=[[3,1],[3,2],[1,3],[2,3],[3,3]]; %p A170838 for i from 1 to 4 do for j from 1 to 5 do %p A170838 r:=l1[i][1]; %p A170838 s:=l1[i][2]; %p A170838 a:=l2[j][1]; %p A170838 b:=l2[j][2]; %p A170838 t1:=h(r,s,a,b); %p A170838 lprint(format(t1,at)); at:=at+1; %p A170838 lprint("a(0)=",r,", a(1)=", s, "; a(2^i+j)=",a,"*a(j)+",b,"a(j+1) for 0 <= j < 2^i."); %p A170838 od: od: %t A170838 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 *) %Y A170838 A170838-A170852, A170854-A170872 were added to supplement _Gary W. Adamson_'s A162956. %K A170838 nonn %O A170838 0,1 %A A170838 _N. J. A. Sloane_, Jan 02 2010