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$?
If a square is divisible by a prime $p$ with $p \equiv 1 \pmod 4,$ then it can also be written as two nonzero squares added. Begin with the Pythagorean triple $(u,v, p^2)$ and then multiply throughout by the remaining factor of your original square.
so, say your square is $25 w^2.$ Note $3^2 + 4^2 = 25.$ Then $(3w)^2 + (4w)^2 = 25 w^2$
From comments: given some $n^2,$ where the only prime factors of $n$ are either $2$ or $q \equiv 3 \pmod 4,$ then we cannot express $n^2 = s^2 + t^2$ with both $s,t \neq 0$ integers.