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-2 of 2 results.

A082897 Perfect totient numbers.

Original entry on oeis.org

3, 9, 15, 27, 39, 81, 111, 183, 243, 255, 327, 363, 471, 729, 2187, 2199, 3063, 4359, 4375, 5571, 6561, 8751, 15723, 19683, 36759, 46791, 59049, 65535, 140103, 177147, 208191, 441027, 531441, 1594323, 4190263, 4782969, 9056583, 14348907, 43046721
Offset: 1

Views

Author

Douglas E. Iannucci, Jul 21 2003

Keywords

Comments

It is trivial that perfect totient numbers must be odd. It is easy to show that powers of 3 are perfect totient numbers.
The product of the first n Fermat primes (A019434) is also a perfect totient number. There are 57 terms under 10^11. - Jud McCranie, Feb 24 2012
Terms 15, 255, 65535 and 4294967295 also belong to A051179 (see Theorem 4 in Loomis link). - Michel Marcus, Mar 19 2014
For the first 64 terms, a(n) is approximately 1.56^n. - Jud McCranie, Jun 17 2017
These numbers were first studied in 1939 by the Spanish mathematician Laureano Pérez-Cacho Villaverde (1900-1957). The term "perfect totient number" was coined by Venkataraman (1975). - Amiram Eldar, Mar 10 2021

Examples

			327 is a perfect totient number because 327 = 216 + 72 + 24 + 8 + 4 + 2 + 1. Note that 216 = phi(327), 72 = phi(216), 24 = phi(72) and so on.
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B41, pp. 147-150.
  • L. Pérez-Cacho, Sobre la suma de indicadores de órdenes sucesivos (in Spanish), Revista Matematica Hispano-Americana, Vol.5, No. 3 (1939), pp. 45-50.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 3, pp. 240-242.
  • D. L. Silverman, Problem 1040, J. Recr. Math., Vol. 14 (1982); Solution by R. I. Hess, ibid., Vol. 15 (1983).

Crossrefs

Cf. A092693 (sum of iterated phi(n)). See also A091847.

Programs

  • Maple
    with(numtheory):
    A082897_list := proc(N) local k,p,n,L;
    L := NULL;
    for n from 3 by 2 to N do
    k := 0; p := phi(n);
    while 1 < p do k := k + p; p := phi(p) od;
    if k + 1 = n then L := L,n fi
    od; L end: # Peter Luschny, Nov 01 2010
  • Mathematica
    kMax = 57395631; a = Table[0, {kMax}]; PTNs = {}; Do[e = EulerPhi[k]; a[[k]] = e + a[[e]]; If[k == a[[k]], AppendTo[PTNs, k]], {k, 2, kMax}]; PTNs
    perfTotQ[n_] := Plus @@ FixedPointList[ EulerPhi@ # &, n] == 2n + 1; Select[Range[1000], perfTotQ] (* Robert G. Wilson v, Nov 06 2010 *)
  • PARI
    S(n)={n=eulerphi(n);if(n==1,1,n+S(n))}
    for(n=2,1e3,if(S(n)==n,print1(n", "))) \\ Charles R Greathouse IV, Mar 29 2012; Corrected by Dana Jacobsen, Dec 16 2018
    
  • Perl
    use ntheory "euler_phi"; sub S { my $n=euler_phi(shift); return 1 if $n == 1; $n+S($n); }   for (2..1e4) { say if $==S($); } # Dana Jacobsen, Dec 16 2018
    
  • Python
    from itertools import count, islice
    from gmpy2 import digits
    from sympy import totient
    def A082897_gen(startvalue=3): # generator of terms >= startvalue
        for n in count((k:=max(startvalue,3))+1-(k&1),2):
            t = digits(n,3)
            if t.count('0') == len(t)-1:
                yield n
            else:
                m, s = n, 1
                while (m:=totient(m))>1:
                    s += m
                if s == n:
                    yield n
    A082897_list = list(islice(A082897_gen(),20)) # Chai Wah Wu, Mar 24 2023

Formula

n is a perfect totient number if S(n) = n, where S(n) = phi(n) + phi^2(n) + ... + 1, where phi is Euler's totient function and phi^2(n) = phi(phi(n)), ..., phi^k(n) = phi(phi^(k-1)(n)).
n such that n = A092693(n).
n such that 2n = A053478(n). - Vladeta Jovovic, Jul 02 2004
n log log log log n << a(n) <= 3^n. - Charles R Greathouse IV, Mar 22 2012

Extensions

Corrected by T. D. Noe, Mar 11 2004

A005537 Numbers m such that 4*3^m + 1 is prime.

Original entry on oeis.org

0, 1, 2, 3, 6, 14, 15, 39, 201, 249, 885, 1005, 1254, 1635, 3306, 3522, 9602, 19785, 72698, 233583, 328689, 537918, 887535, 980925, 1154598, 1499606, 1936890, 2016951, 2143374
Offset: 1

Views

Author

Keywords

Comments

a(27) > 1.5*10^6. - Matthias Baur, Jan 16 2020
a(20) > 2*10^5. - Robert Price, Nov 23 2013
Primes resulting from a(1)-a(19) are confirmed primes (not probable primes) using BLS (N-1/N+1) test in pfgw. - Robert Price, Nov 23 2013
From Matthias Baur, Jan 16 2020: (Start)
Double checked to n=2*10^5, tested further to n=1.5*10^6 using the sieve programs newpgen and srsieve and using Jean Penné's LLR application (BLS (N-1/N+1) test).
a(20) was already known in 2005, but was not listed here until 2018 (see Prime Pages link). (End)
Because of the factorization 4*x^4 + 1 = (2*x^2 - 2*x + 1)*(2*x^2 + 2*x + 1), the only term divisible by 4 is 0. - Jeppe Stig Nielsen, Sep 12 2024

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[n_]:=If[PrimeQ[4*3^n + 1 ], n]; DeleteCases[Array[a, 40, 0], Null] (* Stefano Spezia, Nov 12 2018 *)
  • PARI
    is_a(m) = isprime(4*3^m + 1) \\ Michel Marcus, Jul 12 2013

Extensions

a(15)-a(17) from Douglas Burke (dburke(AT)nevada.edu)
a(18) from Mohammed Bouayoun (Mohammed.Bouayoun(AT)sanef.com), Jan 26 2004
a(19) from Robert Price, Nov 23 2013
a(20)-a(21) from Matthias Baur, Nov 07 2018
a(22) from Matthias Baur, Dec 06 2018
a(23)-a(24) from Matthias Baur, Jul 23 2019
a(25) from Matthias Baur, Dec 07 2019
a(26) from Matthias Baur, Jan 16 2020
a(27)-a(29) from Ryan Propper, May 08 2020
Showing 1-2 of 2 results.