login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A128978
a(1) = 1, a(2) = 1 and a(n) = number of terms among (a(1),a(2),...a(n-1)) which divide (a(n-1)+a(n-2)).
0
1, 2, 1, 2, 2, 5, 2, 2, 7, 2, 2, 9, 2, 2, 11, 2, 2, 13, 3, 13, 13, 16, 2, 16, 16, 17, 4, 4, 16, 17, 4, 4, 18, 15, 4, 2, 16, 18, 17, 4, 4, 22, 18, 23, 2, 3, 3, 19, 18, 2, 25, 6, 2, 25, 6, 2, 26, 27, 2, 2, 28, 28, 31, 2, 6, 29, 4, 6, 23, 3, 26, 3, 3, 32, 4, 46, 25, 2, 10, 42, 37, 2, 11, 5, 38, 2
OFFSET
1,2
COMMENTS
a(n) = 2 for n's: 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 23, 36, 45, 50, 53, 56, 59, 60, 64, 78, 82, 86, ....
First occurrence of k: 1, 2, 19, 27, 6, 52, 9, 186, 12, 79, 15, 255, 18, 107, 34, 22, 26, 33, 48, 134, 205, 42, 44, 381, 51, ....
MATHEMATICA
f[s_List] := Block[{}, Append[s, Count[ Mod[ s[[ -1]] + s[[ -2]], s], 0]]]; Nest[f, {1, 2}, 85] (* Robert G. Wilson v *)
CROSSREFS
Cf. A128923.
Sequence in context: A258783 A079318 A050315 * A325110 A357888 A145862
KEYWORD
nonn
AUTHOR
STATUS
approved