OFFSET
1,2
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
The smallest k such that phi(k)=2 is k=3, so a(2)=3.
MATHEMATICA
Module[{nn=140, ep}, ep=Table[{k, EulerPhi[k]}, {k, 0, nn}]; Table[SelectFirst[ep, #[[2]]==n&], {n, nn}]][[;; , 1]]/."NotFound"->0 (* Harvey P. Dale, Jul 29 2023 *)
PROG
(PARI) a(n)=if(n>2, for(k=n+1, solve(x=n, 2*n^2, x/(exp(Euler)*log(log(x))+3/log(log(x)))-n), if(eulerphi(k)==n, return(k))); 0, 2*n-1) \\ Charles R Greathouse IV, Nov 28 2012
(PARI) x=1000; v=vector(x\(exp(Euler)*log(log(x))+3/log(log(x)))); for(n=1, x, t=eulerphi(n); if(t<=#v && !v[t], v[t]=n)); v \\ Charles R Greathouse IV, Nov 28 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Jud McCranie, Oct 10 2000
STATUS
approved