|
|
A127434
|
|
a(0)=1. a(n) = number of earlier terms a(k), 0<=k<=n-1, such that (k+n) is coprime to a(k).
|
|
3
|
|
|
1, 1, 2, 3, 3, 4, 4, 6, 4, 6, 7, 6, 7, 9, 8, 10, 10, 10, 9, 12, 10, 12, 15, 11, 14, 14, 14, 16, 17, 15, 16, 20, 16, 19, 21, 19, 20, 23, 19, 22, 25, 23, 27, 26, 25, 27, 31, 29, 28, 33, 29, 29, 37, 33, 34, 37, 33, 35, 37, 38, 36, 42, 38, 41, 43, 36, 41, 46, 42, 43, 47, 44, 46, 49, 42
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
EXAMPLE
|
(0+9) is coprime to a(0)=1; (1+9) is coprime to a(1)=1; (2+9) is coprime to a(2)=2; (4+9) is coprime to a(4)=3, (6+9) is coprime to a(6)=4; and (8+9) is coprime to a(8)=4. These six cases are the only cases where (k+n) is coprime to a(k), for 0<=k<=8. So a(9) = 6.
|
|
MATHEMATICA
|
f[l_List] := Block[{n = Length[l]}, Append[l, Count[Table[GCD[k + n - 1, l[[k]]], {k, n}], 1]]]; Nest[f, {1}, 75] (* Ray Chandler, Jan 22 2007 *)
|
|
PROG
|
(C) See Links section.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|