login
A270131
Partial sums of the number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 89", based on the 5-celled von Neumann neighborhood.
1
1, 5, 10, 54, 54, 175, 175, 400, 400, 761, 761, 1290, 1290, 2019, 2019, 2980, 2980, 4205, 4205, 5726, 5726, 7575, 7575, 9784, 9784, 12385, 12385, 15410, 15410, 18891, 18891, 22860, 22860, 27349, 27349, 32390, 32390, 38015, 38015, 44256, 44256, 51145, 51145
OFFSET
0,2
COMMENTS
Initialized with a single black (ON) cell at stage zero.
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
FORMULA
Conjectures from Colin Barker, Mar 12 2016: (Start)
a(n) = 1/12*(-39-9*(-1)^n+(22-24*(-1)^n)*n-12*(-2+(-1)^n)*n^2+8*n^3) for n>2.
a(n) = (4*n^3+6*n^2-n-24)/6 for n>2 and n even.
a(n) = (4*n^3+18*n^2+23*n-15)/6 for n>2 and n odd.
a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7) for n>9.
G.f.: (1+4*x+2*x^2+32*x^3-12*x^4+x^5+14*x^6-10*x^7-5*x^8+5*x^9) / ((1-x)^4*(1+x)^3).
(End)
MATHEMATICA
CAStep[rule_, a_]:=Map[rule[[10-#]]&, ListConvolve[{{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}, a, 2], {2}];
code=89; stages=128;
rule=IntegerDigits[code, 2, 10];
g=2*stages+1; (* Maximum size of grid *)
a=PadLeft[{{1}}, {g, g}, 0, Floor[{g, g}/2]]; (* Initial ON cell on grid *)
ca=a;
ca=Table[ca=CAStep[rule, ca], {n, 1, stages+1}];
PrependTo[ca, a];
(* Trim full grid to reflect growth by one cell at each stage *)
k=(Length[ca[[1]]]+1)/2;
ca=Table[Table[Part[ca[[n]][[j]], Range[k+1-n, k-1+n]], {j, k+1-n, k-1+n}], {n, 1, k}];
on=Map[Function[Apply[Plus, Flatten[#1]]], ca] (* Count ON cells at each stage *)
Table[Total[Part[on, Range[1, i]]], {i, 1, Length[on]}] (* Sum at each stage *)
CROSSREFS
Cf. A270129.
Sequence in context: A081076 A174462 A277247 * A271295 A354736 A005438
KEYWORD
nonn,easy
AUTHOR
Robert Price, Mar 11 2016
STATUS
approved