A358051 Squares k such that phi(k) is a cube.
1, 16, 1024, 2500, 5184, 50625, 65536, 160000, 331776, 810000, 3779136, 4194304, 4691556, 5345344, 7001316, 10240000, 16867449, 20820969, 21233664, 27060804, 36905625, 39062500, 51840000, 52200625, 228765625, 241864704, 268435456, 269879184, 300259584, 333135504
Offset: 1
Keywords
Links
- Project Euler, Problem 342. The totient of a square is a cube.
Programs
-
Mathematica
Select[Range[20000]^2, IntegerQ[Surd[EulerPhi[#], 3]] &] (* Amiram Eldar, Oct 27 2022 *)
-
PARI
isok(k) = issquare(k) && ispower(eulerphi(k), 3); \\ Michel Marcus, Oct 27 2022
-
Python
from sympy.ntheory.factor_ import totient from gmpy2 import * def isok(k): if is_square(k): j = isqrt(k) a,b = iroot(totient(j) * j, 3) return b
Formula
a(n) = A114076(n)^2. - Amiram Eldar, Oct 27 2022