# Thread: sum of squares proof

1. ## sum of squares proof

If p is prime where p = x^2 + y^2 and p ≡ +/- 1 mod 10, then 5 | xy.

So far, I know that if p can be written as a sum of two squares, then p ≡ 1 mod 4, so x^2 + y^2 ≡ 1 mod 4, and x^2 + y^2 ≡ +/- 1 mod 10. Where do I go from here?

2. Originally Posted by uberbandgeek6
If p is prime where p = x^2 + y^2 and p ≡ +/- 1 mod 10, then 5 | xy.

So far, I know that if p can be written as a sum of two squares, then p ≡ 1 mod 4, so x^2 + y^2 ≡ 1 mod 4, and x^2 + y^2 ≡ +/- 1 mod 10. Where do I go from here?
Hints:

1) $\displaystyle \mbox{What is }p\!\!\pmod 5\mbox{ ?}$

2) $\displaystyle \forall n\in\mathbb{Z}\,,\,\mbox{what is }n^2\!\!\pmod 5\mbox{ ?}$

3) $\displaystyle \forall\,n,m\in\mathnn{Z}\,,\,\mbox{what can possibly be }n^2+m^2\!\!\pmod 5\mbix{ ?}$

Tonio

3. Okay, so if p ≡ +/- 1 mod 10, then p ≡ 1 or 4 mod 5. The quadratic residues mod 5 are 1 and 4, so any n^2 is 0, 1, or 4 mod 5. Then one of x^2 or y^2 is 0 mod 5 and the other is 1 or 4 (depending on whether p is 1 or -1 mod 10). That means either x or y is 0 mod 5, so xy is 0 mod 5. Is that it?

4. Originally Posted by uberbandgeek6
Okay, so if p ≡ +/- 1 mod 10, then p ≡ 1 or 4 mod 5. The quadratic residues mod 5 are 1 and 4, so any n^2 is 0, 1, or 4 mod 5. Then one of x^2 or y^2 is 0 mod 5 and the other is 1 or 4 (depending on whether p is 1 or -1 mod 10). That means either x or y is 0 mod 5, so xy is 0 mod 5. Is that it?

Yup...as simple as that.

Tonio