Pythagorean prime

From Wikipedia, the free encyclopedia
Jump to: navigation, search
"Pythagorean number" redirects here. For the field invariant related to sums of squares, see Pythagoras number.
The Pythagorean prime 5 and its square root are both hypotenuses of integer-sided right triangles.

A Pythagorean prime is a prime number of the form 4n + 1. Pythagorean primes are exactly the odd prime numbers that are the sum of two squares.

Equivalently, by the Pythagorean theorem, they are the odd prime numbers p for which p is the length of the hypotenuse of a right triangle with integer sides, and they are also the prime numbers p for which p itself is the hypotenuse of a Pythagorean triangle. For instance, the number 5 is a Pythagorean prime; 5 is the hypotenuse of a right triangle with sides 1 and 2, and 5 itself is the hypotenuse of a right triangle with sides 3 and 4.

Values and density[edit]

The first few Pythagorean primes are

5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, … (sequence A002144 in OEIS).

By Dirichlet's theorem on arithmetic progressions, this sequence is infinite. More strongly, for each n, the numbers of Pythagorean and non-Pythagorean primes up to n are approximately equal. However, the number of Pythagorean primes up to n is frequently somewhat smaller than the number of non-Pythagorean primes; this phenomenon is known as Chebyshev's bias.[1] For example, the only values of n up to 600000 for which there are more Pythagorean than non-Pythagorean odd primes are 26861 and 26862.[2]

Representation as a sum of two squares[edit]

Every odd sum of two squares must be congruent to 1 mod 4, but there exist numbers such as 21 that are 1 mod 4 and yet cannot be represented as sums of two squares. Fermat's theorem on sums of two squares states that the prime numbers that can be represented as sums of two squares are exactly 2 and the odd primes congruent to 1 mod 4.[3] The representation of each such number is unique, up to the ordering of the two squares.[4]

By using the Pythagorean theorem, this representation can be interpreted geometrically: the Pythagorean primes are exactly the odd prime numbers p such that there exists a right triangle, with integer sides, whose hypotenuse has length p. They are also exactly the prime numbers p such that there exists a right triangle with integer sides whose hypotenuse has length p. For, if the triangle with sides x and y has hypotenuse length p (with x > y), then the triangle with sides x2 − y2 and 2xy has hypotenuse length p.[5]

Another way to understand this representation as a sum of two squares involves Gaussian integers, the complex numbers whose real part and imaginary part are both integers.[6] The norm of a Gaussian integer x + yi is the number x2 + y2. Thus, the Pythagorean primes (and 2) occur as norms of Gaussian integers, while other primes do not. Within the Gaussian integers, the Pythagorean primes are not considered to be prime numbers, because they can be factored as

p = (x + yi)(x − yi).

Similarly, their squares can be factored in a different way than their integer factorization, as

p2 = (x + yi)2(x − yi)2 = (x2 − y2 + 2xyi)(x2 − y2 − 2xyi).

The real and imaginary parts of the factors in these factorizations are the side lengths of the right triangles having the given hypotenuses.

Quadratic residues[edit]

The law of quadratic reciprocity says that if p and q are distinct odd primes, at least one of which is Pythagorean, then p is a quadratic residue mod q if and only if q is a quadratic residue mod p; by contrast, if neither p nor q is Pythagorean, then p is a quadratic residue mod q if and only if q is not a quadratic residue mod p.[7]

In the finite field Z/p with p a Pythagorean prime, the polynomial equation x2 = −1 has two solutions. This may be expressed by saying that −1 is a quadratic residue mod p. In contrast, this equation has no solution in the finite fields Z/p where p is an odd prime but is not Pythagorean.[8]

The Paley graph with 13 vertices

For every Pythagorean prime p, there exists a Paley graph with p vertices, representing the numbers modulo p, with two numbers adjacent in the graph if and only if their difference is a quadratic residue. This definition produces the same adjacency relation regardless of the order in which the two numbers are subtracted to compute their difference, because of the property of Pythagorean primes that −1 is a quadratic residue.[9]


  1. ^ Rubinstein, Michael; Sarnak, Peter (1994), "Chebyshev's bias", Experimental Mathematics 3 (3): 173–197, doi:10.1080/10586458.1994.10504289 .
  2. ^ Granville, Andrew; Martin, Greg (January 2006). "Prime Number Races". American Mathematical Monthly 113 (1): 1––33. doi:10.2307/27641834. JSTOR 27641834. 
  3. ^ Stewart, Ian (2008), Why Beauty is Truth: A History of Symmetry, Basic Books, p. 264, ISBN 9780465082377 .
  4. ^ LeVeque, William Judson (1996), Fundamentals of Number Theory, Dover, p. 183, ISBN 9780486689067 .
  5. ^ Stillwell, John (2003), Elements of Number Theory, Undergraduate Texts in Mathematics, Springer, p. 112, ISBN 9780387955872 .
  6. ^ Mazur, Barry (2010), "Algebraic numbers [IV.I]", in Gowers, Timothy, The Princeton Companion to Mathematics, Princeton University Press, pp. 315–332, ISBN 9781400830398  See in particular section 9, "Representations of Prime Numbers by Binary Quadratic Forms", p. 325.
  7. ^ LeVeque (1996), p. 103.
  8. ^ LeVeque (1996), p. 100.
  9. ^ Chung, Fan R. K. (1997), Spectral Graph Theory, CBMS Regional Conference Series 92, American Mathematical Society, pp. 97–98, ISBN 9780821889367 .

External links[edit]