# Questions involving primes $p\equiv1\pmod4$

As claimed by Fermat and proved by Euler, any prime $$p\equiv1\pmod4$$ can be written uniquely as $$s_p^2+t_p^2$$ with $$s_p,t_p\in\{1,2,3,\ldots\}$$, $$2\nmid s_p$$ and $$2\mid t_p$$. For any positive integer $$n$$, let us define $$S(n):=\sum_{p\le n\atop p\equiv1\pmod4}s_p \ \ \ \text{and}\ \ \ T(n)=\sum_{p\le n\atop p\equiv1\pmod4}t_p.$$ Via computation, I have found that $$S(10^9)=334976550299,\ \ T(10^9)=334979004134,\ \ \frac{S(10^9)}{T(10^9)}\approx 0.99999267.$$ This leads me to pose the following conjecture.

Conjecture. We have $$\lim_{n\to+\infty}\frac{S(n)}{T(n)}=1.$$

QUESTION 1. Is the conjecture true? If true, how to prove it?

I have another question.

QUESTION 2. Is there a positive contant $$c$$ such that $$\lim_{n\to+\infty}\frac{\sum_{p\le n\atop p\equiv1\pmod4}s_t/t_p}{\sum_{p\le n\atop p\equiv1\pmod4}t_p/s_p}=c$$ holds?

Concerning this question, I conjecture that $$c$$ exists and its value is probably $$1$$. I have found that $$\frac{\sum_{p\le 10^{11}\atop p\equiv1\pmod4}s_t/t_p}{\sum_{p\le 10^{11}\atop p\equiv1\pmod4}t_p/s_p}\approx 0.896.$$

• Here matwbn.icm.edu.pl/ksiazki/aa/aa79/aa7935.pdf it is claimed that "E. Hecke [H] showed that Gaussian primes are equidistributed over arithmetic progressions within regular planar domains." Your conjecture concerns the Gaussian primes in the domain $\{x,y>0,x^2+y^2<n\}$ and progressions with difference 2. Dec 17 '19 at 16:36
• Your conjecture follows from Theorem 6 in chapter XV in the S. Lang's book "Algebraic Number Theory" (which is probably slightly more general than the result of E.Hecke). See also the discussion from this post: mathoverflow.net/questions/133410/hecke-equidistribution/133447 Dec 17 '19 at 21:34
• @DmitryKrachun I don't see why, the equidistribution is for the unique representative $|\pi|^2 = p$ with $arg(\pi) \in [0,\pi/4]$ (it follows from the PNT for the symmetric power L-functions of $\sum_{z\in \Bbb{Z}[i]} z^4|z|^{-4-2s}$) here the OP is taking a weird representative $arg(\pi) \in [0,\pi/2], 2\ |\ \Im(\pi)$. Dec 18 '19 at 7:50
• @DmitryKrachun We can take $arg(\pi) \in [0,\pi/2]$ if we look at the equidistribution of the $\pi$ (because each comes in pair with $i\overline{\pi}$), but if for each $p\equiv 1 \bmod 4$ we fix a representative $|\pi|^2 = p$ then we'll only have the equidistribution in $[0,\pi /4]$ Dec 18 '19 at 9:47
• I don't know if it helps but $\Bbb{Z}/(2+2i)^\times = 1,-1,i,-i$ so that $\sum_{z\in 1+(2+2i)\Bbb{Z}[i]} z |z|^{-2s} = \sum_n a_n n^{-s} = \exp(f(2s)+\sum_{p\equiv 1\bmod 4}a_pp^{-s})$ where $a_p = 2 \Re(\pi_p)=(-1)^{b_p}2s_p$, $s_p+it_p \equiv(-1)^{b_p}\bmod (2+2i)$ and the PNT for the Rankin Selberg L-function $\sum_na_n^2 n^{-s}$ gives $\sum_{p \le x}s_p^2\sim C\frac{x^2}{\log x}$. Then we can do the same with $\sum_na_n^{2k} n^{-s-k}$ and approach $\sum_{p\le x}\frac{t_p}{p^{1/2}}=\sum_{p\le x}\sqrt{1-\frac{s_p^2}{p}}$ by $\sum_{k\le K}(-1)^k{1/2\choose k}\sum_{p\le x}\frac{s_p^{2k}}{p^k}$ Dec 18 '19 at 21:55

