OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..8000
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Muehlfeld, Jul 13 2014
STATUS
approved