# What is the sum of three squares

## Gauss's three-squares theorem

Transcript

1 Gauss's three-squares theorem As is well known, an odd prime number p is the sum of two square numbers if and only if p 1 mod 4. It follows that a positive integer n is the sum of two squares if and only if in the prime factorization of n all prime factors with p 3 mod 4 occur with an even multiplicity. Relatively easy to prove is Lagrange's theorem that every natural number is the sum of four square numbers. The case of sums of three squares is more difficult. Theorem 1 (Gauss's three-squares theorem). A positive integer n is the sum of three square numbers, () n = x x2 2 + x2 3, x i Z, if n = 4 k m with 4 m and m 7 mod 8. We now briefly show the necessity of the conditions. The square of an integer only takes the values 0,1,4 modulo 8. It follows that a natural number n 7 mod 8 cannot be the sum of three square numbers. All that remains to be shown is: If 4n is a sum of three squares, then n is too. This is seen like this: If 4n = xxx 2 3, then all xi must be even, and n is the sum of the square numbers (xi / 2) 2. We can only prove that the conditions are sufficient after some preparations. The following theorem shows that it is sufficient to solve a weakening of equation (). Sentence 2 (L. Aubry). Let n be a natural number. The equation n = x x2 2 + x2 3 has an integer solution (x 1, x 2, x 2) Z 3 if and only if the equation nt 2 = x x2 2 + x2 3 has a nontivial solution (t, x 1, x 2, x 2) Z 4. This is the elaboration of a chapter of the lecture Mathematical Miscell that I gave in the winter semester 2005/06 at the LMU Munich. Otto Forster error messages or other comments requested to Last changed on:

2 proof. We use the abbreviations x 2: = x 2 i and x, y: = xiyi for (x 1, x 2, x 3), (y 1, y 2, y 3) Z 3. Let nt 2 = x 2, (t, x) ZZ 3, t 0. We can assume t> 0. If t = 1, we are done. Let t> 1. Obviously, it is sufficient to find a t Z and an x Z 3 with 1 t

3 Legendre's equation The Legendre equation is understood as the Diophantine equation (1) ax 2 + by 2 + cz 2 = 0 where a, b, c are integers different from 0. By a solution of (1) we always understand an integer solution (x, y, z) Z 3 with (x, y, z) (0, 0, 0). It is clear that an integer solution exists if and only if there is a rational solution (x, y, z) Q 3 {(0, 0, 0)}. When treating the Legendre equation, one can restrict oneself to the case that the coefficients are free of squares, because with a = a 1 α 2, b = b 1 β 2, c = c 1 γ 2, ax 2 + by 2 + cz 2 = a 1 (αx) 2 + b 1 (βy) 2 + c 1 (γz) 2 For the proof of the three-squares theorem we only need the following special case. Movement 3 (Legendre). Let a, b Z {0} be square-free, relatively prime integers that are not both negative. The equation (2) ax 2 + by 2 = z 2 then has a solution (x, y, z) Z 3 {(0, 0, 0)} if the following conditions are met: (i) a is a square modulo b, (ii) b is a square modulo a. Proof. a) The necessity of the conditions. This part of the proof does not use the fact that a and b are coprime. Let (x, y, z) be a primitive solution, i.e. x, y, z have no common prime. We show that then x and b are coprime. Because a common prime divisor p of x and b would also be a divisor of z. From (2) it then follows p 2 by 2, and because b is square-free, p y, contradicts the primitiveness of the solution. From (2) it follows ax 2 z 2 mod b. Since x is invertible modulo b, this means that a is a square modulo b. We also show that b is a square modulo a. b) Conversely, suppose the conditions (i) and (ii) are now assumed, i.e. there are integers u 0, v 0 with u 2 0 a mod b and v2 0 b mod a. Since a and b are relatively prime, there are integers λ, µ with λa + µb = 1. We set u: = λau 0 = u 0 µbu 0, v: = µbv 0 = v 0 λav 0. 3

4 Thus u u 0 mod b, u 0 mod a and v v 0 mod a, v 0 mod b, i.e. u 2 a mod ab, uv 0 mod ab, v 2 b mod ab. With integer variables x, y, it therefore follows that (ux + vy) 2 (ax 2 + by 2) mod ab. (3) (ux + vy z) (ux + vy + z) (ax 2 + by 2 z 2) mod ab. We now determine a small solution of the congruence (4) ux + vy z 0 mod. For this we consider the set S: = {(x, y, z) Z 3: 0 x ** 1 is not a square number, so from is not an integer. It follows that S contains more grid points than ab. According to Dirichlet's drawer principle, there are therefore two different vectors (x i, y i, z i) S with ux 1 + vy 1 z 1 ux 2 + vy 2 z 2 mod. The difference (x, y, z): = (x 1 x 2, y 1 y 2, z 1 z 2) (0, 0, 0) then satisfies (4) and we have (5) ax 2 **

5 From (6) 2 we get (7) ax 2 ab = a (x 2 b) = z 2 by 2. With the norm function N (s + tb): = (s + tb) (stb) = s 2 bt 2 in the number ring Z [b] can also be written as follows: an (x + b) = N (z + yb). Multiplying this by x 1: = N (x + b), because of the multiplicativity of the norm, one obtains (ax 2 1 = N (z + yb) (x +) (b) = N (zx + by) + (z + xy)) b) = z1 2 by1, 2 where z 1: = zx + by, y 1: = z + xy. We have thus found a solution to equation (2), q.e.d. From theorem 3 we can now derive the decisive aid for the proof of the three-squares theorem. Lemma 4. Let n be a square-free natural number. a) If n 1 mod 4 or n 2 mod 4, there is a prime number p 1 mod 4, so that Legendre's equation (8) nx 2 py 2 = z 2 can be solved. b) If n 3 mod 8, there is a prime number p 1 mod 4, so that Legendre's equation (9) nx 2 2py 2 = z 2 can be solved. Proof. The proof uses Dirichlet's prime number theorem: If k, m are coprime natural numbers, then there are infinitely many prime numbers p with pk mod m. A1) We first treat the case that n 1 mod 4. According to Dirichlet's prime number theorem, there is a prime number p with p 2n 1 mod 4n 5

