The Moore neighborhood is a square-shaped collection of cells surrounding and including a given cell
on an integer lattice. It can specify which cells
affect the evolution of a two-dimensional cellular
automaton on a square grid. For a nonnegative
integer range
, it is defined by
Moore neighborhoods for ranges , 1, 2, and 3 are illustrated
above. The number of cells in the Moore neighborhood of range
is the odd square number
, the first few of which are 1, 9, 25, 49, 81,
... (OEIS A016754).