Lagrange's four-square theorem

From HandWiki
Short description: Every natural number can be represented as the sum of four integer squares
Unlike in three dimensions in which distances between vertices of a polycube with unit edges excludes √7 due to Legendre's three-square theorem, Lagrange's four-square theorem states that the analogue in four dimensions yields square roots of every natural number

Lagrange's four-square theorem, also known as Bachet's conjecture, states that every natural number can be represented as a sum of four non-negative integer squares.[1] That is, the squares form an additive basis of order four. [math]\displaystyle{ p = a^2 + b^2 + c^2 + d^2 }[/math] where the four numbers [math]\displaystyle{ a, b, c, d }[/math] are integers. For illustration, 3, 31, and 310 in several ways, can be represented as the sum of four squares as follows: [math]\displaystyle{ \begin{align} 3 & = 1^2+1^2+1^2+0^2 \\[3pt] 31 & = 5^2+2^2+1^2+1^2 \\[3pt] 310 & = 17^2+4^2+2^2+1^2 \\[3pt] & = 16^2 + 7^2 + 2^2 +1^2 \\[3pt] & = 15^2 + 9^2 + 2^2 +0^2 \\[3pt] & = 12^2 + 11^2 + 6^2 + 3^2. \end{align} }[/math]

This theorem was proven by Joseph Louis Lagrange in 1770. It is a special case of the Fermat polygonal number theorem.

Historical development

From examples given in the Arithmetica, it is clear that Diophantus was aware of the theorem. This book was translated in 1621 into Latin by Bachet (Claude Gaspard Bachet de Méziriac), who stated the theorem in the notes of his translation. But the theorem was not proved until 1770 by Lagrange.[2]

Adrien-Marie Legendre extended the theorem in 1797–8 with his three-square theorem, by proving that a positive integer can be expressed as the sum of three squares if and only if it is not of the form [math]\displaystyle{ 4^k(8m+7) }[/math] for integers k and m. Later, in 1834, Carl Gustav Jakob Jacobi discovered a simple formula for the number of representations of an integer as the sum of four squares with his own four-square theorem.

The formula is also linked to Descartes' theorem of four "kissing circles", which involves the sum of the squares of the curvatures of four circles. This is also linked to Apollonian gaskets, which were more recently related to the Ramanujan–Petersson conjecture.[3]

Proofs

The classical proof

Several very similar modern versions[4][5][6] of Lagrange's proof exist. The proof below is a slightly simplified version, in which the cases for which m is even or odd do not require separate arguments.

Proof using the Hurwitz integers

Another way to prove the theorem relies on Hurwitz quaternions, which are the analog of integers for quaternions.[8]

Generalizations

Lagrange's four-square theorem is a special case of the Fermat polygonal number theorem and Waring's problem. Another possible generalization is the following problem: Given natural numbers [math]\displaystyle{ a,b,c,d }[/math], can we solve

[math]\displaystyle{ n=ax_1^2+bx_2^2+cx_3^2+dx_4^2 }[/math]

for all positive integers n in integers [math]\displaystyle{ x_1,x_2,x_3,x_4 }[/math]? The case [math]\displaystyle{ a=b=c=d=1 }[/math] is answered in the positive by Lagrange's four-square theorem. The general solution was given by Ramanujan.[9] He proved that if we assume, without loss of generality, that [math]\displaystyle{ a\leq b\leq c\leq d }[/math] then there are exactly 54 possible choices for [math]\displaystyle{ a,b,c,d }[/math] such that the problem is solvable in integers [math]\displaystyle{ x_1,x_2,x_3,x_4 }[/math] for all n. (Ramanujan listed a 55th possibility [math]\displaystyle{ a=1,b=2,c=5,d=5 }[/math], but in this case the problem is not solvable if [math]\displaystyle{ n=15 }[/math].[10])

Algorithms

In 1986, Michael O. Rabin and Jeffrey Shallit[11] proposed randomized polynomial-time algorithms for computing a single representation [math]\displaystyle{ n=x_1^2+x_2^2+x_3^2+x_4^2 }[/math] for a given integer n, in expected running time [math]\displaystyle{ \mathrm{O}(\log(n)^2) }[/math]. It was further improved to [math]\displaystyle{ \mathrm{O}(\log(n)^2 \log(\log(n))^{-1}) }[/math] by Paul Pollack and Enrique Treviño in 2018.[12]

