Sum of Squares

Dragonfall
Which squares are expressible as the sum of two squares? Is there a simple expression I can write down that will give me all of them? Some of them? Parametrization of the pythagorean triples doesn't seem to help.

Homework Helper
What do you mean by "parameterization of pythagorean triples"? If it's what I think you mean, I don't see why this wouldnt give you enough information for what you want to do.

Homework Helper
0 is a square, so really all of them. Excluding this trivial case, if c^2 can be written as c^2=a^2+b^2 where a and b are non zero, then we can divide by common factors to get d^2=e^2+f^2, where the terms are relatively prime.

Do you know any characterization of integers that can be written as sums of relatively prime squares (if not, what about primes)? Then you'd know c^2 would have to have a divisor of this form (conversely having a divisor of this form will ensure a representation).

Dragonfall
I worded the question wrong. I wanted to ask "given a square, how do I know if it can be written as the sum of two squares (except 0)". I got it now.