The Prime Number Theorem relates primes to the important constant $e$.


Here I report my following surprising discovery which relates primes to $\pi$.


**Conjecture** (December 15, 2019). Let $s(n)$ be the sum of all primes $p\le n$ with $p\equiv1\pmod4$, and let $s\_\*(n)$ be the sum of those $x\_py\_p$ with $p\le n$, where $p$ is a prime congruent to $1$ modulo $4$, and $p=x\_p^2+y\_p^2$ with $x\_p,y\_p\in\{1,2,3,\ldots\}$ and $x\_p\le y\_p$. Then 
$$\lim\_{n\to+\infty}\frac{s(n)}{s\_\*(n)} = \pi.$$


Recall that a classical theorem of Euler (conjectured by Fermat) states that any prime $p\equiv1\pmod4$ can be written uniquely as $x^2 + y^2$ with 
$x,y\in\{1,2,3,\ldots\}$ and $x\le y$. Since $x^2 + y^2 \ge 2xy$ for any real numbers $x$ and $y$, we have $s(n) \ge 2s\_\*(n)$ for all $n=1,2,3,\ldots$. 


I have created the sequence $(s\_\*(n))\_{n>0}$ for OEIS (cf. <http://oeis.org/A330487>). Via computation I found that 
$$s(10^{10}) = 1110397615780409147,\ \ s\_\*(10^{10}) = 353452066546904620, $$
and
$$ 3.14157907 < \frac{s(10^{10})}{s\_\*(10^{10})} < 3.14157908. $$
This looks an evidence to support the conjecture.


**QUESTION**. Is my above conjecture true? If true, how to prove it?


Any further check of the conjecture is welcome!



A mysterious connection between primes and $\pi$
Here is a proof of the conjecture. We shall use Hecke's theorem that the angles of the lattice points $(x\_p,y\_p)$ are asymptotically equidistributed in $[\pi/4,\pi/2]$, cf. [this MO post](https://mathoverflow.net/questions/133410/hecke-equidistribution/133447).


Let $t\_p\in[\pi/4,\pi/2]$ be the angle of the lattice point $(x\_p,y\_p)$. Let us divide the interval $[\pi/4,\pi/2]$ into $R$ subintervals of equal length, where $R$ is large but fixed. For $r\in\{1,\dotsc,R\}$, the $r$-th subinterval is
$$I\_r:=[u\_{r-1},u\_r]\qquad\text{with}\qquad u\_r:=\frac{\pi}{4}\left(1+\frac{r}{R}\right).$$
Observe that
$$\frac{\sin(2u\_r)}{2}\sum\_{\substack{p\leq n\\t\_p\in I\_r}}p\leq
\sum\_{\substack{p\leq n\\t\_p\in I\_r}}x\_p y\_p\leq
\frac{\sin(2u\_{r-1})}{2}\sum\_{\substack{p\leq n\\t\_p\in I\_r}}p.$$
By the quoted equidistribution theorem,
$$\sum\_{\substack{p\leq n\\t\_p\in I\_r}}p\sim\frac{s(n)}{R}\qquad\text{as}\qquad n\to\infty,$$
and so we infer that
$$\frac{1}{R}\sum\_{r=1}^R\frac{\sin(2u\_r)}{2}\leq
\liminf\_{n\to\infty}\frac{s\_\ast(n)}{s(n)}\leq
\limsup\_{n\to\infty}\frac{s\_\ast(n)}{s(n)}\leq
\frac{1}{R}\sum\_{r=1}^R\frac{\sin(2u\_{r-1})}{2}.$$
By letting $R\to\infty$, both sides tend to
$$\frac{4}{\pi}\int\_{\pi/4}^{\pi/2}\frac{\sin(2u)}{2}\,du=\frac{1}{\pi},$$
whence
$$\lim\_{n\to\infty}\frac{s\_\ast(n)}{s(n)}=\frac{1}{\pi}.$$


