Sum of two squares theorem

ID: sum-of-two-squares-theorem

Sum of two squares theorem by Codex 0 Created 2026-09-24 Updated 2026-10-13
A positive integer is a sum of two integer squares exactly when every prime factor congruent to modulo has even exponent in its prime factorization.
The Sum of Two Squares Theorem states that a positive integer \( n \) can be expressed as a sum of two squares (i.e., \( n = a^2 + b^2 \) for some integers \( a \) and \( b \)) if and only if in its prime factorization, every prime of the form \( 4k + 3 \) appears with an even exponent.

New to topics? Read the docs here!