Number of representations

Main page: Jacobi's four-square theorem

The number of representations of a natural number n as the sum of four squares of integers is denoted by r4(n). Jacobi's four-square theorem states that this is eight times the sum of the divisors of n if n is odd and 24 times the sum of the odd divisors of n if n is even (see divisor function), i.e.

[math]\displaystyle{ r_4(n)=\begin{cases}8\sum\limits_{m\mid n}m&\text{if }n\text{ is odd}\\[12pt] 24\sum\limits_{\begin{smallmatrix} m|n \\ m\text{ odd} \end{smallmatrix}}m&\text{if }n\text{ is even}. \end{cases} }[/math]

Equivalently, it is eight times the sum of all its divisors which are not divisible by 4, i.e.

[math]\displaystyle{ r_4(n)=8\sum_{m\,:\, 4\nmid m\mid n}m. }[/math]

We may also write this as [math]\displaystyle{ r_4(n) = 8 \sigma(n) -32 \sigma(n/4) \ , }[/math] where the second term is to be taken as zero if n is not divisible by 4. In particular, for a prime number p we have the explicit formula r4(p) = 8(p + 1).[13]

Some values of r4(n) occur infinitely often as r4(n) = r4(2mn) whenever n is even. The values of r4(n)/n can be arbitrarily large: indeed, r4(n)/n is infinitely often larger than 8log n.[13]

Uniqueness

The sequence of positive integers which have only one representation as a sum of four squares of non-negative integers (up to order) is:

1, 2, 3, 5, 6, 7, 8, 11, 14, 15, 23, 24, 32, 56, 96, 128, 224, 384, 512, 896 ... (sequence A006431 in the OEIS).

These integers consist of the seven odd numbers 1, 3, 5, 7, 11, 15, 23 and all numbers of the form [math]\displaystyle{ 2(4^k),6(4^k) }[/math] or [math]\displaystyle{ 14(4^k) }[/math].

The sequence of positive integers which cannot be represented as a sum of four non-zero squares is:

1, 2, 3, 5, 6, 8, 9, 11, 14, 17, 24, 29, 32, 41, 56, 96, 128, 224, 384, 512, 896 ... (sequence A000534 in the OEIS).

These integers consist of the eight odd numbers 1, 3, 5, 9, 11, 17, 29, 41 and all numbers of the form [math]\displaystyle{ 2(4^k),6(4^k) }[/math] or [math]\displaystyle{ 14(4^k) }[/math].

Further refinements

Lagrange's four-square theorem can be refined in various ways. For example, Zhi-Wei Sun[14] proved that each natural number can be written as a sum of four squares with some requirements on the choice of these four numbers.

One may also wonder whether it is necessary to use the entire set of square integers to write each natural as the sum of four squares. Eduard Wirsing proved that there exists a set of squares S with [math]\displaystyle{ |S| = O(n^{1/4}\log^{1/4} n) }[/math] such that every positive integer smaller than or equal n can be written as a sum of at most 4 elements of S.[15]

See also

Notes

  1. Number Theory, Dover Publications, 1994, p. 144, ISBN 0-486-68252-8 
  2. Ireland & Rosen 1990.
  3. Sarnak 2013.
  4. Landau 1958, Theorems 166 to 169.
  5. Hardy & Wright 2008, Theorem 369.
  6. Niven & Zuckerman 1960, paragraph 5.7.
  7. Here the argument is a direct proof by contradiction. With the initial assumption that m > 2, m < p, is some integer such that mp is the sum of four squares (not necessarily the smallest), the argument could be modified to become an infinite descent argument in the spirit of Fermat.
  8. 8.0 8.1 Stillwell 2003, pp. 138–157.
  9. Ramanujan 1917.
  10. Oh 2000.
  11. Rabin & Shallit 1986.
  12. Pollack & Treviño 2018.
  13. 13.0 13.1 Williams 2011, p. 119.
  14. Sun 2017.
  15. Spencer 1996.

References

External links