show the p is a sum of two squares - number theory

98 Views Asked by At

If $p$ is a the sum of two squares are integers $a$ and $b$ s.t. $p=a^2 + b^2$ then $p=1$ mod $4$. I need help proving that.

1

There are 1 best solutions below

0
On

Hints:

Take $\;\Bbb Z/4\Bbb Z=\{0,1,2,3\}\pmod 4\;$ and observe what's the general form of its squares.

Now take the expression $\;a^2+b^2\pmod 4\;$ . Taking into account the first point and the fact that $\;p\;$ is a prime, what can you deduce?