OFFSET
0,2
COMMENTS
This is the number of ON cells in a certain 2-D CA in which the neighborhood of a cell is defined by f, and in which a cell is ON iff there was an odd number of ON cells in the neighborhood at the previous generation.
LINKS
Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, A Meta-Algorithm for Creating Fast Algorithms for Counting ON Cells in Odd-Rule Cellular Automata, arXiv:1503.01796 [math.CO], 2015; see also the Accompanying Maple Package.
Shalosh B. Ekhad, N. J. A. Sloane, and Doron Zeilberger, Odd-Rule Cellular Automata on the Square Grid, arXiv:1503.04249 [math.CO], 2015.
N. J. A. Sloane, On the No. of ON Cells in Cellular Automata, Video of talk in Doron Zeilberger's Experimental Math Seminar at Rutgers University, Feb. 05 2015: Part 1, Part 2
N. J. A. Sloane, On the Number of ON Cells in Cellular Automata, arXiv:1503.01168 [math.CO], 2015.
EXAMPLE
Here is the neighborhood:
[X, X, X, X, X]
[X, 0, X, 0, X]
[X, X, X, X, X]
[X, 0, X, 0, X]
[X, X, X, X, X]
which contains a(1) = 21 ON cells.
MAPLE
C:=f->subs({x=1, y=1}, f);
# Find number of ON cells in CA for generations 0 thru M defined by rule
# that cell is ON iff number of ON cells in nbd at time n-1 was odd
# where nbd is defined by a polynomial or Laurent series f(x, y).
OddCA:=proc(f, M) global C; local n, a, i, f2, p;
f2:=simplify(expand(f)) mod 2;
a:=[]; p:=1;
for n from 0 to M do a:=[op(a), C(p)]; p:=expand(p*f2) mod 2; od:
lprint([seq(a[i], i=1..nops(a))]);
end;
f:=x^4*y^4+x^4*y^3+x^3*y^4+x^4*y^2+x^2*y^4+x^4*y+x^3*y^2+x^2*y^3+x*y^4+x^4+
x^2*y^2+y^4+x^3+x^2*y+x*y^2+y^3+x^2+y^2+x+y+1;
OddCA(f, 100);
MATHEMATICA
f = x^4*y^4 + x^4*y^3 + x^3*y^4 + x^4*y^2 + x^2*y^4 + x^4*y + x^3*y^2 + x^2*y^3 + x*y^4 + x^4 + x^2*y^2 + y^4 + x^3 + x^2*y + x*y^2 + y^3 + x^2 + y^2 + x + y + 1;
a[0] = 1; a[n_] := Count[List @@ Expand[f^n] /. {x -> 1, y -> 1}, _?OddQ];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 11 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 20 2014
STATUS
approved