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

A127433
a(1)=1. a(n) = number of earlier terms a(k), 1<=k<=n-1, 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
OFFSET
1,3
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] (* Ray Chandler, Jan 22 2007 *)
CROSSREFS
Sequence in context: A232113 A216475 A267807 * A055573 A238729 A182816
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 14 2007
EXTENSIONS
Extended by Ray Chandler, Jan 22 2007
STATUS
approved