OFFSET
1,4
COMMENTS
First occurrence of k or 0 if not present: 1,4,5,0,13,7,0,17,10,0,8,11,20,42,22,26,0,28,220,12. - Robert G. Wilson v, Nov 04 2006
EXAMPLE
a(11)= 12. Among the first 10 terms of the sequence a(1)=1, a(2)=1, a(3)=1, a(4)=2, a(5)=3, a(6)=3, a(7)=6 and a(9)=3 each divide 12. So a(12) = 1+1+1+2+3+3+6+3 = 20.
MATHEMATICA
f[ s_ ] := Append[ s, Plus @@ Select[ Most@s, Mod[ s[ [ -1 ] ], # ] == 0 & ] ];; Nest[ f, {1, 1}, 76 ] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Nov 04 2006
EXTENSIONS
More terms from Robert G. Wilson v, Nov 04 2006
STATUS
approved