%I #18 Oct 04 2024 08:53:15
%S 3,7,5,7,17,17,7,7,17,17,19,41,51,31,9,7,17,17,19,41,51,31,21,41,51,
%T 55,101,143,113,49,11,7,17,17,19,41,51,31,21,41,51,55,101,143,113,49,
%U 23,41,51,55,101,143,113,73,103,143,161,257,387,369,211,71,13,7,17,17,19,41,51
%N a(n) = Sum_{k >= 0} bin2(wt(n+k),k+1), where bin2(i,j) = A013609(i,j), wt(i) = A000120(i).
%C Or, a(n) = Sum_{k >= 0} 2^wt(k) * binomial(wt(n+k),k).
%H 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 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>
%F G.f.: Product_{ k >= 0 } (1 + 2*x^(2^k-1) + x^(2^k)).
%e Contribution from _Omar E. Pol_, Jun 09 2009: (Start)
%e Triangle begins:
%e .3;
%e .7,5;
%e .7,17,17,7;
%e .7,17,17,19,41,51,31,9;
%e .7,17,17,19,41,51,31,21,41,51,55,101,143,113,49,11;
%e .7,17,17,19,41,51,31,21,41,51,55,101,143,113,49,23,41,51,55,101,143,113,...
%e (End)
%p bin2:=proc(n,k) option remember; if k<0 or k>n then 0
%p elif k=0 then 1 else 2*bin2(n-1,k-1)+bin2(n-1,k); fi; end;
%p wt := proc(n) local w,m,i;
%p w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end:
%p f:=n->add( bin2(wt(n+k),k),k=0..120 );
%p # or:
%p f := n->add( 2^k*binomial(wt(n+k),k),k=0..20 );
%t max = 70; (* number of terms *)
%t CoefficientList[Product[1 + 2*x^(2^k-1) + x^(2^k), {k, 0, Log2[max+1] // Ceiling}] + O[x]^max, x] (* _Jean-François Alcover_, Aug 03 2022 *)
%Y For generating functions of the form Product_{k>=c} (1+a*x^(2^k-1)+b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
%Y Cf. A151689, A151691.
%Y Cf. A000079. - _Omar E. Pol_, Jun 09 2009
%K nonn
%O 0,1
%A _N. J. A. Sloane_, Jun 01 2009