I am looking for a demonstration of the formulas to decompose a prime $p\equiv 1$ $mod$ $4$ in the sum of two squares, cited in H. Davenport, The Higher Arithmetic. I have not found anything on the web. Thank you.
If $p=4k+1$ , with $p$ prime,
$p=x^2 + y^2$ , with
$x\equiv\frac{(2k)!}{2(k!)^2}$ $mod$ $p$
$y\equiv(2k)! x$ $mod$ $p$
and
$x < \frac{p}{2},y < \frac{p}{2}$