The von Neumann neighborhood is a diamond-shaped set of cells surrounding a given cell on a square grid. It
can be used to specify the cells that may affect the evolution of a two-dimensional
cellular automaton. For integers
,
,
and
with
, the neighborhood of range
is defined by
The neighborhoods for ranges ,
1, 2, and 3 are illustrated above. The number of cells in the von Neumann neighborhood
of range
is the centered square number
, the first few of which are 1, 5, 13, 25, 41,
61, ... (OEIS A001844).