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(2)=2, a(4)=4, a(5)=2 and a(8)=8 are the four earlier terms divisible by 2. So a(9) = 4.
MATHEMATICA
f[l_List] := Append[l, Count[Mod[l, Plus @@ IntegerDigits[Length[l], 2]], 0]]; Nest[f, {1}, 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