

A127433


a(1)=1. a(n) = number of earlier terms a(k), 1<=k<=n1, such that (k+n) is coprime to a(k).


2



1, 1, 2, 3, 2, 5, 4, 6, 4, 8, 5, 9, 7, 8, 8, 12, 9, 12, 9, 12, 13, 13, 14, 14, 14, 15, 17, 18, 13, 19, 18, 20, 21, 20, 22, 21, 22, 23, 20, 25, 22, 27, 23, 25, 26, 29, 29, 33, 27, 33, 29, 37, 32, 33, 33, 36, 33, 40, 34, 37, 37, 40, 37, 42, 38, 40, 41, 45, 37, 47, 42, 46, 45, 48, 46
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


LINKS

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


EXAMPLE

(1+9) is coprime to a(1)=1; (2+9) is coprime to a(2)=1; (4+9) is coprime to a(4)=3 and (8+9) is coprime to a(8)=6. These four cases are the only cases where (k+n) is coprime to a(k), for 1<=k<=8. So a(9) = 4.


MATHEMATICA

f[l_List] := Block[{n = Length[l] + 1}, Append[l, Count[Table[GCD[k + n, l[[k]]], {k, n  1}], 1]]]; Nest[f, {1}, 75] (*Chandler*)


CROSSREFS

Cf. A127431, A127434.
Sequence in context: A232113 A216475 A267807 * A055573 A238729 A182816
Adjacent sequences: A127430 A127431 A127432 * A127434 A127435 A127436


KEYWORD

nonn


AUTHOR

Leroy Quet, Jan 14 2007


EXTENSIONS

Extended by Ray Chandler, Jan 22 2007


STATUS

approved



