%I #32 Feb 24 2021 02:48:19
%S 1,8,4,32,4,32,16,128,4,32,16,128,16,128,64,512,4,32,16,128,16,128,64,
%T 512,16,128,64,512,64,512,256,2048,4,32,16,128,16,128,64,512,16,128,
%U 64,512,64,512,256,2048,16,128,64,512,64,512,256,2048,64,512,256,2048,256,2048,1024,8192,4,32,16,128,16,128,64,512,16,128
%N Total cell count of the expansion of a single cell, utilizing S1/B1 Game of Life cellular automata rules.
%C On an infinite binary cell grid, the next generation is evaluated whereby each cell is set if it has exactly one neighbor in the Moore neighborhood, if this is not satisfied, the cell dies.
%C Starting with an initial configuration of a single cell, the cell population totals that follow each evaluation are the terms of this sequence.
%C As such each odd generation has a population 8 times that of the preceding generation, where each remaining isolated cell spawns each of its eight neighbors while itself dying, unable to satisfy the lone survival rule.
%C Observing the even generations, A pattern is followed where cell population rises following local increments of 4^n, before hitting a global maximum and 'collapsing' down to 4 cells, the 4 absolute corners of population evaluated so far. The process repeats from each corner until each corner expansion meets, triggering the next collapse.
%C The collapse behavior can be explained by 3 observations.
%C A single uninterrupted cell will expand by 1 cell each generation, in each direction.
%C When a critical density is reached, only the 4 corners satisfy the birth rule.
%C As the population expands, it approaches that density, achieving it as each quadrant meets at the center origin lines.
%C With an initial configuration of a single cell at (0,0),
%C A collapse at generation k therefore will create corner cells a distance k cells from origin.
%C Likewise, it'll take k generations to expand back to the origin and trigger the next collapse.
%C or, the n-th collapse at generation (k) will precede the (n+1)th collapse at generation 2k.
%C Given The first collapse occurs at generation 2.
%C so then the 4th collapse will occur at 2(2(2(2))) = 2^4 = 16.
%C Cell count collapses to 4 on every 2^n generation where n>0.
%C From this, we can take that the n-th collapse occurs at 2^(n).
%C This holds since 2*(2^(n-1)) = 2^n.
%C Given the above growth of 2 cells over each axis for each generation, Bounding Area of population at n-th generation can be given by
%C area(n) = (2n + ICw) * (2n + ICh) where ICw and ICh is the width and height of the initial configuration
%H Jonathan Amery-Behr, <a href="/A213178/b213178.txt">Table of n, a(n) for n = 0..9999</a>
%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.] (2010)
%H N. J. A. Sloane, <a href="http://oeis.org/wiki/Catalog_of_Toothpick_and_CA_Sequences_in_OEIS">Catalog of Toothpick and Cellular Automata Sequences in the OEIS</a>
%F if (n mod 2 == 0), a(n+1) = 8*a(n);
%F if (n mod 2 == 1), 4^( Sum of all '1's in binary expansion of n).
%t a[n_] := a[n] = If[OddQ[n], 8 a[n - 1], 4^Total[IntegerDigits[n, 2]]];
%t a /@ Range[0, 100] (* _Jean-François Alcover_, Oct 23 2019 *)
%o (PARI) {a(n) = if(mod(n,2), 8*(4^subst(Pol( binary(n-1)), x, 1)), 4^ subst( Pol(binary(n)), x, 1))}
%Y Cf. A007088, A000120.
%Y For all odd n, sequence equals A102376.
%K nonn
%O 0,2
%A _Jonathan Amery-Behr_, Feb 27 2013