This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A049283 #20 Nov 15 2024 07:00:20 %S A049283 1,3,0,5,0,7,0,15,0,11,0,13,0,0,0,17,0,19,0,25,0,23,0,35,0,0,0,29,0, %T A049283 31,0,51,0,0,0,37,0,0,0,41,0,43,0,69,0,47,0,65,0,0,0,53,0,81,0,87,0, %U A049283 59,0,61,0,0,0,85,0,67,0,0,0,71,0,73,0,0,0,0,0,79,0,123,0,83,0,129,0,0,0,89 %N A049283 a(n) is the smallest k such that phi(k) = n, where phi is Euler's totient function, or a(n) = 0 if no such k exists. %H A049283 T. D. Noe, <a href="/A049283/b049283.txt">Table of n, a(n) for n = 1..10000</a> %H A049283 Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp). %e A049283 The smallest k such that phi(k) = 2 is k = 3, so a(2) = 3. %t A049283 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 *) %o A049283 (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 %o A049283 (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 %o A049283 (PARI) a(n) = max(0, invphiMin(n)); \\ _Amiram Eldar_, Nov 15 2024, using _Max Alekseyev_'s invphi.gp %Y A049283 Cf. A000010, A014197, A057635. %K A049283 nonn %O A049283 1,2 %A A049283 _Jud McCranie_, Oct 10 2000