

A127418


a(1)=1; for n>1, a(n) = the number of earlier terms a(k), 1<k<=n1, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



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.


LINKS

Table of n, a(n) for n=1..74.


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
Adjacent sequences: A127415 A127416 A127417 * A127419 A127420 A127421


KEYWORD

nonn


AUTHOR

Leroy Quet, Jan 13 2007


EXTENSIONS

Extended by Ray Chandler, Jan 22 2007


STATUS

approved



