For any prime $p\equiv\pm1\pmod5$, we can write $p$ uniquely in the form $x\_p^2+3x\_py\_p+y\_p^2$ with $x\_p,y\_p\in\mathbb Z$ and $x\_p>y\_p>0$. 


I have the following conjecture.


**Conjecture.** We have
$$\lim\_{N\to+\infty}\frac{\sum\_{p\le N\atop p\equiv\pm1\pmod5}(3x\_p^2+2x\_py\_p)}
{\sum\_{p\le N\atop p\equiv\pm1\pmod5}(3y\_p^2+2x\_py\_p)}=4.\tag{$\*$}$$


I have checked this conjecture via computation. For example,
\begin{align}\sum\_{p\le 2\times10^9\atop p\equiv\pm1\pmod5}(3x\_p^2+2x\_py\_p)=&88916125007243531,
\\\sum\_{p\le 2\times10^9\atop p\equiv\pm1\pmod5}(3y\_p^2+2x\_py\_p)=&22228898519387861,
\\\frac{88916125007243531}{22228898519387861}\approx&4.000023885.\end{align}


Similarly, any prime $p\equiv1\pmod3$ can be written uniquely as $u\_p^2+u\_pv\_p+v\_p^2$ with $u\_p,v\_p\in\mathbb Z$ and $u\_p>v\_p>0$, and I observe that
$$\lim\_{N\to+\infty}\frac{\sum\_{p\le N\atop p\equiv1\pmod3}(u\_p^2+2u\_pv\_p)}
{\sum\_{p\le N\atop p\equiv1\pmod3}(v\_p^2+2u\_pv\_p)}=2.$$
This is essentially provable in view of Hecke's equidistribution theorem.


**QUESTION.** How to prove the equality $(\*)$?



A conjecture for primes $p\equiv\pm1\pmod5$
Let us consider $\mathbb{Q}(\sqrt{5})$ as a subfield of $\mathbb{R}$. Let us also consider the positive fundamental unit $\epsilon:=(1+\sqrt{5})/2$, whose square generates the group of totally positive units. The conditions on $x\_p$, $y\_p$ can be rewritten as
$$p=x\_p^2+3x\_py\_p+y\_p^2\qquad\Longleftrightarrow\qquad p=(x\_p+\epsilon^2 y\_p)(x\_p+\epsilon^{-2} y\_p),$$
$$x\_p+\epsilon^{-2} y\_p<x\_p+\epsilon^2 y\_p<\epsilon^2(x\_p+\epsilon^{-2} y\_p)\qquad\Longleftrightarrow\qquad p^{1/2}<x\_p+\epsilon^2 y\_p<p^{1/2}\epsilon.$$
By Hecke's theorem, $\log(x\_p+\epsilon^2 y\_p)$ is equidistributed in $[\log(p^{1/2}),\log(p^{1/2}\epsilon)]$, cf. Example 3 in Ch. XV, §5 of Lang: Algebraic number theory. From here we get by a similar argument as in my response [here](https://mathoverflow.net/questions/348448/a-mysterious-connection-between-primes-and-pi) that
$$\lim\_{N\to+\infty}\frac{\sum\_{p\le N\atop p\equiv\pm1\pmod5}(3x\_p^2+2x\_py\_p)}
{\sum\_{p\le N\atop p\equiv\pm1\pmod5}(3y\_p^2+2x\_py\_p)}
=\frac{\int\_0^1 (3x(t)^2+2x(t)y(t))\,dt}{\int\_0^1 (3y(t)^2+2x(t)y(t))\,dt},$$
where the real functions $x,y:[0,1]\to\mathbb{R}$ are defined by the equations
$$\epsilon^{-1}x(t)+\epsilon y(t)=\epsilon^{-t}\qquad\text{and}\qquad
\epsilon x(t)+\epsilon^{-1}y(t)=\epsilon^t.$$
Solving for $x(t)$ and $y(t)$, the ratio of the two integrals turns out to be exactly $4$. This proves $(\ast)$.


