Sum of two squares theorem explained

In number theory, the sum of two squares theorem relates the prime decomposition of any integer to whether it can be written as a sum of two squares, such that for some integers, .[1]

p\equiv3\pmod4

and is odd.

In writing a number as a sum of two squares, it is allowed for one of the squares to be zero, or for both of them to be equal to each other, so all squares and all doubles of squares are included in the numbers that can be represented in this way. This theorem supplements Fermat's theorem on sums of two squares which says when a prime number can be written as a sum of two squares, in that it also covers the case for composite numbers.

a2+b2=c2

gives a second representation for

c2

beyond the trivial representation

c2+02

.

Examples

The prime decomposition of the number 2450 is given by 2450 = 257. Of the primes occurring in this decomposition, 2, 5, and 7, only 7 is congruent to 3 modulo 4. Its exponent in the decomposition, 2, is even. Therefore, the theorem states that it is expressible as the sum of two squares. Indeed, .

The prime decomposition of the number 3430 is 257. This time, the exponent of 7 in the decomposition is 3, an odd number. So 3430 cannot be written as the sum of two squares.

Representable numbers

The numbers that can be represented as the sums of two squares form the integer sequence

0, 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, 29, 32, ...They form the set of all norms of Gaussian integers; their square roots form the set of all lengths of line segments between pairs of points in the two-dimensional integer lattice.

The number of representable numbers in the range from 0 to any number

n

is proportional to
n
\sqrt{logn
}, with a limiting constant of proportionality given by the Landau–Ramanujan constant, approximately 0.764.[2]

The product of any two representable numbers is another representable number. Its representation can be derived from representations of its two factors, using the Brahmagupta–Fibonacci identity.

Jacobi's two-square theorem

Jacobi's two-square theorem states

The number of representations of n as a sum of two squares is four times the difference between the number of divisors of n congruent to 1 modulo 4 and the number of divisors of n congruent to 3 modulo 4.
Hirschhorn gives a short proof derived from the Jacobi triple product.[3]

See also

Notes and References

  1. Book: Dudley, Underwood . Underwood Dudley . Elementary Number Theory . 1969 . W.H. Freeman and Company . Sums of Two Squares . 135–139.
  2. Rebák . Örs . 10.1080/00029890.2020.1668716 . 1 . . 4043992 . 80–83 . Generalization of a Ramanujan identity . 127 . 2020. 1612.08307 .
  3. Hirschhorn . Michael . 1985 . A simple proof of Jacobi's two-square theorem . Amer. Math. Monthly . 92 . 579–580.