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

A127418
a(1)=1; for n>1, a(n) = the number of earlier terms a(k), 1<k<=n-1, such that (a(k)+n) is coprime to k.
1
1, 1, 1, 3, 1, 5, 3, 6, 4, 7, 3, 10, 8, 8, 10, 11, 7, 11, 10, 13, 13, 14, 10, 18, 15, 16, 16, 17, 13, 20, 20, 16, 23, 21, 17, 25, 24, 21, 23, 25, 19, 30, 25, 25, 25, 29, 23, 36, 29, 29, 32, 33, 26, 41, 28, 37, 32, 37, 30, 41, 32, 41, 33, 42, 32, 51, 36, 44, 39, 43, 38, 52, 41, 44
OFFSET
1,4
COMMENTS
The value of a(1) = 1 is arbitrary. a(1) can be any integer and the rest of the sequence would remain unchanged.
EXAMPLE
a(1)+11 = 12 is coprime to 1; a(5)+11 = 12 is coprime to 5; and a(8)+11 = 17 is coprime to 8. These 3 are the only cases where (a(k)+11) is coprime to k, for 1 <=k <=10. So a(11) = 3.
MATHEMATICA
f[l_List] := Block[{n = Length[l] + 1}, Append[l, Count[Table[GCD[l[[k]] + n, k], {k, n - 1}], 1]]]; Nest[f, {1}, 74] (* Ray Chandler, Jan 22 2007 *)
CROSSREFS
Cf. A127417.
Sequence in context: A109606 A318727 A307806 * A099550 A349341 A099549
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 13 2007
EXTENSIONS
Extended by Ray Chandler, Jan 22 2007
STATUS
approved