OFFSET
0,4
COMMENTS
The result of one application of the following "game of life" rule to the binary representation of n: ("1" denotes a living cell, "0" a dead cell) A living cell survives, or a dead cell becomes alive, in the next generation iff the sum of its neighbors is 1 (sum = 0 or 2 implies death from isolation or overcrowding, respectively).
For n such that a(n) = n (fixed points) cf. A083713. Iteration of the mapping leads to one of these fixed points.
LINKS
Eric Weisstein's World of Mathematics, Game of Life
EXAMPLE
6 (decimal) = 110 -> 111, hence a(6) = 7; 21 (decimal) = 10101 -> 00000, hence a(21) = 0. Iteration on 13 gives 13 -> 12 -> 14 -> 11 -> 3, or 1101 -> 1100 -> 1110 -> 1011 -> 11 in binary.
PROG
(PARI) {b2to10(n)=local(f, d, k); f=1; k=0; while(n>0, d=divrem(n, 10); n=d[1]; k=k+f*d[2]; f=2*f); k}
{for(n=0, 77, v=concat(0, binary(2*n)); s="0"; for(j=1, length(v)-2, s=concat(s, v[j]!=v[j+2])); print1(b2to10(eval(s)), ", "))}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Joseph L. Pe, Jan 31 2002
EXTENSIONS
Edited and extended by Klaus Brockhaus, Jun 14 2003
STATUS
approved