6 This means that p 1 mod 4 and p is relatively prime to n. According to Theorem 3, we only have to show: (i) n is a square modulo p. (ii) p is a square modulo n. To (i) Since p 1 mod n, (n (p = = p) n) (1) = (1) (n 1) / 2 = 1. n where uses the quadratic reciprocity law. To (ii) Since p mod n, p is a trivial square modulo n. A2) Let n 2 mod 4. We choose a prime number p with p n 1 mod 4n Again p 1 mod 4 and p is relatively prime to n. In addition, p 1 mod n applies. We set n = 2m. Then m is odd. We have (n (2) (m) (2) (p (2) (1) = = =. P) pppm) pm We now differentiate between two cases: If m 1 mod 4, then n 2 mod 8, i.e. p 1 mod 8. Then (1 m) = 1 and (2 p) = 1 (according to the 2nd supplementary sentence to the reciprocity law). This implies (n p) = 1, i.e. condition (i) is fulfilled. If m 3 mod 4, then n 6 mod 8, i.e. p 5 mod 8. Then (1) = 1 and m (2) = 1, i.e. p (n) = 1, ie condition (i) is also fulfilled . p Because p 1 mod n p is a square modulo n. By Theorem 3, (8) is therefore solvable. b) If n 3 mod 8, n 2 is relatively prime to 4n, so there is a prime p with p n 2 mod 4n. Again p 1 mod 4 and p is relatively prime to n. We have (n (p = = p) n) (2) = n (1) (2 = (1) (1) = 1. n n) From this it follows: n is square modulo p, thus also modulo 2p. Since p 2 mod n, 2p 4 mod n follows, so 2p is a square modulo n. Therefore, according to Theorem 3, equation (9) can be solved. 6th

7 Proof of the three-squares theorem It suffices to prove the theorem for square-free n. Because from n = mk 2 with an odd number k follows nm mod 8. So let n be a natural number with n 0, 4, 7 mod 8. If n 1, 2, 5, 6 mod 8, according to Lemma 4 we can have one Find the prime number p 1 mod 4, so that the equation nx 2 py 2 = z 2 has a non-trivial integer solution. Since p 1 mod 4, p is the sum of two square numbers, p = u 2 + v 2, u, v Z. It follows that nx 2 = z 2 + (uy) 2 + (vy) 2. From Theorem 2 it follows that n is the sum of three square numbers. In the remaining case n 3 mod 8, according to Lemma 4, there is a prime number p 1 mod 4, so that the equation nx 2 2py 2 = z 2 has a non-trivial integer solution. 2p is also the sum of two square numbers, because from p = u 2 + v 2 follows 2p = (u + v) 2 + (u v) 2. So one can conclude as above. This proves the three-squares theorem. Incidentally, Lagrange's four-squares theorem is a simple consequence of the three-squares theorem. Because either a natural number n is already a sum of three squares or of the form n = 4 km with m 7 mod 8. But then n (2 k) 2 = 4 k (m 1) is the sum of three squares and therefore n is the sum of four squares. Triangular numbers. A triangle number is a natural number of the form m: = m k = k = 1 m (m + 1). 2 Corollar 5. Every natural number n is the sum of three triangular numbers. Proof. The number N: = 8n + 3 is according to sentence 1 the sum of three square numbers, which are necessarily all odd: N = 8n + 3 = (2m i + 1) 2 = (4m 2 i + 4m i + 1) = 8 mi (mi + 1) 2 + 3, so n = m1 + m2 + m3, qed 7th

8 References [1] J.H. Conway: The sensual (quadratic) form. Carus Mathematical Monograph No. 26. Mathematical Association of America [2] Scharlau / Opolka: From Fermat to Minkowski. Springer [3] J.P. Serre: Cours d Arithmetique. PUF

- Are there creative clubs at SVCE
- Which religions contradict the big bang theory?
- Why is corn oil used for biodiesel
- Is stress an effect or a cause
- Has anyone played Olymp Trade?
- Will life ever go my way
- How does the Japanese keyboard work
- Can anyone play cricket
- What are some facts about the Bermuda Triangle
- Is a narcissistic grandiose and a perfectionist
- Why do they call it patent leather
- Was there English during Mahabharata
- What are the different types of mollusks
- How do medical staples work
- What's bothering you this week
- Do smartphone screen protectors really work?
- Is it a mental state
- Is 1280x800 better than 1080p
- Can cycling relieve back pain
- What is the best eyelash glue
- Are actors and artists just themselves
- What cyber security attacks occurred in 2017
- What were Hitler's bad habits
- What's the catchiest song ever written