How are primes of the form 4k + 1 different from primes of the form 4k − 1 in sums of two squares?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

The French mathematician Pierre de Fermat identified a fundamental dichotomy between odd prime numbers based on their form, which significantly impacts their ability to be expressed as the sum of two squares.1

  • Primes of the form 4k + 1: Fermat asserted that any prime of this form can be written as the sum of two squares in one and only one way. For example, 5 can be expressed as 22+12 and 97 as 92+42, with no alternative decompositions possible.1
  • Primes of the form 4k - 1: In contrast, Fermat determined that a prime of this form cannot be written as the sum of two squares in any manner whatsoever. Examples such as 3 and 79 cannot be decomposed into the sum of two squares.1

This distinction regarding the representation of primes as sums of squares is considered one of the landmarks of number theory. While Fermat often omitted proofs for his discoveries, this specific theorem was later established by the mathematician Leonhard Euler.14