Sum of two squares theorem (source code)

= Sum of two squares theorem
{wiki}

A positive integer is a sum of two integer squares exactly when every prime factor congruent to $3$ modulo $4$ has even exponent in its prime factorization.