Lagrange's four-square theorem, also known as Bachet's conjecture, states that every nonnegative integer can be represented as a sum of four non-negative integer squares. That is, the squares form an additive basis of order four. where the four numbers
a,b,c,d
This theorem was proven by Joseph Louis Lagrange in 1770. It is a special case of the Fermat polygonal number theorem.
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.[1]
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
4k(8m+7)
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.[2]
Several very similar modern versions[3] [4] [5] 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.
Another way to prove the theorem relies on Hurwitz quaternions, which are the analog of integers for quaternions.[6]
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
a,b,c,d
for all positive integers in integers
x1,x2,x3,x4
a=b=c=d=1
a\leqb\leqc\leqd
a,b,c,d
x1,x2,x3,x4
a=1,b=2,c=5,d=5
n=15
In 1986, Michael O. Rabin and Jeffrey Shallit[9] proposed randomized polynomial-time algorithms for computing a single representation
2 | |
n=x | |
4 |
O(log(n)2)
O(log(n)2log(log(n))-1)
See main article: 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.
Equivalently, it is eight times the sum of all its divisors which are not divisible by 4, i.e.
We may also write this aswhere 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 .[11]
Some values of r4(n) occur infinitely often as whenever n is even. The values of r4(n)/n can be arbitrarily large: indeed, r4(n)/n is infinitely often larger than 8.
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 ... .
These integers consist of the seven odd numbers 1, 3, 5, 7, 11, 15, 23 and all numbers of the form
2(4k),6(4k)
14(4k)
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 ... .
These integers consist of the eight odd numbers 1, 3, 5, 9, 11, 17, 29, 41 and all numbers of the form
2(4k),6(4k)
14(4k)
Lagrange's four-square theorem can be refined in various ways. For example, Zhi-Wei Sun[12] 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 with
|S|=O(n1/4log1/4n)