# Behavior of a quantity related to Fermat's 4n + 1 Theorem

One of Fermat's theorems states that if $p = 4n + 1$ for some integer $n$, then $p$ can be expressed uniquely as a sum of two squares, $p = a^2 + b^2$. I am working on a problem and I would like to know if anyone can estimate the quantity $\frac{\sqrt{p_{n,4}}}{\max(a_p,b_p)}$ where $p_{n,4}$ is the $n$-th prime such that $p = 4k + 1$ for some integer $k$.

-

What kind of estimate are you looking for? Your quantity is between $1$ and $2$, clearly and should oscillate between the two value, probably uniformly. It is widely believed that there are infinitely many primes of the form $n^2+1$ or $n^2+(n+1)^2$ which should give the extremes of the interval.
The quantity is governed by the solutions modulo $p$ of the congruence $x^2+1 \equiv 0 \pmod p$ and, I believe there is a paper of Friedlander and Iwaniec showing that the root of this equation is uniformly distributed in the interval $[1,p]$ in the natural sense.
You meant $\sqrt{2}$ not $2$, no? –  Chris Wuthrich Jun 7 '13 at 22:38
Thank you. I was looking for the supremum and soon after I posted I realized it is obviously $\sqrt{2}$. –  Mustafa Said Jun 7 '13 at 23:11
Yes. $\sqrt{2}$, thanks. –  Felipe Voloch Jun 7 '13 at 23:51