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.

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

This page as a plain text file.
%I A039770 #65 Aug 23 2025 10:02:13
%S A039770 1,2,5,8,10,12,17,32,34,37,40,48,57,60,63,74,76,85,101,108,114,125,
%T A039770 126,128,136,160,170,185,192,197,202,204,219,240,250,257,273,285,292,
%U A039770 296,304,315,364,370,380,394,401,432,438,444,451,456,468,489,504,505
%N A039770 Numbers k such that phi(k) is a perfect square.
%C A039770 A004171 is a subsequence because phi(2^(2k+1)) = (2^k)^2. - _Enrique Pérez Herrero_, Aug 25 2011
%C A039770 Subsequence of primes is A002496 since in this case phi(k^2+1) = k^2. - _Bernard Schott_, Mar 06 2023
%C A039770 Products of distinct terms of A002496 form a subsequence. - _Chai Wah Wu_, Aug 22 2025
%D A039770 D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston MA, 1976, p. 141.
%H A039770 T. D. Noe, <a href="/A039770/b039770.txt">Table of n, a(n) for n = 1..10000</a>
%H A039770 W. D. Banks, J. B. Friedlander, C. Pomerance and I. E. Shparlinski, <a href="http://math.dartmouth.edu/~carlp/PDF/banksfinal2.pdf">Multiplicative structure of values of the Euler function</a>, in High Primes and Misdemeanours: Lectures in Honour of the Sixtieth Birthday of Hugh Cowie Williams (A. Van der Poorten, ed.), Fields Inst. Comm. 41 (2004), pp. 29-47.
%H A039770 P. Pollack and C. Pomerance, <a href="http://www.math.dartmouth.edu/~carlp/squaretotients8.pdf">Square values of Euler's function</a>, submitted for publication.
%H A039770 Bernard Schott, <a href="/A039770/a039770.pdf">Subfamilies and subsequences</a>
%F A039770 a(n) seems to be asymptotic to c*n^(3/2) with 1 < c < 1.3. - _Benoit Cloitre_, Sep 08 2002
%F A039770 Banks, Friedlander, Pomerance, and Shparlinski show that a(n) = O(n^1.421). - _Charles R Greathouse IV_, Aug 24 2009
%e A039770 phi(34) = 16 = 4*4.
%p A039770 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
%t A039770 Select[ Range[ 600 ], IntegerQ[ Sqrt[ EulerPhi[ # ] ] ]& ]
%o A039770 (PARI) for(n=1, 120, if (issquare(eulerphi(n)), print1(n, ", ")))
%o A039770 (Python)
%o A039770 from math import isqrt
%o A039770 from sympy import totient as phi
%o A039770 def ok(n): return isqrt(p:=phi(n))**2 == p
%o A039770 print([k for k in range(1, 506) if ok(k)]) # _Michael S. Branicky_, Aug 17 2025
%Y A039770 Cf. A000010, A007614. A062732 gives the squares. A306882 (squares not totient).
%Y A039770 Cf. A068560, A114063, A078164.
%Y A039770 Subsequences: A054755, A002496, A004171, A262406, A324745, A324746, A247129, A324747, A306908.
%K A039770 nonn,easy,nice,changed
%O A039770 1,2
%A A039770 _Olivier Gérard_