Which Integers Are Sums of Two Squares?
A positive integer is a sum of two integer squares exactly when each prime congruent to three modulo four occurs to even exponent.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 1
- Reading time
- 1 min
For \(p\equiv3\bmod4\), if \(p\mid x^2+y^2\) and \(y\) is a unit modulo \(p\), then \(-1\) is a square, contradicting Euler’s criterion. Thus \(p\) divides both variables, and removing \(p^2\) repeats the argument. For \(p\equiv1\bmod4\), a square root of \(-1\) gives a proper Gaussian factor of \(p\), of norm \(p\).
\[N(zw)=N(z)N(w),\qquad N(a+bi)=a^2+b^2.\]
Combining prime representations
The prime \(2\) is the norm of \(1+i\), and even powers of primes \(3\bmod4\) are norms of rational integers. Multiplying by the norm factors for other primes proves sufficiency. For instance \(65=N((2+i)(3+2i))=4^2+7^2\).[1]