While reading up on quadratic reciprocity, I learned that if $p = 4k+1$ then $-1$ has a square root in $\mathbb{Z} / p \mathbb{Z}$.

Let $r_p$ be an integer with $0\leq r_p < p$ and $r_p^2 \equiv -1 \mod p$. How then is $\frac{r_p}{p} \in \mathbb{Q}$ distributed in $[0,1]$? Naively I would guess this is uniform distribution. How can we prove that?

**Edit** I noticed in the comments, it might be simpler to ask about the equidistribution of $$\{ \tfrac{1}{\sqrt{p}}(a,b): a^2 + b^2 = p\} \subset S^1$$

still in the case $p = 4k+1$.

somesquare root of $-1 \bmod p$ has a normalized ratio in there, i.e., count for large $x$ how many $p \leq x$ with $p \equiv 1 \bmod 4$ have an $r_p$ from $0$ to $p-1$ such that $r_p^2 \equiv -1 \bmod p$ and $a \leq r_p/p \leq b$. Then let $x \rightarrow \infty$ and look at asymptotics. Isn't that a sensible formulation? $\endgroup$