If $p$ is a prime and $p \equiv 1 \bmod 4$, how many ways are there to write $p$ as a sum of two squares? Is there an explicit formulation for this?
There's a theorem that says that $p = 1 \bmod 4$ if and only if $p$ is a sum of two squares so this number must be at least 1. There's also the Sum of Two Squares Theorem for the prime factorization of integers and the Pythagorean Hypotenuse Proposition which says that a number $c$ is a hypotenuse if and only if it's a factor of $1 \bmod 4$ primes. All of these theorems only assert the existence of $1 \bmod 4$ primes as the sum of two squares. How do I (perhaps use these altogether) to find the exact number of different ways to write such prime as a sum of two squares?