Question:
If x, y, z is a primitive Pythagorean triple, prove that x+y and x-y are congruent modulo 8 to either 1 or 7.
If {x, y, z} is a primitive Pythagorean triple then x and y are of the form $\displaystyle m^2-n^2$ and $\displaystyle 2mn$, where gcd(m,n) = 1. Then $\displaystyle x\pm y = m^2 \pm2mn - n^2 = (m\pm n)^2 - 2n^2$. But the square of an odd number is always congruent to 1 (mod 8), and the square of an even number is congruent to 0 or 4 (mod 8). Since $\displaystyle m\pm n$ is odd, $\displaystyle (m\pm n)^2 - 2n^2$ will be congruent to 1 (mod 8) if n is even, and congruent to 1–2=–1, or equivalently 7, (mod 8) if n is odd.