OFFSET
0,3
EXAMPLE
9 in binary is 1001, which has 2 ones. So a(9) is the sum of terms, from a(0) to are divisible by 2. a(2)=2, a(3)=2, a(4)=6, a(5)=10, a(6)=20, a(7)=6 and a(8)=48 are the earlier terms which are divisible by 2. So a(9) = 2+2+6+10+20+6+48 = 94.
MATHEMATICA
f[l_List] := Append[l, Plus @@ Select[l, Mod[ #, Plus @@ IntegerDigits[Length[l], 2]] == 0 &]]; Nest[f, {1}, 40] (* 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