[go: up one dir, main page]

login
A270166
Partial sums of the number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 107", based on the 5-celled von Neumann neighborhood.
1
1, 6, 11, 52, 64, 173, 189, 386, 426, 747, 807, 1276, 1360, 2005, 2117, 2966, 3110, 4191, 4371, 5712, 5932, 7561, 7825, 9770, 10082, 12371, 12735, 15396, 15816, 18877, 19357, 22846, 23390, 27335, 27947, 32376, 33060, 38001, 38761, 44242, 45082, 51131, 52055
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 13 2016: (Start)
a(n) = 1/12*(-9*(23+(-1)^n)+(28-18*(-1)^n)*n-9*(-3+(-1)^n)*n^2+8*n^3) for n>6.
a(n) = (4*n^3+9*n^2+5*n-108)/6 for n>6 and even.
a(n) = (4*n^3+18*n^2+23*n-99)/6 for n>6 and 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>13.
G.f.: (1+5*x+2*x^2+26*x^3+x^5-6*x^6-12*x^7+23*x^8+16*x^9-24*x^10-12*x^11+8*x^12+4*x^13) / ((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=107; 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. A270164.
Sequence in context: A271279 A295498 A270158 * A270183 A270212 A077701
KEYWORD
nonn,easy
AUTHOR
Robert Price, Mar 12 2016
STATUS
approved