OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
William D. Banks, Florian Luca, Filip Saidak, and Igor E. Shparlinski, Values of arithmetical functions equal to a sum of two squares, Quarterly Journal of Mathematics, Vol. 56, No. 2 (2005), pp. 123-139, alternative link.
FORMULA
c1 * x/log(x)^(3/2) < N(x) < c2 * x/log(x)^(3/2), where N(x) is the number of terms <= x, and c1 and c2 are two positive constants (Banks et al., 2005).
EXAMPLE
1 is a term since phi(1) = 1 = 0^2 + 1^2.
MATHEMATICA
Select[Range[120], SquaresR[2, EulerPhi[#]] > 0 &]
PROG
(Python)
from itertools import count, islice
from sympy import factorint, totient
def A333909_gen(): # generator of terms
return filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(totient(n)).items()), count(1))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Apr 09 2020
STATUS
approved