OFFSET
1,2
EXAMPLE
The positive integers k, where every positive integer <= k and coprime to k is also coprime to 6, form the sequence 1,2,6,12,18,24,30,... So a(6) is the 6th of these integers, which is 24. (3, for example, is not among the sequence of k's because 2 is coprime to 3 and is <= 3, but 2 is not coprime to 6.)
MATHEMATICA
f[n_] := Select[Range[n], GCD[ #, n] == 1 &]; g[n_] := Block[{k = 0, c = n}, While[c > 0, k++; While[Times @@ GCD[f[k], n] > 1, k++ ]; c--; ]; k]; Table[g[n], {n, 60}] (* Ray Chandler, Dec 24 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 22 2006
EXTENSIONS
Extended by Ray Chandler, Dec 24 2006
STATUS
approved