TITLE: A mysterious connection between primes and $\pi$
QUESTION [53 upvotes]: 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!

REPLY [73 votes]: 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.
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}.$$