A385822 Numbers k such that phi(k) is not a perfect square.
3, 4, 6, 7, 9, 11, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 77, 78, 79, 80, 81, 82, 83, 84, 86, 87, 88, 89
Offset: 1
Examples
Since phi(35) = 24 and there is no integer n such that n^2 = 24.
Programs
-
Mathematica
Select[Range[100], !IntegerQ[Sqrt[EulerPhi[#]]] &] (* Amiram Eldar, Aug 18 2025 *)
-
PARI
isok(k) = !issquare(eulerphi(k)); \\ Michel Marcus, Aug 18 2025
-
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, 110) if ok(k)]) # Michael S. Branicky, Aug 17 2025