Intuition
A prime integer is equal to the sum of two squares if and only if it is congruent to mod .
Formal Statement
For odd prime ,
Equivalently, we have,
First seen in Álvaro’s book Number Theory and Geometry. Subsequently mentioned in class by Keith Conrad.