%I #12 Aug 31 2020 12:20:12
%S 5,61,109,149,157,229,269,317,389,397,461,509,557,653,701,773,797,877,
%T 941,997,1013,1061,1093,1181,1229,1277,1453,1493,1613,1637,1733,1877,
%U 1949,1973,1997,2141,2237,2309,2333,2357,2477,2693,2837,2909,2957,3253
%N Prime numbers of the form x^2+y^2 such that Moebius(x)* Moebius(y) = -1
%C All terms == 5 (mod 8). - _Robert Israel_, May 06 2019
%H Robert Israel, <a href="/A174053/b174053.txt">Table of n, a(n) for n = 1..10000</a>
%e 5 = 1^2 + 2^2 and Moebius(1)*Moebius(2) = (1) *(-1) = -1.
%e 61 = 5^2 + 6^2 and Moebius(5)*Moebius(6) = (-1)*(1) = -1.
%p isA174053 := proc(n)
%p local x,y ;
%p if not isprime(n) then
%p return false;
%p end if;
%p for x from 1 do
%p if x^2 > n then
%p return false;
%p end if;
%p if issqr(n-x^2) then
%p y := sqrt(n-x^2) ;
%p if numtheory[mobius](x) * numtheory[mobius](y) = -1 then
%p return true;
%p end if;
%p end if;
%p end do:
%p end proc:
%p for n from 1 to 3000 do
%p if isA174053(n) then
%p printf("%d,\n",n) ;
%p end if;
%p end do:
%p # _R. J. Mathar_, Jul 09 2012
%p # alternative
%p N:= 10^5: # to get all terms <= N
%p SF:= select(numtheory:-issqrfree, [$1..floor(sqrt(N))]):
%p Mp,Mm:= selectremove(numtheory:-mobius=1,SF):
%p R:= select(t -> t <= N and isprime(t), {seq(seq(s^2+t^2,s=Mp),t=Mm)}):
%p sort(convert(R,list)); # _Robert Israel_, May 06 2019
%t terms = 1000;
%t 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 *)
%Y Cf. A008683, A174049, A002313.
%K nonn
%O 1,1
%A _Michel Lagneau_, Mar 06 2010
|