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.

A039770 Numbers k such that phi(k) is a perfect square.

Original entry on oeis.org

1, 2, 5, 8, 10, 12, 17, 32, 34, 37, 40, 48, 57, 60, 63, 74, 76, 85, 101, 108, 114, 125, 126, 128, 136, 160, 170, 185, 192, 197, 202, 204, 219, 240, 250, 257, 273, 285, 292, 296, 304, 315, 364, 370, 380, 394, 401, 432, 438, 444, 451, 456, 468, 489, 504, 505
Offset: 1

Views

Author

Keywords

Comments

A004171 is a subsequence because phi(2^(2k+1)) = (2^k)^2. - Enrique Pérez Herrero, Aug 25 2011
Subsequence of primes is A002496 since in this case phi(k^2+1) = k^2. - Bernard Schott, Mar 06 2023
Products of distinct terms of A002496 form a subsequence. - Chai Wah Wu, Aug 22 2025

Examples

			phi(34) = 16 = 4*4.
		

References

  • D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston MA, 1976, p. 141.

Crossrefs

Cf. A000010, A007614. A062732 gives the squares. A306882 (squares not totient).

Programs

  • Maple
    with(numtheory); isA039770 := proc (n) return issqr(phi(n)) end proc; seq(`if`(isA039770(n), n, NULL), n = 1 .. 505); # Nathaniel Johnston, Oct 09 2013
  • Mathematica
    Select[ Range[ 600 ], IntegerQ[ Sqrt[ EulerPhi[ # ] ] ]& ]
  • PARI
    for(n=1, 120, if (issquare(eulerphi(n)), print1(n, ", ")))
    
  • Python
    from math import isqrt
    from sympy import totient as phi
    def ok(n): return isqrt(p:=phi(n))**2 == p
    print([k for k in range(1, 506) if ok(k)]) # Michael S. Branicky, Aug 17 2025

Formula

a(n) seems to be asymptotic to c*n^(3/2) with 1 < c < 1.3. - Benoit Cloitre, Sep 08 2002
Banks, Friedlander, Pomerance, and Shparlinski show that a(n) = O(n^1.421). - Charles R Greathouse IV, Aug 24 2009

A272798 Carmichael numbers k such that Euler totient function of k (phi(k)) is a perfect square.

Original entry on oeis.org

1729, 63973, 75361, 172081, 278545, 340561, 658801, 997633, 1773289, 3224065, 5310721, 8719309, 8719921, 12945745, 13187665, 15888313, 17586361, 27402481, 29020321, 39353665, 40430401, 49333201, 67371265, 84417985, 120981601, 128697361, 129255841, 130032865, 151530401, 151813201, 158864833
Offset: 1

Views

Author

Altug Alkan, May 06 2016

Keywords

Comments

Subsequence of A262406.
If n is a Carmichael number, then phi(n) = Product_{primes p dividing n} (p-1).
So the question is: What are the Carmichael numbers n such that Product_{primes p dividing n} (p-1) is a square?
The number of prime divisors of terms of this sequence are 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, 5, 5, 5, 4, 4, 4, 4, 4, ...
1299963601 = 601*1201*1801 is the second term that has three prime divisors and it is a member of this sequence since 600*1200*1800 = 2^10*3^4*5^6 is a square.
This sequence is infinite. See links section for more details. - Altug Alkan, Jan 16 2017

Examples

			1729 is a term because A000010(1729) = 1729*(1-1/7)*(1-1/13)*(1-1/19) = 1296 = 36^2.
		

Crossrefs

Programs

  • PARI
    isA002997(n) = {my(f); bittest(n, 0) && !for(i=1, #f=factor(n)~, (f[2, i]==1 && n%(f[1, i]-1)==1)||return) && #f>1}
    lista(nn) = for(n=1, nn, if(isA002997(n) && issquare(eulerphi(n)), print1(n, ", ")));

Extensions

a(30) corrected by Amiram Eldar, Aug 11 2017
Showing 1-2 of 2 results.