For $$p\equiv1\bmod4$$, we write $$p=s_p^2+t_p^2=\sigma_p\overline{\sigma}_p,\ \ \ \sigma_p\in\mathbf{Z}[i].$$ Note that $$\sigma_p$$ and $$2$$ are coprime in $$\mathbf{Z}[i].$$ For each positive integer $$k$$, we would like to evaluate $$S_k(x):=\sideset{}{'}\sum_{\substack{\sigma_p\in\mathbf{Z}[i],\sigma_p\overline{\sigma}_p\leqslant x,\\ \sigma_p+\overline{\sigma}_p\equiv0\bmod4}}(\Re\sigma_p)^k =\sideset{}{'}\sum_{\substack{\sigma_p\in\mathbf{Z}[i],\sigma_p\overline{\sigma}_p\leqslant x,\\ \sigma_p+\overline{\sigma}_p\equiv0\bmod4}}(\sqrt{p}\cos\theta_p)^k,$$ where $$'$$ yields the restriction that $$\arg(\sigma_p)\in(0,\pi/2).$$ On the other hand, $$\sigma_p+\overline{\sigma}_p\equiv0\bmod4\Leftrightarrow \sigma_p^2+p\equiv0\bmod4\Leftrightarrow \sigma_p^2+1\equiv0\bmod4.$$ The last congruence is viewed $$\mathbf{Z}[i]$$, so that $$S_k(x)=\frac{1}{4}\sideset{}{'}\sum_{\substack{\sigma_p\in\mathbf{Z}[i],\sigma_p\overline{\sigma}_p\leqslant x,\\ \sigma_p^2+1\equiv0\bmod4}}(\sqrt{p}\cos\theta_p)^k.$$ Introducing multiplicative characters in $$(\mathbf{Z}[i]/4\mathbf{Z}[i])^\times$$, we may write $$S_k(x)=\frac{1}{4}\frac{1}{\Phi(4)}\sum_{\chi\in\widehat{(\mathbf{Z}[i]/4\mathbf{Z}[i])^\times}}\sum_{z\in\mathbf{Z}[i],z^2+1\equiv0\bmod4}\overline{\chi}(z)\sideset{}{'}\sum_{\sigma_p\in\mathbf{Z}[i],\sigma_p\overline{\sigma}_p\leqslant x}\chi(\sigma_p)(\sqrt{p}\cos\theta_p)^k,$$ where $$\Phi(4)=|(\mathbf{Z}[i]/4\mathbf{Z}[i])^\times|=8.$$ For each $$\chi$$, the sum $$\sideset{}{'}\sum_{\sigma_p\in\mathbf{Z}[i],\sigma_p\overline{\sigma}_p\leqslant x}\chi(\sigma_p)(\cos\theta_p)^k,$$ can be evaluated via Hecke's argument since \begin{align*} \chi(\sigma_p)e^{\ell i\theta_p}=\chi(\sigma_p)\Big(\frac{\sigma_p}{|\sigma_p|}\Big)^\ell \end{align*} gives a Hecke Grossencharacter at evaluated at $$\sigma_p.$$
Similarly, we can also consider \begin{align*} T_k(x):=\sideset{}{'}\sum_{\substack{\sigma_p\in\mathbf{Z}[i],\sigma_p\overline{\sigma}_p\leqslant x\\ \sigma_p-\overline{\sigma}_p\equiv0\bmod4}}(\Im\sigma_p)^k, \end{align*} which is related to the congruence $$z^2-1\equiv0\bmod4.$$
After a collection of serious arguments, we find the limit is equal to the ratio $$|\mathcal{A}|/|\mathcal{B}|$$ with $$\mathcal{A}=\{z\bmod4:z^2+1\equiv0\bmod4\},\ \ \ \mathcal{B}=\{z\bmod4:z^2-1\equiv0\bmod4\}.$$ In fact, \begin{align*} \mathcal{A}=\{i,3i,2+i,2+3i\bmod4\},\ \ \ \mathcal{B}=\{1,1+i,3,3+2i\bmod4\}. \end{align*} Hence $$|\mathcal{A}|/|\mathcal{B}|=1,$$ which proves the first conjecture.