OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
n=5: number of terms in invphi(10k) is 2,5,2,9,0,9,... for k=1,2,3,...; a(5)=5 because 0 appears at 5th position.
MAPLE
with(numtheory); a := proc(n) local m; for m from 1 do if (invphi(2*n*m)=[]) then return m end end end
MATHEMATICA
invphi[n_, plist_] := Module[{i, p, e, pe, val}, If[plist=={}, Return[If[n==1, {1}, {}]]]; val={}; p=Last[plist]; For[e=0; pe=1, e==0||Mod[n, (p-1)pe/p]==0, e++; pe*=p, val=Join[val, pe*invphi[If[e==0, n, n*p/pe/(p-1)], Drop[plist, -1]]]]; Sort[val]]; invphi[n_] := invphi[n, Select[1+Divisors[n], PrimeQ]]; a[n_] := For[m=1, True, m++, If[invphi[2n*m]=={}, Return[m]]] (* invphi[n, plist] is list of x with phi(x)=n and all prime divisors of x in plist. *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 27 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, May 28 2002
Edited and extended by Dean Hickerson, Jun 04 2002
STATUS
approved