login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Squares k such that phi(k) is a cube.
0

%I #19 Dec 04 2022 16:32:44

%S 1,16,1024,2500,5184,50625,65536,160000,331776,810000,3779136,4194304,

%T 4691556,5345344,7001316,10240000,16867449,20820969,21233664,27060804,

%U 36905625,39062500,51840000,52200625,228765625,241864704,268435456,269879184,300259584,333135504

%N Squares k such that phi(k) is a cube.

%H Project Euler, <a href="https://projecteuler.net/problem=342">Problem 342. The totient of a square is a cube</a>.

%F a(n) = A114076(n)^2. - _Amiram Eldar_, Oct 27 2022

%t Select[Range[20000]^2, IntegerQ[Surd[EulerPhi[#], 3]] &] (* _Amiram Eldar_, Oct 27 2022 *)

%o (Python)

%o from sympy.ntheory.factor_ import totient

%o from gmpy2 import *

%o def isok(k):

%o if is_square(k):

%o j = isqrt(k)

%o a,b = iroot(totient(j) * j, 3)

%o return b

%o (PARI) isok(k) = issquare(k) && ispower(eulerphi(k), 3); \\ _Michel Marcus_, Oct 27 2022

%Y Cf. A000010, A114076.

%K nonn

%O 1,2

%A _DarĂ­o Clavijo_, Oct 27 2022