The well known Sum of Two Squares Theorem states that an integer greater than one can be written as a sum of two squares if and only if its prime decomposition contains no prime congruent to $3\bmod4$ raised to an odd power.
I wondered about extending this to Gaussian Integers: which Gaussian Integers are expressible as the sum of two squares of two other Gaussian Integers?
After exploration with Mathematica, a clear pattern seemed to emerge, using which I made the following conjecture:
Given $z\in\mathbb{Z}[i]$, there exists${\space} z_1,z_2 \in\mathbb{Z}[i]$ such that
$z=z_1^2+z_2^2$ ${}$ iff ${}$ $\Im{(z)}\equiv{0\bmod4}$ ${}$ OR ${}$ $(\Im{(z)}\equiv{2\bmod4}\space\land\space\Re{(z)}\not\equiv2\bmod4)$.
Has this conjecture been made/proven before? If so, how can one prove it?