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?


1 Answer 1


The problem is solved in I. Niven, Integers of quadratic fields as sums of squares, Trans. Amer. Math. Soc. 48 (1940), no. 3, 405–417. See also Dasheng Wei, On the sum of two integral squares in quadratic fields ${\bf Q}(\sqrt{\pm p})$.

The Niven paper is available at https://www.ams.org/journals/tran/1940-048-03/S0002-9947-1940-0003000-5/S0002-9947-1940-0003000-5.pdf

Theorem 2 states, in part, A Gaussian integer of the form $a+2bi$ is expressible as a sum of two squares of Gaussian integers if and only if not both $a/2$ and $b$ are odd integers.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.