OFFSET
0,3
EXAMPLE
9 in binary is 1001, which has 2 ones. So a(9) is the number of terms, from a(0) to a(8), which are divisible by 2. a(0)=0, a(2)=2, a(3)=2, a(4)=4, a(5)=4 and a(8)=8 are the six earlier terms which are divisible by 2. So a(9) = 6.
MATHEMATICA
f[l_List] := Append[l, Count[Mod[l, Plus @@ IntegerDigits[Length[l], 2]], 0]]; Nest[f, {0}, 80] (* Ray Chandler, Oct 16 2006 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Oct 12 2006
EXTENSIONS
Extended by Ray Chandler, Oct 16 2006
STATUS
approved