login
A127432
a(0)=1. a(n) = number of earlier terms a(k), 0<=k<=n-1, such that (k+n) is divisible by a(k).
3
1, 1, 2, 2, 3, 4, 3, 4, 4, 5, 3, 7, 5, 5, 5, 5, 6, 8, 5, 4, 8, 8, 5, 9, 6, 6, 8, 8, 7, 9, 7, 9, 10, 9, 4, 10, 9, 8, 12, 7, 7, 11, 9, 9, 9, 12, 9, 13, 11, 7, 9, 12, 10, 12, 9, 9, 12, 12, 13, 13, 8, 10, 13, 14, 6, 12, 12, 12, 17, 10, 11, 14, 12, 12, 9, 14, 11, 16, 13, 12, 14, 13, 9, 16, 16, 12, 13
OFFSET
0,3
LINKS
EXAMPLE
(0+9) is a multiple of a(0)=1; (1+9) is a multiple of a(1)=1; (3+9) is a multiple of a(3)=2; (6+9) is a multiple of a(6)=3 and (7+9) is a multiple of a(7)=4. These five cases are the only cases where (k+n) is divisible by a(k), for 0<=k<=8. So a(9) = 5.
MATHEMATICA
f[l_List] := Block[{n = Length[l]}, Append[l, Count[Table[Mod[k + n - 1, l[[k]]], {k, n}], 0]]]; Nest[f, {1}, 87] (* Ray Chandler, Jan 22 2007 *)
PROG
(C) See Links section.
CROSSREFS
Sequence in context: A061295 A081742 A377079 * A199408 A285325 A135529
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Jan 14 2007
EXTENSIONS
Extended by Ray Chandler, Jan 22 2007
STATUS
approved