OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
MATHEMATICA
f[n_] := Block[{k = 0, m = Mod[Length[Divisors[n]], EulerPhi[n]] + 1}, While[m > 0, k++; While[GCD[n, k] > 1, k++ ]; m--; ]; k]; Table[f[n], {n, 100}] (* Ray Chandler, Oct 26 2006 *)
PROG
(PARI) A124330(n) = { my(k=1+(numdiv(n)%eulerphi(n))); for(i=1, oo, if(1==gcd(i, n), k--; if(!k, return(i)))); }; \\ Antti Karttunen, Feb 18 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet and Ray Chandler, Oct 26 2006
STATUS
approved