A067585 Binary representation of a(n) is obtained thus: replace every digit in the binary representation of n with "1" if the sum of its neighbors is 1 and with "0" otherwise.
0, 0, 1, 3, 2, 0, 7, 5, 4, 6, 1, 3, 14, 12, 11, 9, 8, 10, 13, 15, 2, 0, 7, 5, 28, 30, 25, 27, 22, 20, 19, 17, 16, 18, 21, 23, 26, 24, 31, 29, 4, 6, 1, 3, 14, 12, 11, 9, 56, 58, 61, 63, 50, 48, 55, 53, 44, 46, 41, 43, 38, 36, 35, 33, 32, 34, 37, 39, 42, 40, 47, 45, 52, 54, 49, 51, 62
Offset: 0
Examples
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.
Links
- Eric Weisstein's World of Mathematics, Game of Life
Crossrefs
Cf. A083713.
Programs
-
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)),","))}
Extensions
Edited and extended by Klaus Brockhaus, Jun 14 2003
Comments