13
$\begingroup$

The three-square theorem states that $n\in\mathbb N=\{0,1,2,\ldots\}$ is the sum of three squares if and only if it is not of the form $4^k(8m+7)$ ($k,m\in\mathbb N$). This was first proved by Legendre during 1797-1798. In 1837 Dirichlet proved his famous theorem on primes in arithmetic progressions. Now I can only find proofs of Legendre's three-square theorem using Dirichlet's theorem, see, e.g., M. B. Nathanson's book "Additive Number Theory-The Classical Bases" (GTM 164, Springer, 1996).

Legendre's original proof did not involve Dirichlet's theorem which was proved later. A proof without using Dirichlet's theorem might be self-contained and hence suitable for the course of elementary number theory.

QUESTION: Where can I find a proof of the three-square theorem without using Dirichlet's theorem?

$\endgroup$
1
  • $\begingroup$ I think the question is addressed in Vicky Neale's outreaching book "closing the gap" about Zhang's 2013 breakthrough and subsequent Polymath8b project. If I remember correctly, she uses quadratic forms as GH suggests in his answer below. $\endgroup$ Jun 16, 2018 at 22:10

1 Answer 1

13
$\begingroup$

I am not sure if Legendre's proof was complete (see this related MO entry), but surely Gauss gave a proof without Dirichlet's theorem (which came decades later).

A nice transparent proof (without Dirichlet's theorem) can be found in Serre's book "A course in arithmetic". Very roughly, the proof goes as follows. Assume that $n$ satisfies the necessary local conditions. Step 1: There exists a positive integer $t$ such that $t^2 n$ is the sum of three squares. This relies on the theory of quadratic forms over $\mathbb{Q}$. Step 2: The minimal $t$ that works in Step 1 is $t=1$. This relies on the following simple but key property: for any $(x_1,x_2,x_3)\in\mathbb{Q}^3$ there exists $(y_1,y_2,y_3)\in\mathbb{Z}^3$ such that $\sum (x_i-y_i)^2<1$.

$\endgroup$
8
  • 2
    $\begingroup$ @Zhi-WeiSun: I trust Serre and Weil more than Wikipedia. Serre's book proves Dirichlet's theorem, but later in the book (besides, I have read that book). Weil's historical book discusses issues with Legendre's proof of the three square theorem (not Gauss's refined version which relates the problem to class numbers). $\endgroup$
    – GH from MO
    Jun 17, 2018 at 0:56
  • 5
    $\begingroup$ @Zhi-WeiSun: Your question was "Where can I find a proof of the three-square theorem without using Dirichlet's theorem?". I just answered that. Serre's book has such a proof. BTW I don't think Legendre or Gauss had a simpler proof than Serre's book. $\endgroup$
    – GH from MO
    Jun 17, 2018 at 4:46
  • 1
    $\begingroup$ @GHfromMO this is the other question, but I am still curious how did Legendre or/and Gauss prove it (but I am lazy to ask a separate question, since a similar question already exists). $\endgroup$ Oct 25, 2020 at 22:34
  • 2
    $\begingroup$ @FedorPetrov: Gauss, using his genus theory, could give a formula for the number of primitive representations of $n$ as a sum of three squares. It equals $(24/w)h(-4n)$ when $n\equiv 1,2,5,6\pmod{8}$, and $(48/w)h(-n)$ when $n\equiv 3\pmod{8}$. Here $h(D)$ is the class number of primitive binary quadratic forms of discriminant $D$, and $w$ is the number of automorphs of such a form: $w=2$ for $D<-4$, $w=4$ for $D=-4$, $w=6$ for $D=-3$. This is in Gauss' Disquisitiones arithmeticae, $\S 291$, but I have not read the original source, nor do I know a good modern course. Continued in next remark. $\endgroup$
    – GH from MO
    Oct 26, 2020 at 4:17
  • 2
    $\begingroup$ Gauss's formula is a special case of Siegel's mass formula, which expresses the (weighted) average representation number over a genus of classes of primitive positive quadratic forms (in any number of variables) as a product of local densities. As the genus of $x^2+y^2+z^2$ consists of a single class, the averaging really equals the representation number sought, while the product of local densities returns $(24/\pi)\sqrt{n}L(1,\chi_{-4n})$ or $(24/\pi)\sqrt{n}L(1,\chi_{-n})$ depending on the residue of $n$ modulo $8$. Here $\chi_D$ denotes the unique primitive quadratic character modulo $D$. $\endgroup$
    – GH from MO
    Oct 26, 2020 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.