login
A272294
First differences of number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 461", based on the 5-celled von Neumann neighborhood.
1
7, -3, 39, -27, 95, -91, 183, -179, 303, -283, 435, -399, 579, -555, 775, -779, 1023, -959, 1215, -1183, 1467, -1447, 1783, -1735, 2091, -2019, 2419, -2351, 2751, -2679, 3103, -3059, 3507, -3403, 3947, -3951, 4519, -4371, 4887, -4807, 5303, -5327, 6039
OFFSET
0,1
COMMENTS
Initialized with a single black (ON) cell at stage zero.
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.
MATHEMATICA
CAStep[rule_, a_]:=Map[rule[[10-#]]&, ListConvolve[{{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}, a, 2], {2}];
code=461; 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 *)
CROSSREFS
Cf. A272291.
Sequence in context: A271692 A272114 A272546 * A272567 A272419 A272156
KEYWORD
sign,easy
AUTHOR
Robert Price, Apr 24 2016
STATUS
approved