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$.



Behavior of a quantity related to Fermat's 4n + 1 Theorem
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.


