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”).

A127461
a(0)=1. a(n) = number of earlier terms a(k), 0<=k<=n-1, such that (k+a(k)) divides n.
2
1, 1, 2, 1, 4, 1, 3, 1, 6, 2, 2, 2, 6, 2, 3, 2, 6, 3, 5, 1, 6, 1, 5, 2, 8, 2, 4, 4, 5, 1, 6, 2, 7, 4, 4, 1, 10, 2, 3, 4, 8, 2, 4, 3, 7, 3, 6, 1, 11, 1, 4, 4, 7, 1, 9, 3, 7, 1, 4, 3, 11, 1, 6, 4, 7, 2, 8, 3, 7, 2, 4, 4, 12, 1, 6, 5, 5, 2, 7, 2, 10, 6, 3, 1, 9, 5, 4, 2, 9, 2, 11, 3, 8, 3, 3, 1, 14, 3, 3, 5, 10, 3
OFFSET
0,3
EXAMPLE
(a(0)+0) divides 6; (a(1)+1) divides 6; and (a(5)+5) divides 6. These 3 cases are the only cases where (a(k)+k) divides 6, for 0<=k<=5. So a(6)=3.
MATHEMATICA
f[l_List] := Block[{n = Length[l]}, Append[l, Count[Table[Mod[n, k - 1 + l[[k]]], {k, n}], 0]]]; Nest[f, {1}, 101] (* Ray Chandler, Jan 22 2007 *)
CROSSREFS
Sequence in context: A122458 A329644 A256578 * A329900 A101261 A214057
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 15 2007
EXTENSIONS
Extended by Ray Chandler, Jan 22 2007
STATUS
approved