%I #11 Dec 16 2019 20:11:15
%S 0,0,0,0,2,2,2,2,2,2,2,2,8,8,8,8,12,12,12,12,12,12,12,12,12,12,12,12,
%T 22,22,22,22,22,22,22,22,28,28,28,28,48,48,48,48,48,48,48,48,48,48,48,
%U 48,62,62,62,62,62,62,62,62,92,92,92,92,92,92,92,92,92,92,92,92,116,116,116,116,116,116,116,116
%N Sum of those x(p)*y(p) with p <= n, where p is a prime congruent to 1 modulo 4, and p = x(p)^2 + y(p)^2 with 1 <= x(p) <= y(p).
%C Conjecture: Let b(n) be the sum of all primes p <= n with p == 1 (mod 4). Then a(n)/b(n) = 1/Pi + O(1/sqrt(n)).
%C A classical theorem of Euler (conjectured by Fermat) states that any prime p == 1 (mod 4) can be written uniquely as x^2 + y^2 with 1 <= x <= y.
%C For any prime p == 1 (mod 4), we obviously have a(p) > a(p-1). Also, b(n) >= 2*a(n) for all n > 0 since x^2 + y^2 >= 2*x*y.
%C Via computation we find that a(10^10) = 353452066546904620, b(10^10) = 1110397615780409147, and 3.14157907 < b(10^10)/a(10^10) < 3.14157908.
%H Zhi-Wei Sun, <a href="/A330487/b330487.txt">Table of n, a(n) for n = 1..10000</a>
%H Zhi-Wei Sun, <a href="http://mathoverflow.net/questions/348448">A mysterious connection between prime and Pi</a>, Question 348448 at MathOverFlow, December 15, 2019.
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1911.05456">New series for powers of Pi and related congruences</a>, arXiv:1911.05456 [math.NT], 2019.
%e a(5) = 2 since 5 is the first prime congruent to 1 mod 4 and 5 = 1^2 + 2^2 with 1*2 = 2.
%e a(13) = 8 since 13 = 2^2 + 3^2 is the second prime congruent to 1 mod 4 and 1*2 + 2*3 = 8.
%t tab={};Do[m=0;Do[If[PrimeQ[(2x+1)^2+(2y)^2],m=m+(2x+1)*(2y)],{x,0,(Sqrt[n]-1)/2},{y,1,Sqrt[n-(2x+1)^2]/2}];tab=Append[tab,m],{n,1,80}];Print[tab]
%Y Cf. A000796, A002144, A002972, A002973.
%K nonn
%O 1,5
%A _Zhi-Wei Sun_, Dec 15 2019