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 A006511 M1580 #37 Nov 14 2024 06:00:12 %S A006511 2,6,12,18,30,22,42,60,54,66,46,90,58,62,120,126,150,98,138,94,210, %T A006511 106,162,174,118,198,240,134,142,270,158,330,166,294,276,282,420,250, %U A006511 206,318,214,378,242,348,354,462,254,510,262,414,274,278,426,630,298,302 %N A006511 Largest inverse of totient function (A000010): a(n) is the largest x such that phi(x) = m, where m = A002202(n) is the n-th number in the range of phi. %C A006511 Always even, as phi(2n) = phi(n) when n is odd. - Alain Jacques (thegentleway(AT)bigpond.com), Jun 15 2006 %D A006511 J. W. L. Glaisher, Number-Divisor Tables. British Assoc. Math. Tables, Vol. 8, Camb. Univ. Press, 1940, p. 64. %D A006511 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A006511 T. D. Noe, <a href="/A006511/b006511.txt">Table of n, a(n) for n=1..10000</a> %H A006511 Max Alekseyev, <a href="https://oeis.org/wiki/User:Max_Alekseyev/gpscripts">PARI/GP Scripts for Miscellaneous Math Problems</a> (invphi.gp). %H A006511 Richard K. Guy, <a href="/A006511/a006511.pdf">Letter to N. J. A. Sloane, Jun 1991</a>. %F A006511 a(n) = A057635(A002202(n)). - _T. D. Noe_ %t A006511 phiinv[n_, pl_] := Module[{i, p, e, pe, val}, If[pl=={}, Return[If[n==1, {1}, {}]]]; val={}; p=Last[pl]; For[e=0; pe=1, e==0||Mod[n, (p-1)pe/p]==0, e++; pe*=p, val=Join[val, pe*phiinv[If[e==0, n, n*p/pe/(p-1)], Drop[pl, -1]]]]; Sort[val]]; phiinv[n_] := phiinv[n, Select[1+Divisors[n], PrimeQ]]; Last/@Select[phiinv/@Range[1, 200], #!={}&] (* phiinv[n, pl] = list of x with phi(x)=n and all prime divisors of x in list pl. phiinv[n] = list of x with phi(x)=n *) %o A006511 (Perl) use ntheory ":all"; my $k=1; for my $i (1..100) { my @v; do{@v=inverse_totient($k++)} until @v; print "$i $v[-1]\n"; } # _Dana Jacobsen_, Mar 04 2019 %o A006511 (PARI) g(n) = if(n%2, 2*(n==1), forstep(k = floor(exp(Euler)*n*log(log(n^2))+2.5*n/log(log(n^2))), n, -1, if(eulerphi(k)==n, return(k)); if(k==n, return(0)))); \\ A057635 %o A006511 lista(nn) = for(m = 1, nn, if(istotient(m), print1(g(m), ", "))); \\ _Jinyuan Wang_, Aug 29 2019 %o A006511 (PARI) lista(nmax) = my(s); for(n = 1, nmax, s = invphiMax(n); if(s > 0, print1(s, ", "))); \\ _Amiram Eldar_, Nov 14 2024, using _Max Alekseyev_'s invphi.gp %Y A006511 Cf. A000010, A002202, A002181, A057826. %Y A006511 For records see A036913, A132154, A036912. %K A006511 nonn %O A006511 1,1 %A A006511 _N. J. A. Sloane_