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