OFFSET
1,2
COMMENTS
For which n's are n and a(n) coprime?
EXAMPLE
The primes < 8 and coprime to 8 are 3, 5 and 7. The positive integers which are coprime to these primes (i.e. which are coprime to 3*5*7) are 1, 2, 4, 8, 11, 13, 16, 17, 19, ...a(8) is the 8th of these integers, which is 17.
MATHEMATICA
f[n_] := Block[{c = n, k = 0, p}, p = Times @@ Select[Range[n - 1], PrimeQ[ # ] && GCD[ #, n] == 1 &]; While[c > 0, k++; While[GCD[k, p] > 1, k++ ]; c--; ]; k]; Table[f[n], {n, 61}] (* Ray Chandler, Dec 11 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 07 2006
EXTENSIONS
Extended by Ray Chandler, Dec 11 2006
STATUS
approved