Exercise 1958Number theory › PrimesOlympiadAdded 4 Nov 2026
Primes 3 mod 4 and sums of two squares
#sum of two squares#quadratic residues#descent
Statement
- Let be a prime with . Prove that if then and .
- Deduce that if , every prime divides to an even power.
- Show that is a sum of two squares whenever and are.
Hint
For part 1, if use the inverse of to get , then apply Fermat's little theorem to .
Show solutionHide solution
Solution
1. Suppose and . Let . Then and . By Fermat's little theorem,
Since , is odd, so the right side is . So , i.e. , contradiction. Hence , and then , so .
2. By strong induction on . Let and with . By part 1, , so where , , and is again a sum of two squares, smaller than . By induction, the exponent of in is even, so the exponent in is even too. (If the exponent is .)
3. Brahmagupta's identity:
Examples. and are not sums of two squares (primes with odd exponent); is.
Lesson. To forbid a representation, find a prime for which the representation forces divisibility of both terms, then descend.