%I #30 May 05 2021 18:20:31
%S 1,8,10,34,57,74,85,125,185,202,219,394,451,456,489,505,514,546,570,
%T 629,640,679,680,802,985,1000,1026,1057,1154,1285,1354,1365,1387,1417,
%U 1480,1717,1752,1938,2005,2016,2047,2176,2190,2340,2457,2509,2565,2594,2649
%N Numbers n where phi(n) and tau(n) are perfect squares.
%C Numbers n such that A000005(n) and A000010(n) are perfect squares.
%C Intersection of A036436 and A039770. - _Michel Marcus_, Jul 15 2014
%H Robert Israel, <a href="/A245199/b245199.txt">Table of n, a(n) for n = 1..8000</a>
%e 8 is in the sequence because phi(8) = 4, tau(8) = 4, and 4 is a perfect square.
%e 12 is not in the sequence because tau(12) = 6 is not a square.
%p filter:= proc(n) uses numtheory; issqr(phi(n)) and issqr(tau(n)) end proc:
%p select(filter, [$1..1000]); # _Robert Israel_, Jul 27 2014
%t fQ[n_] := IntegerQ@ Sqrt@ EulerPhi[n] && IntegerQ@ Sqrt@ DivisorSigma[0, n]; Select[ Range@ 3000, fQ] (* _Robert G. Wilson v_, Jul 21 2014 *)
%t 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 *)
%o (PARI) isok(n) = issquare(numdiv(n)) && issquare(eulerphi(n)); \\ _Michel Marcus_, Jul 15 2014
%o (Python)
%o from sympy import totient, divisor_count
%o from gmpy2 import is_square
%o [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
%Y Cf. A000005, A000010, A036436, A039770.
%K nonn,easy
%O 1,2
%A _Reinhard Muehlfeld_, Jul 13 2014