Académique Documents
Professionnel Documents
Culture Documents
1
Contents
1 Introduction 3
2
1 Introduction
This paper discusses whether an integer n ∈ Z, n ≥ 0 can be represented as a sum of of squared
integers
n = x21 + x22 + ... + x2k , (1)
where x1 , x2 , ..., xk ∈ Z and the number of squares is fixed. In other words, we find the sets of
integers
Sk = {n | n = x21 + x22 + ... + x2k } (2)
for different values of k ∈ Z+ .
We will be considering the cases k = 2, k = 3 and k = 4, and prove some defining properties for
these sets.
Ultimately, we will prove that all non-negative numbers can be represented as the sum of four
integers squares
S4 = N0 = {0, 1, 2, 3, ...}. (4)
3
2 Sums of Two Squares
2.1 Sums of two squares for small values
By trying out small values in the equation
xy = (a21 + b21 )(a22 + b22 ) = a21 a22 + a21 b22 + b21 a22 + b21 b22 . (8)
On the other hand, (a1 a2 + b1 b2 )2 + (a1 b2 − b1 a2 )2 is the sum of two squares and
(a1 a2 +b1 b2 )2 +(a1 b2 −b1 a2 )2 = (a21 a22 +2a1 a2 b1 b2 +b21 b22 )+(a21 b22 −2a1 a2 b1 b2 +b21 a22 ) = a21 a22 +a21 b22 +b21 a22 +b21 b22 .
(9)
Now, by combining (7) and (8), we get
which means the product of x and y can be represented as a sum of two squares.
p−1
Now p ≡ 1 mod(4) so 2 is even. Therefore by applying Euler’s criterion to a = −1 we get
p−1 −1
(−1) 2 ≡ 1 mod(p) ⇐⇒ = 1. (13)
p
Therefore −1 is a square modulo p, which means that there is an integer u such that 0 ≤ u ≤ p − 1
and
u2 ≡ −1 mod(p) (14)
4
u2 + 1 ≡ 0 mod(p) (15)
This means that there is an integer r such that 0 < r < p and
u2 + 1 = rp (16)
Thus, rp is the sum of two squares
rp = u2 + 12 ∈ S2 (17)
Now there is a smallest integer m such that mp ∈ S2 . If m = 1 then p ∈ S2 , which we wanted to
prove. We can then assume that m > 1.
Now mp ∈ S2 so mp = a21 + b22 for some integers a1 and b1 . Let a2 and b2 now be the least
absolute residues of a1 and b1 modulo m. In other words, let a2 and b2 be the numbers such that
m2
a2 ≡ a1 and b2 ≡ b1 mod(m) and |a2 |, |b2 | ≤ m 2 2 m 2
2 . This means that a2 + b2 ≤ 2( 2 ) = 2 Now
2
a22 + b22 ≡ a21 + b21 ≡ mp ≡ 0 mod(m) so a22 + b22 = sm for some s ∈ Z. Then sm = a22 + b22 ≤ m2 ,
so s ≤ m 2 , which means that s < m.
If s = 0 then a22 + b22 = sm = 0, so a2 = b2 = 0. Then a1 ≡ a2 ≡ 0 mod(m) and b1 ≡ b2 ≡ 0
mod(m). Thus m2 | a21 and m2 | b21 , and therefore m2 | a21 + b21 = mp, which means that m | p.
This is a contradiction, since 1 ≤ m ≤ p and p is a prime. Therefore 0 ≤ s ≤ m.
Now (a21 + b21 )(a22 + b22 ) = (mp)(sm) = m2 sp and from the proof of Lemma 2.1 we get that
m2 sp = (a21 + b21 )(a22 + b22 ) = (a1 a2 + b1 b2 )2 + (a1 b2 − b1 a2 )2 . (18)
Since a1 a2 + b1 b2 ≡ a21 + b21 ≡ mp ≡ 0 mod(m), (a1 a2 + b1 b2 ) is divisible by m so a1 b2 − b1 a2 must
−b1 a2 2
also be divisible by m. This means that ( a1 a2m ) and ( a1 b2m
+b1 b2 2
) are integer squares and by
2
dividing both sides of (18) by m we get
a1 a2 + b1 b2 2 a1 b2 − b1 a2 2
sp = ( ) +( ) . (19)
m m
Therefore, sp is the sum of two squares, which is a contradiction because m is the smallest positive
integer such that mp ∈ S2 but now sp ∈ S2 and 0 ≤ s ≤ m. Therefore the assumption that m ≥ 1
is false and m = 1 so mp = p can be represented as the sum of two squares.
5
Therefore −1 is a square modulo q. However, q ≡ 3 mod(4) so q−1
2 is odd so by applying Euler’s
criterion to −1 we get
q−1 −1
(−1) 2 ≡ −1 mod(q) ⇐⇒ = 1, (23)
q
which means that −1 is not a square modulo q. This is a contradiction so the assumption that α
is odd must be false, which means that all primes q such that q ≡ 3 mod(4) have an even exponent
in the prime factorization of n.
6
3 Sums of Three Squares
3.1 Sums of three squares for small values
Let’s now consider the set of numbers that can be represented as the sum of three squares
Corollary 3.0.1. The set of numbers that can be represented as the sum of three squares is not
closed under multiplication.
Proof. The numbers 3 = 12 + 12 + 12 and 5 = 02 + 12 + 22 can be represented as the sum of three
squares, while 15 = 3 × 5 can not. Therefore, the set S3 is not closed under multiplication.
7
4 Sums of Four Squares
4.1 Closure under multiplication
Lemma 4.1. The set S4 = {n | n = x21 + x22 + x23 + x24 } is closed under multiplication, which means
that if two integers x and y can be represented as the sum of four squares, then their product xy
can also be represented as the sum of four squares.
Proof. Let x = a21 + b21 + c21 + d21 and y = a22 + b22 + c22 + d22 be sums of two squares. Now their
product is
xy = (a21 + b21 + c21 + d21 )(a22 + b22 + c22 + d22 ) = a21 a22 + a21 b22 + a21 c22 + a21 d22 + b21 a22 + b21 b22 + b21 c22 + b21 d22
+ c21 a22 + c21 b22 + c21 c22 + c21 d22 + d21 a22 + d21 b22 + d21 c22 + d21 d22 . (26)
(a1 a2 + b1 b2 + c1 c2 + d1 d2 )2 + (a1 b2 − b1 a2 − c1 d2 + d1 c2 )2 +
(a1 c2 + b1 d2 − c1 a2 − d1 b2 )2 + (a1 d2 − b1 c2 + c1 b2 − d1 a2 )2 =
(a21 a22 + b21 b22 + c21 c22 + d21 d22 + 2(a1 a2 b1 b2 + a1 a2 c1 c2 + a1 a2 d1 d2 + b1 b2 c1 c2 + b1 b2 d1 d2 + c1 c2 d1 d2 ))+
(a21 b22 + b21 a22 + c21 d22 + d21 c22 + 2(−a1 b2 b1 a2 − a1 b2 c1 d2 + a1 b2 d1 c2 + b1 a2 c1 d2 − b1 a2 d1 c2 − c1 d2 d1 c2 ))+
(a21 c22 + b21 d22 + c21 a22 + d21 b22 + 2(a1 c2 b1 d2 − a1 c2 c1 a2 − a1 c2 d1 b2 − b1 d2 c1 a2 − b1 d2 d1 b2 + c1 a2 d1 b2 ))+
(a21 d22 + b21 c22 + c21 b22 + d21 a22 + 2(−a1 d2 b1 c2 + a1 d2 c1 b2 − a1 d2 d1 a2 − b1 c2 c1 b2 + b1 c2 d1 a2 − c1 b2 d1 a2 )) =
a21 a22 +a21 b22 +a21 c22 +a21 d22 +b21 a22 +b21 b22 +b21 c22 +b21 d22 +c21 a22 +c21 b22 +c21 c22 +c21 d22 +d21 a22 +d21 b22 +d21 c22 +d21 d22 .
(27)
xy = (a1 a2 + b1 b2 + c1 c2 + d1 d2 )2 + (a1 b2 − b1 a2 − c1 d2 + d1 c2 )2 +
(a1 c2 + b1 d2 − c1 a2 − d1 b2 )2 + (a1 d2 − b1 c2 + c1 b2 − d1 a2 )2 , (28)
which means the product of x and y can be represented as a sum of four squares.
8
for some integer s.
If now m is odd then the inequalities for the least absolute residues become |a2 |, |b2 |, |c2 |,
|d2 | ≤ m−1 2 <m 2 2 2 2 m 2 2
2 . Thus sm = a2 + b2 + c2 + d2 < 4( 2 ) = m and s < m.
If instead m is even, then from equation (29) we get that all, or two or none of the numbers a1 ,
b1 , c1 , and d1 are odd. By renaming the variables we may assume that a1 and b1 have the same
parity and same for c1 and d1 . Then a1 ± b1 and c1 ± d1 are even, which means that
(a21 + b21 + c21 + d21 )(a22 + b22 + c22 + d22 ) = (mp)(sm) = m2 sp (32)
m2 sp = (a1 a2 + b1 b2 + c1 c2 + d1 d2 )2 + (a1 b2 − b1 a2 − c1 d2 + d1 c2 )2 +
(a1 c2 + b1 d2 − c1 a2 − d1 b2 )2 + (a1 d2 − b1 c2 + c1 b2 − d1 a2 )2 (33)
The congruences a1 ≡ a2 mod(m), etc., and the equation (30), show that
a1 a2 + b1 b2 + c1 c2 + d1 d2 2 a1 b2 − b1 a2 − c1 d2 + d1 c2 2
sp = ( ) +( ) +
2 2
a1 c2 + b1 d2 − c1 a2 − d1 b2 2 a1 d2 − b1 c2 + c1 b2 − d1 a2 2
( ) +( ) (36)
2 2
so sp can be represented as the sum of four squares. Since 0 < s < m this is a contradiction to the
minimality of m, so the assumption that m > 1 is false. Therefore m = 1 and p ∈ S4 .
9
References
[JJ98] Gareth A Jones and Josephine M Jones. Elementary number theory. Springer Science &
Business Media, 1998.
10