cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

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.

Original entry on oeis.org

2, 6, 12, 18, 30, 22, 42, 60, 54, 66, 46, 90, 58, 62, 120, 126, 150, 98, 138, 94, 210, 106, 162, 174, 118, 198, 240, 134, 142, 270, 158, 330, 166, 294, 276, 282, 420, 250, 206, 318, 214, 378, 242, 348, 354, 462, 254, 510, 262, 414, 274, 278, 426, 630, 298, 302
Offset: 1

Views

Author

Keywords

Comments

Always even, as phi(2n) = phi(n) when n is odd. - Alain Jacques (thegentleway(AT)bigpond.com), Jun 15 2006

References

  • J. W. L. Glaisher, Number-Divisor Tables. British Assoc. Math. Tables, Vol. 8, Camb. Univ. Press, 1940, p. 64.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

For records see A036913, A132154, A036912.

Programs

  • Mathematica
    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 *)
  • 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
    lista(nn) = for(m = 1, nn, if(istotient(m), print1(g(m), ", "))); \\ Jinyuan Wang, Aug 29 2019
    
  • 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
  • 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
    

Formula

a(n) = A057635(A002202(n)). - T. D. Noe

A036913 Sparsely totient numbers; numbers n such that m > n implies phi(m) > phi(n).

Original entry on oeis.org

2, 6, 12, 18, 30, 42, 60, 66, 90, 120, 126, 150, 210, 240, 270, 330, 420, 462, 510, 630, 660, 690, 840, 870, 1050, 1260, 1320, 1470, 1680, 1890, 2310, 2730, 2940, 3150, 3570, 3990, 4620, 4830, 5460, 5610, 5670, 6090, 6930, 7140, 7350, 8190, 9240, 9660
Offset: 1

Views

Author

Keywords

Comments

The paper by Masser and Shiu lists 150 terms of this sequence less than 10^6. For odd prime p, they show that p# and p*p# are in this sequence, where p# denotes the primorial (A002110). - T. D. Noe, Jun 14 2006
Conjecture: Except for 2 and 18, all terms are Zumkeller numbers (A083207). Verified for the first 1800 terms. - Ivan N. Ianakiev, Sep 04 2022

Examples

			This sequence contains 60 because of all the numbers whose totient is <=16, 60 is the largest such number. [From _Graeme McRae_, Feb 12 2009]
From _Michael De Vlieger_, Jun 25 2017: (Start)
Positions of primorials A002110(k) in a(n):
     n     k       a(n) = A002110(k)
  ----------------------------------
     1     1                       2
     2     2                       6
     5     3                      30
    13     4                     210
    31     5                    2310
    69     6                   30030
   136     7                  510510
   231     8                 9699690
   374     9               223092870
   578    10              6469693230
   836    11            200560490130
  1169    12           7420738134810
  1591    13         304250263527210
  2149    14       13082761331670030
  2831    15      614889782588491410
  3667    16    32589158477190044730
  4661    17  1922760350154212639070
(End)
		

Crossrefs

Cf. A097942 (highly totient numbers). Records in A006511 (see also A132154).

Programs

  • Mathematica
    nn=10000; lastN=Table[0,{nn}]; Do[e=EulerPhi[n]; If[e<=nn, lastN[[e]]=n], {n,10nn}]; mx=0; lst={}; Do[If[lastN[[i]]>mx, mx=lastN[[i]]; AppendTo[lst,mx]], {i,Length[lastN]}]; lst (* T. D. Noe, Jun 14 2006 *)

A036912 Indices of the left-to-right maxima in A057635.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 20, 24, 32, 36, 40, 48, 64, 72, 80, 96, 120, 128, 144, 160, 176, 192, 224, 240, 288, 320, 336, 384, 432, 480, 576, 672, 720, 768, 864, 960, 1056, 1152, 1280, 1296, 1344, 1440, 1536, 1680, 1728, 1920, 2112, 2208, 2304, 2400, 2592, 2688
Offset: 1

Views

Author

Keywords

Comments

A number m belongs to this sequence iff A057635(k) < A057635(m) for all k
Indices of records in A057635(n), the maximal m with phi(m)=n.
The Alekseyev link in A131883 establishes the following explicit relationship between A131883, A036912 and A057635. Namely, for t belonging to A036912, we have t=A131883(A057635(t)-1). In other words, A036912(n) = A131883(A057635(A036912(n))-1) for all n.

Programs

  • Mathematica
    Block[{nn = 10^6, s, t, u}, s = PositionIndex@ Array[EulerPhi, nn]; t = ConstantArray[0, nn]; u = Take[ReplacePart[t, Map[# -> Last@ Lookup[s, #] &, Keys@ s]], 10^(Log10[nn] - 2)]; Map[FirstPosition[u, #][[1]] &, Union@ FoldList[Max, u]]] (* Michael De Vlieger, Oct 24 2017 *)

Formula

a(n) = A000010(A036913(n)). - Max Alekseyev, Nov 07 2007

Extensions

More precise definition from Max Alekseyev, Nov 07 2007
Showing 1-3 of 3 results.