Fermat's two squares theorem tell us that every prime number $p \equiv 1 \pmod 4$ can be written in a unique way as $p = a^2 + b^2$ for two positive integers $a < b$. In particular, we can associate to $p$ an angle $\theta\_p = \arctan \frac{a}{b}$.


I am asking if it is known some result on the distribution of the values $\theta\_p$ in the interval $[0, \frac{\pi}{2}]$ as $p$ runs over the primes $p \leq x$, $p \equiv 1 \bmod 4$, and as $x$ goes to infinity.


I guess the should be somehow uniformly distributed.



A distribution related to Fermat's two squares theorem
Here is a good paper that can answer your question!
<https://arxiv.org/pdf/1705.07498.pdf>


