OFFSET
1,2
COMMENTS
This sequence is a permutation of the positive integers.
EXAMPLE
The positive integers which do not occur among the first 6 terms of the sequence are 4,6,8,9,10,12,... Of these integers, 9 is the smallest that is coprime to 14, the 7th composite. So a(7) = 9.
MATHEMATICA
f[l_List] := Block[{n = Length[l] + 1, c = 1, k = n}, While[k > 0, c++; While[PrimeQ[c], c++ ]; k--; ]; k = 1; While[MemberQ[l, k] || GCD[k, c] > 1, k++ ]; Append[l, k]]; Nest[f, {}, 75] (* Ray Chandler, Feb 07 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 03 2007
EXTENSIONS
Extended by Ray Chandler, Feb 07 2007
STATUS
approved