I know all primes, $p\equiv 1{\pmod 4}$ are the sum of two squares https://en.wikipedia.org/wiki/Fermat%27s_theorem_on_sums_of_two_squares
I vaguely recall that all composite integers, $x\equiv 1{\pmod 4}$ can also be expressed as the sum of two squares (and in more than one way), but I can’t remember, or find, a proof.
It’s certainly true all the examples I’ve tried, but please will somebody point me to a simple proof?
Update 10th August 2017 I can agree, at a push, that the candidate duplicate does provide an answer to this question, but I fail to see that it’s reasonable to expect me to recognise $$n = p_1.p_2.p_3 \cdots p_k.m^2$$ and $$x\equiv 1{\pmod 4}$$ as having the same meaning, especially as it was not flagged when I entered the question.
However, my question has been fully answered, so it matters little.
I apologise, both for posting and for forgetting such an elementary fact.