Jump to content

Legendre's three-square theorem: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
a and b can be zero, and there is no universally accepted convention that includes zero in the natural numbers
Tags: Mobile edit Mobile app edit Android app edit App section source
 
(18 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{short description|Says when a natural number can be represented as the sum of three squares of integers}}

In [[mathematics]], '''Legendre's three-square theorem''' states that a [[natural number]] can be represented as the sum of three squares of integers
In [[mathematics]], '''Legendre's three-square theorem''' states that a [[natural number]] can be represented as the sum of three squares of integers


:<math>n = x^2 + y^2 + z^2</math>
:<math>n = x^2 + y^2 + z^2</math>


if and only if {{mvar|n}} is not [[of the form]] <math>n = 4^a(8b + 7)</math> for nonnegative integers {{mvar|a}} and {{mvar|b}}.
[[if and only if]] {{mvar|n}} is not of the form <math>n = 4^a(8b + 7)</math> for nonnegative integers {{mvar|a}} and {{mvar|b}}.

[[File:distances_between_double_cube_corners.svg|thumb|Distances between [[Vertex (geometry)|vertices]] of a double [[unit cube]] are [[square root]]s of the first six [[natural number]]s due to the [[Pythagorean theorem]] (√7 is not possible due to Legendre's three-square theorem)]]


The first numbers that cannot be expressed as the sum of three squares (i.e. numbers that can be expressed as <math>n = 4^a(8b + 7)</math>) are
The first numbers that cannot be expressed as the sum of three squares (i.e. numbers that can be expressed as <math>n = 4^a(8b + 7)</math>) are
:7, 15, 23, 28, 31, 39, 47, 55, 60, 63, 71 ... {{OEIS|A004215}}.
:7, 15, 23, 28, 31, 39, 47, 55, 60, 63, 71 ... {{OEIS|A004215}}.
{| class="wikitable" style="float:right;text-align:right;clear:right;font-size:85%;"
!{{diagonal split header|''b''|''a''}}
!0||1||2
|-
!0
|'''7'''||'''28'''||112
|-
!1
|'''15'''||'''60'''||240
|-
!2
|'''23'''||'''92'''||368
|-
!3
|'''31'''||124||496
|-
!4
|'''39'''||156||624
|-
!5
|'''47'''||188||752
|-
!6
|'''55'''||220||880
|-
!7
|'''63'''||252||1008
|-
!8
|'''71'''||284||1136
|-
!9
|'''79'''||316||1264
|-
!10
|'''87'''||348||1392
|-
!11
|'''95'''||380||1520
|-
!12
|103||412||1648
|-
|colspan="4" style="text-align:left;"|Unexpressible values<br />up to 100 are in bold
|}


== History ==
== History ==


[[Pierre de Fermat]] gave a criterion for numbers of the form 8''a''&nbsp;+&nbsp;1 and 8''a''&nbsp;+&nbsp;3 to be sums of a square plus twice another square, but did not provide a proof.<ref>{{Cite web|date=September 25, 1654|title=Fermat to Pascal|url=http://science.larouchepac.com/fermat/16540925%20Fermat%20to%20Pascal.pdf|url-status=live|archive-url=https://web.archive.org/web/20170705044320/http://science.larouchepac.com/fermat/16540925%20Fermat%20to%20Pascal.pdf|archive-date=July 5, 2017}}</ref> N. Beguelin noticed in 1774<ref>''Nouveaux Mémoires de l'Académie de Berlin'' (1774, publ. 1776), pp.&nbsp;313–369.</ref> that every positive integer which is neither of the form 8''n''&nbsp;+&nbsp;7, nor of the form 4''n'', is the sum of three squares, but did not provide a satisfactory proof.<ref>[[Leonard Eugene Dickson]], ''History of the theory of numbers'', vol. II, p.&nbsp;15 (Carnegie Institute of Washington 1919; AMS Chelsea Publ., 1992, reprint).</ref> In 1796 [[Carl Friedrich Gauss|Gauss]] proved his [[Eureka theorem]] that every positive integer ''n'' is the sum of 3 [[triangular number]]s; this is equivalent to the fact that 8''n''&nbsp;+&nbsp;3 is a sum of three squares. In 1797 or 1798 [[Adrien-Marie Legendre|A.-M. Legendre]] obtained the first proof of his 3 square theorem.<ref>A.-M. Legendre, ''Essai sur la théorie des nombres'', Paris, An VI (1797–1798), {{p.|202}} and pp.&nbsp;398–399.</ref> In 1813, [[Augustin Louis Cauchy|A. L. Cauchy]] noted<ref>A. L. Cauchy, ''Mém. Sci. Math. Phys. de l'Institut de France'', (1) 14 (1813–1815), 177.</ref> that Legendre's theorem is equivalent to the statement in the introduction above. Previously, in 1801, Gauss had obtained a more general result,<ref>C. F. Gauss, ''[[Disquisitiones Arithmeticae]]'', Art. 291 et 292.</ref> containing Legendre's theorem of 1797–8 as a corollary. In particular, Gauss counted the number of solutions of the expression of an integer as a sum of three squares, and this is a generalisation of yet another result of Legendre,<ref>A.-M. Legendre, ''Hist. et Mém. Acad. Roy. Sci. Paris'', 1785, pp.&nbsp;514–515.</ref> whose proof is incomplete. This last fact appears to be the reason for later incorrect claims according to which Legendre's proof of the three-square theorem was defective and had to be completed by Gauss.<ref>See for instance: Elena Deza and M. Deza. ''Figurate numbers''. World Scientific 2011, p.&nbsp;314 [https://books.google.com/books?id=cDxYdstLPz4C&dq=%22figurate+numbers%22+incomplete+legendre+gauss++-wikipedia&pg=PA314]</ref>
[[Pierre de Fermat]] gave a criterion for numbers of the form 3''a''&nbsp;+&nbsp;1 to be a sum of three squares, but did not provide a proof.
N. Beguelin noticed in 1774<ref>''Nouveaux Mémoires de l'Académie de Berlin'' (1774, publ. 1776), pp.&nbsp;313–369.</ref> that every positive integer which is neither of the form 8''n''&nbsp;+&nbsp;7, nor of the form 4''n'', is the sum of three squares, but did not provide a satisfactory proof.<ref>[[Leonard Eugene Dickson]], ''History of the theory of numbers'', vol. II, p.&nbsp;15 (Carnegie Institute of Washington 1919; AMS Chelsea Publ., 1992, reprint).</ref> In 1796 Gauss proved his [[Eureka theorem]] that every positive integer ''n'' is the sum of 3 [[triangular number]]s; this is equivalent to the fact that 8''n''&nbsp;+&nbsp;3 is a sum of three squares. In 1797 or 1798 [[Adrien-Marie Legendre|A.-M. Legendre]] obtained the first proof of his 3 square theorem.<ref>A.-M. Legendre, ''Essai sur la théorie des nombres'', Paris, An VI (1797–1798), {{p.|202}} and pp.&nbsp;398–399.</ref> In 1813, [[Augustin Louis Cauchy|A. L. Cauchy]] noted<ref>A. L. Cauchy, ''Mém. Sci. Math. Phys. de l'Institut de France'', (1) 14 (1813–1815), 177.</ref> that Legendre's theorem is equivalent to the statement in the introduction above. Previously, in 1801, [[Carl Friedrich Gauss|C. F. Gauss]] had obtained a more general result,<ref>C. F. Gauss, ''[[Disquisitiones Arithmeticae]]'', Art. 291 et 292.</ref> containing Legendre's theorem of 1797–8 as a corollary. In particular, Gauss counted the number of solutions of the expression of an integer as a sum of three squares, and this is a generalisation of yet another result of Legendre,<ref>A.-M. Legendre, ''Hist. et Mém. Acad. Roy. Sci. Paris'', 1785, pp.&nbsp;514–515.</ref> whose proof is incomplete. This last fact appears to be the reason for later incorrect claims according to which Legendre's proof of the three-square theorem was defective and had to be completed by Gauss.<ref>See for instance: Elena Deza and M. Deza. ''Figurate numbers''. World Scientific 2011, p.&nbsp;314 [https://books.google.ch/books?id=cDxYdstLPz4C&pg=PA314&lpg=PA314&dq=%22figurate+numbers%22+incomplete+legendre+gauss++-wikipedia&source=bl&ots=rAuaEsw2cA&sig=0wZEagVD2TzGjMVG1Xv_Cj-VYZo&hl=en&sa=X&ei=1ARgU7CuG4Kw4QSPqYG4BA&ved=0CCgQ6AEwAA#v=onepage&q=%22figurate%20numbers%22%20incomplete%20legendre%20gauss%20%20-wikipedia&f=false]</ref>


With [[Lagrange's four-square theorem]] and the [[Fermat's theorem on sums of two squares|two-square theorem]] of Girard, Fermat and Euler, the [[Waring's problem]] for ''k''&nbsp;=&nbsp;2 is entirely solved.
With [[Lagrange's four-square theorem]] and the [[Fermat's theorem on sums of two squares|two-square theorem]] of Girard, Fermat and Euler, the [[Waring's problem]] for ''k''&nbsp;=&nbsp;2 is entirely solved.
Line 17: Line 65:
== Proofs ==
== Proofs ==


The "only if" of the theorem is simply because [[Modular arithmetic|modulo]] 8, every square is congruent to 0, 1 or&nbsp;4. There are several proofs of the converse (besides Legendre's proof). One of them is due to [[Peter Gustav Lejeune Dirichlet|J. P. G. L. Dirichlet]] in 1850, and has become classical.<ref>See for instance vol. I, parts I, II and III of : [[Edmund Landau|E. Landau]], ''Vorlesungen über Zahlentheorie'', New York, Chelsea, 1927. Second edition translated into English by Jacob E. Goodman, Providence RH, Chelsea, 1958.</ref> It requires three main lemmas:
The "only if" of the theorem is simply because [[Modular arithmetic|modulo]] 8, every square is congruent to 0, 1 or&nbsp;4. There are several proofs of the converse (besides Legendre's proof). One of them is due to [[Peter Gustav Lejeune Dirichlet|Dirichlet]] (in 1850), and has become classical.<ref>See for instance vol. I, parts I, II and III of : [[Edmund Landau|E. Landau]], ''Vorlesungen über Zahlentheorie'', New York, Chelsea, 1927. Second edition translated into English by Jacob E. Goodman, Providence RH, Chelsea, 1958.</ref> It requires three main lemmas:
*the [[quadratic reciprocity]] law,
*the [[quadratic reciprocity]] law,
*[[Dirichlet's theorem on arithmetic progressions]], and
*[[Dirichlet's theorem on arithmetic progressions]], and
Line 29: Line 77:
== See also ==
== See also ==
* [[Fermat's two-square theorem]]
* [[Fermat's two-square theorem]]
* [[Sum of two squares theorem]]
* [[Legendre's equation]]


== Notes ==
== Notes ==
{{reflist}}
{{reflist|colwidth=30em}}


[[Category:Additive number theory]]
[[Category:Additive number theory]]

Latest revision as of 13:19, 19 November 2024

In mathematics, Legendre's three-square theorem states that a natural number can be represented as the sum of three squares of integers

if and only if n is not of the form for nonnegative integers a and b.

Distances between vertices of a double unit cube are square roots of the first six natural numbers due to the Pythagorean theorem (√7 is not possible due to Legendre's three-square theorem)

The first numbers that cannot be expressed as the sum of three squares (i.e. numbers that can be expressed as ) are

7, 15, 23, 28, 31, 39, 47, 55, 60, 63, 71 ... (sequence A004215 in the OEIS).
a
b
0 1 2
0 7 28 112
1 15 60 240
2 23 92 368
3 31 124 496
4 39 156 624
5 47 188 752
6 55 220 880
7 63 252 1008
8 71 284 1136
9 79 316 1264
10 87 348 1392
11 95 380 1520
12 103 412 1648
Unexpressible values
up to 100 are in bold

History

[edit]

Pierre de Fermat gave a criterion for numbers of the form 8a + 1 and 8a + 3 to be sums of a square plus twice another square, but did not provide a proof.[1] N. Beguelin noticed in 1774[2] that every positive integer which is neither of the form 8n + 7, nor of the form 4n, is the sum of three squares, but did not provide a satisfactory proof.[3] In 1796 Gauss proved his Eureka theorem that every positive integer n is the sum of 3 triangular numbers; this is equivalent to the fact that 8n + 3 is a sum of three squares. In 1797 or 1798 A.-M. Legendre obtained the first proof of his 3 square theorem.[4] In 1813, A. L. Cauchy noted[5] that Legendre's theorem is equivalent to the statement in the introduction above. Previously, in 1801, Gauss had obtained a more general result,[6] containing Legendre's theorem of 1797–8 as a corollary. In particular, Gauss counted the number of solutions of the expression of an integer as a sum of three squares, and this is a generalisation of yet another result of Legendre,[7] whose proof is incomplete. This last fact appears to be the reason for later incorrect claims according to which Legendre's proof of the three-square theorem was defective and had to be completed by Gauss.[8]

With Lagrange's four-square theorem and the two-square theorem of Girard, Fermat and Euler, the Waring's problem for k = 2 is entirely solved.

Proofs

[edit]

The "only if" of the theorem is simply because modulo 8, every square is congruent to 0, 1 or 4. There are several proofs of the converse (besides Legendre's proof). One of them is due to Dirichlet (in 1850), and has become classical.[9] It requires three main lemmas:

Relationship to the four-square theorem

[edit]

This theorem can be used to prove Lagrange's four-square theorem, which states that all natural numbers can be written as a sum of four squares. Gauss[10] pointed out that the four squares theorem follows easily from the fact that any positive integer that is 1 or 2 mod 4 is a sum of 3 squares, because any positive integer not divisible by 4 can be reduced to this form by subtracting 0 or 1 from it. However, proving the three-square theorem is considerably more difficult than a direct proof of the four-square theorem that does not use the three-square theorem. Indeed, the four-square theorem was proved earlier, in 1770.

See also

[edit]

Notes

[edit]
  1. ^ "Fermat to Pascal" (PDF). September 25, 1654. Archived (PDF) from the original on July 5, 2017.
  2. ^ Nouveaux Mémoires de l'Académie de Berlin (1774, publ. 1776), pp. 313–369.
  3. ^ Leonard Eugene Dickson, History of the theory of numbers, vol. II, p. 15 (Carnegie Institute of Washington 1919; AMS Chelsea Publ., 1992, reprint).
  4. ^ A.-M. Legendre, Essai sur la théorie des nombres, Paris, An VI (1797–1798), p. 202 and pp. 398–399.
  5. ^ A. L. Cauchy, Mém. Sci. Math. Phys. de l'Institut de France, (1) 14 (1813–1815), 177.
  6. ^ C. F. Gauss, Disquisitiones Arithmeticae, Art. 291 et 292.
  7. ^ A.-M. Legendre, Hist. et Mém. Acad. Roy. Sci. Paris, 1785, pp. 514–515.
  8. ^ See for instance: Elena Deza and M. Deza. Figurate numbers. World Scientific 2011, p. 314 [1]
  9. ^ See for instance vol. I, parts I, II and III of : E. Landau, Vorlesungen über Zahlentheorie, New York, Chelsea, 1927. Second edition translated into English by Jacob E. Goodman, Providence RH, Chelsea, 1958.
  10. ^ Gauss, Carl Friedrich (1965), Disquisitiones Arithmeticae, Yale University Press, p. 342, section 293, ISBN 0-300-09473-6