Prove the following:
If $n = p \times q$ where $p \equiv q \equiv 1 \pmod 4$ then we can write $n$ as a sum of two squares.
We assume $p, q$ are primes.
Since $p \equiv q \equiv 1 \pmod 4$, by Theorem (8.3), they can be written as a sum of two squares. So let's write $p=a^2 + b^2$ and $q=c^2 + d^2$.
By the Conversion Identity (8.1),
$$ n = p \times q = (a^2+b^2)(c^2 + d^2) = (ac-bd)^2 + (ad+bc)^2$$
And so $n$ can be written as the sum of two primes.