I found the following condition: A positive integer $n$ is re-presentable as the sum of two squares, $n=x^2+y^2$ if and only if every prime divisor $p≡3$ mod $4$ of $n$ occurs with even exponent.
And $p$ is re-presentable as sum of $2$ squares only when $p≡1$ mod $4$, where $p$ is a prime.
$36=2^23^2$, here power of $3$ is $2$. Then how come $36$ cannot be represented as sum of $2$ squares, except the trivial case $6^2+0^2$?
What is the sufficient condition for $2$-square representation (not the trivial one) for any $n$?