OFFSET
1,1
COMMENTS
All terms == 5 (mod 8). - Robert Israel, May 06 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
5 = 1^2 + 2^2 and Moebius(1)*Moebius(2) = (1) *(-1) = -1.
61 = 5^2 + 6^2 and Moebius(5)*Moebius(6) = (-1)*(1) = -1.
MAPLE
isA174053 := proc(n)
local x, y ;
if not isprime(n) then
return false;
end if;
for x from 1 do
if x^2 > n then
return false;
end if;
if issqr(n-x^2) then
y := sqrt(n-x^2) ;
if numtheory[mobius](x) * numtheory[mobius](y) = -1 then
return true;
end if;
end if;
end do:
end proc:
for n from 1 to 3000 do
if isA174053(n) then
printf("%d, \n", n) ;
end if;
end do:
# R. J. Mathar, Jul 09 2012
# alternative
N:= 10^5: # to get all terms <= N
SF:= select(numtheory:-issqrfree, [$1..floor(sqrt(N))]):
Mp, Mm:= selectremove(numtheory:-mobius=1, SF):
R:= select(t -> t <= N and isprime(t), {seq(seq(s^2+t^2, s=Mp), t=Mm)}):
sort(convert(R, list)); # Robert Israel, May 06 2019
MATHEMATICA
terms = 1000;
Reap[Do[p = x^2 + y^2; If[PrimeQ[p] && MoebiusMu[x] MoebiusMu[y] == -1, Sow[p]], {x, terms}, {y, x}]][[2, 1]] // Sort // Take[#, terms]& (* Jean-François Alcover, Aug 31 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 06 2010
STATUS
approved