A245199 Numbers n where phi(n) and tau(n) are perfect squares.
1, 8, 10, 34, 57, 74, 85, 125, 185, 202, 219, 394, 451, 456, 489, 505, 514, 546, 570, 629, 640, 679, 680, 802, 985, 1000, 1026, 1057, 1154, 1285, 1354, 1365, 1387, 1417, 1480, 1717, 1752, 1938, 2005, 2016, 2047, 2176, 2190, 2340, 2457, 2509, 2565, 2594, 2649
Offset: 1
Examples
8 is in the sequence because phi(8) = 4, tau(8) = 4, and 4 is a perfect square. 12 is not in the sequence because tau(12) = 6 is not a square.
Links
- Robert Israel, Table of n, a(n) for n = 1..8000
Programs
-
Maple
filter:= proc(n) uses numtheory; issqr(phi(n)) and issqr(tau(n)) end proc: select(filter, [$1..1000]); # Robert Israel, Jul 27 2014
-
Mathematica
fQ[n_] := IntegerQ@ Sqrt@ EulerPhi[n] && IntegerQ@ Sqrt@ DivisorSigma[0, n]; Select[ Range@ 3000, fQ] (* Robert G. Wilson v, Jul 21 2014 *) Select[Range[3000],AllTrue[{Sqrt[EulerPhi[#]],Sqrt[DivisorSigma[0, #]]}, IntegerQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Apr 01 2018 *)
-
PARI
isok(n) = issquare(numdiv(n)) && issquare(eulerphi(n)); \\ Michel Marcus, Jul 15 2014
-
Python
from sympy import totient, divisor_count from gmpy2 import is_square [n for n in range(1,10**4) if is_square(int(divisor_count(n))) and is_square(int(totient(n)))] # Chai Wah Wu, Aug 04 2014
Comments