Aln 3
Aln 3
Number Theory
Part of G12ALN
Contents
Algebra and Number Theory G12ALN cw ’17
The contents of this first section – well zeroth section, really – is mostly
repetition of material from last year.
The integer q is called the quotient and r the remainder. We say that
b divides a if the remainder is zero. It will be denoted by b | a.
2
Algebra and Number Theory G12ALN cw ’17
iv). The set of linear combinations of a and b is exactly the set of integer
multiples of (a, b).
The last part of the above shows that the ideal aZ + bZ, also denoted
(a, b) in ring theory, is generated by the integer (a, b).
Corollary 0.3. Let a, b ∈ Z. An integer d equals (a, b) if and only if the
following three conditions hold.
• d | a and d | b,
• d > 0.
3
Algebra and Number Theory G12ALN cw ’17
r0 = q1 r1 + r2
r1 = q2 r2 + r3
.. ..
. .
rn−2 = qn−1 rn−1 + rn
rn−1 = qn rn .
13 = 91 − 2 · 39
= 91 − 2 · (585 − 6 · 91) = 13 · 91 − 2 · 585
= 13 · (3016 − 5 · 585) − 2 · 585 = 13 · 3016 − 67 · 585
= 13 · 3016 − 67 · (9633 − 3 · 3016) = −67 · 9633 + 214 · 3016
Aside: Implementation of the euclidean algorithm. Here is the pseudo-code
how this algorithm is implemented. In these lecture notes, pseudo-code is
written using the syntax of python with minor modifications. For instance in
python one should write % instead of “mod” in the following code.
4
Algebra and Number Theory G12ALN cw ’17
def gcd(a,b):
while b > 0:
(a, b) = (b, a mod b)
return a
The extended version gives also one possible pair x and y such that (a, b) =
x a + y b.
Here a//b returns the quotient of a divided by b without remainder; e.g. 7//3
returns 2.
Example. Here an example why mathematical proofs are important. Is
it true that n5 − 5 is coprime to (n + 1)5 − 5 for all n > 0 ? Cer-
tainly it looks like to be true as it holds for all n < 106 . However it
is not true. For n = 1435390 the greatest common divisor of n5 − 5 =
6093258197476329301164169899995 and (n + 1)5 − 5 = 60932794226022
09796244591837946 is equal to the prime number 1968751. If you know
what a resultant is, there is a simple reason for this.
0.2 Primes
Definition. A natural number p is called a prime if p > 1 and the only
positive divisors of p are 1 and p itself. A number n > 1 that is not a
prime is called composite.
Primes become sparser and sparser. In some vague sense, the likelihood
that a large integer n is prime is approximately 1/ log(n). Here is how many
primes there are below N for some values of N :
5
Algebra and Number Theory G12ALN cw ’17
However there are many open problems about prime numbers. Here a list of
three of them:
• Twin prime conjecture: There are infinitely many pairs of primes p and
q with q = p + 2.
Recently (2013), it was shown by Helfgott that every odd integer greater than
5 can be written as a sum of three primes. Based on initial work by Yitang
Zhang in 2013, we know now that there are infinitely many prime pairs p > q
with p − q < 246.
6
Algebra and Number Theory G12ALN cw ’17
0.3 Congruences
Definition. Let m > 1 be a positive integer. If a, b are integers, we say
that a is congruent to b modulo m if m divides a − b. We write a ≡ b
(mod m). The integer m is called the modulus of the congruence.
You will see people using the notation “a mod m = b”. We will refrain
from using this, which is often meant to mean that b is the remainder
of a modulo m. Note that ≡ will always mean congruences and never
vague things like “identically equal to”.
Recall that the unit group R∗ of a ring is the set of its invertible ele-
ments, i.e., all a ∈ R such that there is b ∈ R with ab = 1R .
Proposition 0.10. The unit group (Z/mZ)∗ consists of all congruence
classes [a] with a coprime to m.
7
Algebra and Number Theory G12ALN cw ’17
Recall that we can use the euclidean algorithm as in Theorem 0.6 to find
an inverse b of a modulo m: By working backwards after computing that
(a, m) = 1, we find integers b and k such that b a + k m = 1. Therefore
b a ≡ 1 (mod m).
1307 = 13 · 99 + 20
99 = 4 · 20 + 19
20 = 1 · 19 + 1
1 = 20 − 1 · 19 = 20 − 1 · (99 − 4 · 20) = 5 · 20 − 1 · 99
= 5 · (1307 − 13 · 99) − 1 · 99 ≡ (−66) · 99 (mod 1307)
8
Algebra and Number Theory G12ALN cw ’17
1 Congruence equations
We will try to solve the following linear congruence equation in one vari-
able:
a x ≡ b (mod m) (1)
where a, b and m > 1 are given integers.
Proof. The equation (1) has a solution if there is an integer k such that
ax = b + km. If d - b, then there are no solutions.
a0 x ≡ b 0 (mod m0 ).
By the first part of Theorem 0.2, we know that a0 and m0 are coprime.
Therefore we may apply the previous proposition. There is an integer
x0 such that the solutions to our equation are all integers of the form
x = x0 + n m0 for some integer n. The congruence class modulo m0
9
Algebra and Number Theory G12ALN cw ’17
Proof. Existence: Since m and n are coprime, there are integers A and B
such that Am + Bn = 1. Set x = b Am + a Bn. Since Bn ≡ 1 (mod m),
we obtain x ≡ a (mod m). Similarly x ≡ b (mod n).
Note that this also follows from the more general “Chinese remainder
theorem”, Theorem 2.3.7, in G12ALN. One takes I = mZ and J = nZ.
Then Z/nmZ ∼ = Z/mZ × Z/nZ. Take [x] to be the unique element in
the left hand-side that corresponds to [a], [b] on the right hand-side.
Theorem 1.4 (Chinese remainder theorem). Let m1 , m2 , . . . , mr be pair-
wise coprime positive integers. Then the system of congruences
x ≡ a1 (mod m1 )
x ≡ a2 (mod m2 )
..
.
x ≡ ar (mod mr )
has a unique solution modulo m1 · m2 · · · mr .
10
Algebra and Number Theory G12ALN cw ’17
Example. The age of the captain is an odd number that when divided
by 5 has remainder 3 and when divided by 11 has remainder 8. How old
is the captain?
m 2 3 4 5 6 7 8 9 10 11 12 13 14
NSolf (m) 2 3 2 8 6 4 4 9 16 13 6 17 8
m 15 16 17 18 19 20 21 22 23 24 25 26 27
NSolf (m) 24 8 17 18 20 16 12 26 27 12 40 34 27
For instance the solutions to f (x, y) ≡ 0 (mod 7) are ([0], [1]), ([0], [−1]),
([2], [2]), and ([2], [−2]).
11
Algebra and Number Theory G12ALN cw ’17
The second part is deduced from the first by induction on the number
of prime factors of m.
The example above shows that that NSolf (nm) and NSolf (n)·NSolf (m)
can differ when (n, m) 6= 1.
The proposition tells us that we may restrict now to the case when m
is a prime power when trying to solve (2).
12
Algebra and Number Theory G12ALN cw ’17
Let p be a prime. The aim of this section is to explain how one can
(sometimes) get from a solution modulo p to a solution modulo powers
of p. This process is called “lifting” a solution. We illustrate this first
with an example.
Lemma 1.6. Let f (x) ∈ Z[x] and set g(x) = f (x + a) for some integer
a. Then g 0 (x) = f 0 (x + a).
13
Algebra and Number Theory G12ALN cw ’17
compute
d k
0
X X k k−i i−1
g (x) = ck i a x
k=0 i=1
i
d k−1
X X k
= ck (j + 1) ak−(j+1) xj
k=0 j=0
j + 1
d k−1
X X k − 1 (k−1)−j j
= ck k a x
k=0 j=0
j
d
X
= ck k (x + a)k−1 = f 0 (x + a).
k=0
14
Algebra and Number Theory G12ALN cw ’17
It is also clear from the proof above that we have two further cases. If
0
f (x0 ) ≡ 0 (mod p) and f (x0 ) 6≡ 0 (mod p2k ), then there is no solution
for t. If f 0 (x0 ) ≡ 0 (mod p) and f (x0 ) ≡ 0 (mod p2k ) then all t are
solutions.
15
Algebra and Number Theory G12ALN cw ’17
2 Arithmetic functions
In this section, we will study functions like the Euler totient function
that measure arithmetic properties of numbers. Typical questions could
be: How many prime factors does a very large number have in average?
Definition. A function f : N → C is called an arithmetic function.
Such a function f is called multiplicative if f (mn) = f (m)f (n) for all
pairs of coprime positive integers m, n. It is called completely multi-
plicative if f (mn) = f (m)f (n) for all positive integers m and n.
n 1 2 3 4 5 6 7 8 9 10 11 12 13 14
ϕ(n) 1 1 2 2 4 2 6 4 6 4 10 4 12 6
n 15 16 17 18 19 20 21 22 23 24 25 26 27 28
ϕ(n) 8 8 16 6 18 8 12 10 22 8 20 12 18 12
Proof. Let m and n be coprime natural numbers. We show that the map
∗ ∗ ∗
Ψ : Z/mnZ → Z/mZ × Z/nZ
x + nmZ 7→ x + mZ, x + nZ
16
Algebra and Number Theory G12ALN cw ’17
(Z/mnZ)∗ ∼
= (Z/mZ)∗ × (Z/nZ)∗ .
17
Algebra and Number Theory G12ALN cw ’17
Qr
Proposition 2.2. If n = i=1 pai i is the prime factorisation of n, then
r
Y Y 1
ϕ(n) = pai i − pai i −1 = n · 1−
i=1
p
p|n
Proof. This is the content of Corollary Q 2.5.5ai in G12ALN. First the pre-
vious theorem implies that ϕ(n) = i ϕ pi . Let k > 1. Now to be
coprime to pk is the same as to be coprime to p. So from all pk values in
the range 1 6 a 6 pk , we will not allow pk−1 one of them, namely p, 2p,
. . . , pk . This gives ϕ(pk ) = pk − pk−1 .
Aside: More on ϕ(n). The average of all values ϕ(k) for 1 6 k 6 n stays
close to π32 n. One has this remarkable limit statement
ϕ(n) · log(log(n))
lim inf = e−γ ≈ 0.5614 . . .
n
where γ is the Euler-Mascheroni constant. However there are infinitely many
n for which the fraction on the left is smaller than e−γ .
P P P
We may write σ(m) = d|m d and τ (m) = d|m 1. The notation d|n
will always stand for the sum over d running through all positive divisors
of n. For instance, for a prime p, we have τ (p) = 2 and σ(p) = p + 1.
n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
σ(n) 1 3 4 7 6 12 8 15 13 18 12 28 14 24 24
τ (n) 1 2 2 3 2 4 2 4 3 4 2 6 2 4 4
18
Algebra and Number Theory G12ALN cw ’17
k
P
This proof generalises to show that the function σk (n) = d|n d is
multiplicative for all real values of k. With this notation σ = σ1 and
τ = σ0 . Again, neither is completely multiplicative.
r r
Y pai +1 − 1
i
Y
σ(n) = and τ (n) = (ai + 1).
i=1
pi − 1 i=1
19
Algebra and Number Theory G12ALN cw ’17
Definition. The Möbius function µ : N → {−1, 0, 1} is defined by
1
if n=1
µ(n) = 0 if n is not square-free
r
(−1) if n = p1 p2 · · · pr with pi distinct primes.
20
Algebra and Number Theory G12ALN cw ’17
n 1 2 3 4 5 6 7 8 9 10 11 12 . . . 30
µ(n) 1 −1 −1 0 −1 1 −1 0 0 1 −1 0 −1
P
Lemma 2.6. If n > 1, then d|n µ(d) = 0.
Definition. The convolution of two arithmetic functions f and g is
defined by
X X
(f ∗ g)(n) = f (d) · g nd = f (d) · g(e).
d|n de=n
P
i). (f ∗ I)(n) = d|n f (d)
21
Algebra and Number Theory G12ALN cw ’17
ii). f ∗ g = g ∗ f
iii). f ∗ (g ∗ h) = (f ∗ g) ∗ h
iv). I ∗ µ = µ ∗ I = ε
v). f ∗ ε = ε ∗ f = f
Proof. F = f ∗ I implies µ ∗ F = µ ∗ (f ∗ I) = f ∗ (µ ∗ I) = f ∗ ε = f .
P
Example. By definition, we have σ(n) = d|n d. So the Möbius inver-
sion theorem for f (n) = n and F (n) = σ(n) yields the formula
X n
n= µ(d)σ .
d
d|n
For instance
22
Algebra and Number Theory G12ALN cw ’17
Proof. We are looking for a function g such that ε(n) = (f ∗ g)(n) for all
n. For n = 1, this imposes that 1 = ε(1) = (f ∗ g)(1) = f (1) · g(1) = g(1).
If n = p is a prime, we find 0 = ε(p) = f (1) · g(p) + f (p) · g(1). This
forces us to set g(p) = −f (p). Similarly, one can show that we must have
g(p2 ) = −f (p)2 − f (p2 ) by taking n = p2 . Now, we see that in general
for an integer n > 1, the equations (f ∗ g)(n) = ε(n) = 0 imposes us to
set X n
g(n) = − g(d) · f .
d
n6=d|n
Proof. This is the summary of the previous theorem with parts ii), iii),
v) of Lemma 2.7.
23
Algebra and Number Theory G12ALN cw ’17
Lagrange gave the first proof to the following theorem, already stated
without proof before by Ibn al-Haytham (c. 1000 AD), Edward Waring,
and John Wilson.
Theorem 3.1 (Wilson’s Theorem). If p is a prime, then (p − 1)! ≡ −1
(mod p).
24
Algebra and Number Theory G12ALN cw ’17
Example. It follows from this corollary that (p − 1)/2 ! is ±1 modulo
p if p ≡ 3 (mod 4), but it does not say which. Otherwise it is an element
i such that i2 ≡ −1 (mod 4). Here are the first few values
p 3 5 7 11 13 17 19 23 29 31 37
(p − 1)/2 ! mod p 1 2 −1 −1 5 13 −1 1 12 1 31
Proof. Since p - a, the congruence class [a] belongs to the group (Z/pZ)∗ .
Hence the list [a], [2] · [a], . . . , [p − 1] · [a] also contains each non-zero
congruence class exactly once. Therefore
a · 2 a · 3 a · · · (p − 1) a ≡ 1 · 2 · 3 · · · (p − 1) (mod p)
ap−1 · (p − 1)! ≡ (p − 1)! (mod p)
Since (p − 1)! 6≡ 0 (mod p), we can simplify the above to equation (3).
25
Algebra and Number Theory G12ALN cw ’17
Proof. Since (a, n) = 1, the congruence class [a] belongs to the group of
units (Z/nZ)∗ . Multiplying each element of (Z/nZ)∗ by [a] just permutes
the group elements. We obtain
Y Y
[a] · x = x
x∈(Z/nZ)∗ x∈(Z/nZ)∗
Y Y
[a]ϕ(n) · x= x
x∈(Z/nZ)∗ x∈(Z/nZ)∗
26
Algebra and Number Theory G12ALN cw ’17
k 0 1 2 3 4 5 6 7 8 9 10
[13]k [1] [13] [17] [12] [4] [14] [11] [10] [16] [18] [6]
k 11 12 13 14 15 16 17 18 19 20 21
[13]k [2] [7] [15] [5] [8] [9] [3] [1] [13] [17] [12]
∗
Proof. We know that Z/pZ is a cyclic group by Theorem 3.6. Let d
be the order of the element [a] in this group. By Lagrange’s theorem
(Corollary 1.3.6 in G12ALN), we know that d divides p − 1. We want to
show that d = p − 1.
Here is a list of the smallest positive primitive element g for the first
few primes.
27
Algebra and Number Theory G12ALN cw ’17
p 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47
g 1 2 2 3 2 2 3 2 5 2 3 2 6 3 5
Aside: Artin’s conjecture. Is it true that 2 appears infinitely often in the
above list? This is still an unsolved problem. Heath-Brown showed in 1986
that we have infinitely often a number below 8 in this list.
If we have a list of all the primes p below 106 , then by this theorem
we have an efficient way to solve both questions for n < 1012 . Just try
to divide n by all primes in the list. If none divides n, then n is prime.
Otherwise, we can divide n by p and try to divide np and so forth until
we get the full factorisation of n. To store all 37607912018 primes below
1012 would take more then 168 GB. Trial division is not efficient for n
with hundreds or thousands of digits.
28
Algebra and Number Theory G12ALN cw ’17
k = kr · 2r + kr−1 · 2r−1 + · · · + k1 · 2 + k0 .
2 2 2
!
2
ak = ak0 · ak1 · ak2 · · · akr−1 · (akr )2 · · ·
.
i r r − 1 ... 1 0
ki 1 kr−1 . . . k1 k0 ← fill in the binary digits of k
b a ... ... ← fill up from the left, each step
either a · b2 or b2 modulo n
29
Algebra and Number Theory G12ALN cw ’17
i 7 6 5 4
ki 1 1 0 1
2 2
b 3 3 · 3 ≡ 27 27 ≡ 66 3 · 662 ≡ 29
i 3 2 1 0
ki 1 1 0 0
b 3 · 292 ≡ 92 2 2
3 · 92 ≡ 198 198 ≡ 87 2
87 ≡ 55
n =2405103478365565317102362319979107852729856194163135049 . . .
. . . 853668763716791595912281396928100231152023891852493779
Trial division will never (well, at least not in within the age of the uni-
verse) succeed in deciding if n is prime or composite. On the other hand,
my computer in the office takes about 50 µs to evaluate
2n−1 ≡158256580117107554768470787587371196902955183533611778 . . .
. . . 998301777136825967440252388516455258006828210287748445
modulo n. Hence n is not prime. Yet, we have not idea what the prime
factors are.
Aside: Fast modular exponentiation Here is the code for an alternative version
of fast modular exponentiation. Rather then reading teh binary digits from
left-to-right, this reads them from right-to-left. In fact, it computes these
digits as we go along.
def modexp(a,k,n):
r = 1
b = a
while k > 0:
if k is odd:
r = r*b mod n
b = b^2 mod n
k = k//2
return r
30
Algebra and Number Theory G12ALN cw ’17
Note that the converse to Proposition 3.10 is not valid. For instance
1114 ≡ 1 (mod 15) does not imply that 15 is prime. With respect to the
base b = 11, the composite number n = 15 behaves like a prime.
n−1
Definition. Let n > 1. If b ≡ 1 (mod n) yet n is composite, then
n is called a pseudoprime to base b. A composite number n that is
pseudoprime to all bases b > 1 with (b, n) = 1 is called a Carmichael
number.
31
Algebra and Number Theory G12ALN cw ’17
find one divisor 1 < d < n of n for we could then apply our method
recursively for the smaller numbers d and nd .
First assume, a gentle fairy comes to help us. She gives us a number
K and tells us that there is a prime factor p of n such that p − 1 divides
K. However she does not tell us what p is.
K = 3217644767340672907899084554130
Now, the real problem about this world is that fairies hardly ever help
us. So how would we get a good candidate for K? Let B be an integer,
say 100 or 1000. Then one first choice of K would be to take the product
of all prime numbers ` smaller than B. In fact that is K in the example
above with B = 80. Now this K will work if one prime factor p of n
is such that p − 1 factors into a product of distinct primes ` all smaller
than B. In the example above p − 1 = 987658 = 2 · 7 · 19 · 47 · 79 had this
property.
32
Algebra and Number Theory G12ALN cw ’17
product K = `n` such that `n` is the largest power of ` which is just
Q
smaller than B. If p − 1 divides this K, it is called B-power-smooth.
33
Algebra and Number Theory G12ALN cw ’17
4 Quadratic Reciprocity
x 0 1 2 3 4
x2 0 1 4 4 1
x 0 1 2 3 4 5 6
2
x 0 1 4 2 2 4 1
34
Algebra and Number Theory G12ALN cw ’17
iv). ( ab
p
) = ( ap )( pb ).
35
Algebra and Number Theory G12ALN cw ’17
a 1 2 3 4 5 6 7 8 9 10
a5 1 32 243 1024 3125 7776 16807 32768 59049 100000
5
a mod 11 1 −1 1 1 1 −1 −1 −1 1 −1
a
( 11 ) 1 −1 1 1 1 −1 −1 −1 1 −1
Aside: Primality testing using Euler’s criterion. Note that Euler’s criterion
is false when p is not a prime. For instance is 27 6≡ ±1 modulo 15 so 15 can
not be a prime. More convincingly, 31996001 ≡ 2664001 6≡ ±1 (mod 3992003).
So 3992003 is not prime.
After extending the Legendre symbol to the Jacobi symbol ( na ) for any odd
integer n, one can even test for b(n−1)/2 ≡ ( nb ) (mod n).
36
Algebra and Number Theory G12ALN cw ’17
Aside: As mentioned earlier, G13FNT will generalise this vastly and also
explain in what sense roughly half of the primes are congruent to 1 modulo 4.
We wish to find a closed formula for ( p2 ) only depending on the odd prime
p. Here is what the first few values look like
p 3 5 7 11 13 17 19 23 27 31 37
( p2 ) −1 −1 1 −1 −1 1 −1 1 −1 1 −1
Definition. Let a be an integer. The integer s such that s ≡ a
(mod p) and |s| < p2 is called the least residue of a modulo p.
(
2 (p2 −1)/8 +1 if p ≡ ±1 (mod 8);
Proposition 4.5. p
= (−1) =
−1 if p ≡ ±3 (mod 8).
Now to the first equality. Consider the least residues of all even integers
2, 4, . . . , p − 1.
p − 1 ≡ −1 ≡ (−1)1 · 1
2 ≡ 2 ≡ (−1)2 · 2
p − 3 ≡ −3 ≡ (−1)3 · 3
.. .. ..
. . .
37
Algebra and Number Theory G12ALN cw ’17
p−1
There are 2
elements in the list. Their product gives
p−1
p − 1 1 p−1 p+1
p − 1
· 2 · 2
2 2 · ! ≡ (−1) 2 · ! (mod p) ,
2 2
2
since 1 + 2 + 3 + · · · + p−1
2
= 12 ( p−1
2
)( p−1
2
+ 1) = p 8−1 . Simplifying by the
factorial on both sides and using Euler’s criterion proves the proposition.
We have seen part i) and part ii) already. We will prove the most
difficult part iii) later.
38
Algebra and Number Theory G12ALN cw ’17
symbols (or Jacobi symbols) which satisfy a quadratic reciprocity even for
composite numbers.
Proposition 4.7. Fix an integer a > 1. The set of all primes p for which
( ap ) = +1 consists of all primes in certain congruence classes modulo 4|a|.
p 3 5 7 11 13 17 19
( p5 ) −1 0 −1 1 −1 −1 1
p mod 5 3 0 2 1 3 2 4
39
Algebra and Number Theory G12ALN cw ’17
p 3 5 7 11 13 17 19
( p3 )0 −1 −1 1 1 −1 −1
p mod 12 0 5 7 −1 1 5 7
Example. We evaluate ( 10 p
) as a further example with a composite a.
We take p ∈/ {2, 5}, since ( 5 ) = 0. Note that ( 10
10
p
) = ( p2 )( p5 ); we evaluate
the two factors separately, using quadratic reciprocity in each case.
40
Algebra and Number Theory G12ALN cw ’17
The other residue classes modulo 40 (and coprime to 40) give the other
cases:
10
= −1 ⇐⇒ p ≡ ±7, ±11, ±17, ±19 (mod 40).
p
Hence finally,
(
10 +1 if p ≡ ±1, ±3, ±9, ±13 (mod 40),
=
p −1 if p ≡ ±7, ±11, ±17, ±19 (mod 40).
In the last example with a = −3, one initially finds a condition modulo
4|a| = 12. However it simplifies to a condition modulo 3. The same will
be true for all a = −q with q a prime congruent to 3 modulo 4.
Aside: More generally. Given a quadratic polynomial, like x2 − a, then to
know if the polynomial has a root modulo p only depends on the congruence
class of p modulo some m. The same is no longer true for cubic polynomials.
For instance, the polynomial x3 − 2 has a solution modulo p if and only if
p≡ 2 (mod 3) or p ≡ 1 (mod 3) and p = a2 + 27b2 for some integers a and
b . The last condition is not a condition modulo m for any m. Examples of
such primes are 31, 43, 109, 127, . . . Behind all this is that a certain “Galois
group” is no longer abelian.
This is one of the many proofs of the quadratic reciprocity law. It is was
discovered by G. Rousseau.
41
Algebra and Number Theory G12ALN cw ’17
Let p and q be two ∗ distinct odd primes. We will consider the abelian
∗
group
G = Z/pZ × Z/qZ . It contains the normal subgroup N =
([1], [1]), ([−1], [−1]) of order 2. To ease the notation, we will write
(a, b) instead of ([a], [b]). Each coset in G/N consist of a pair of the form
n o
(a, b)N = (a, b), (−a, −b) .
Not that it matters for the proof, but one can check that
(
(1, 1)N = N if p ≡ q ≡ 1 (mod 4)
π=
(1, −1)N = (1, −1), (−1, 1) else.
Now we use the Chinese remainder Theorem. Recall from the proof of
Theorem 2.1, that there is a group isomorphism
∗ ∗ ∗
Ψ : Z/pqZ → Z/pZ × Z/qZ
c + pqZ 7→ c + pZ, c + qZ
42
Algebra and Number Theory G12ALN cw ’17
∗
Write G0 for the group Z/pqZ . Under Ψ, the subgroup N corresponds
to the subgroup N 0 6 G0 given by N 0 = 1 + pqZ, −1 + pqZ . Now
each coset in G0 /N 0 is a pair c + pqZ, −c + pqZ . So if we run over all
1 6 c 6 pq−1
2
which are coprime to p and q, then (c + pqZ)N 0 will run
through all cosets in G0 /N 0 . Applying Ψ to this, we see that
n o
pq−1
G/N = (c, c)N 1 6 c 6 2 and (c, pq) = 1 .
Example. Let us make this explicit for the case p = 5 and q = 7 again.
The group G/N can also be presented as
(1, 1)N (2, 2)N (3, 3)N (4, 4)N (6, 6)N = (1, 6)N (8, 8) = (3, 1)N
(9, 9) = (4, 2)N (11, 11)N = (1, 4)N (12, 12)N = (2, 5)N
(13, 13)N = (3, 6)N (16, 16)N = (1, 2)N (17, 17)N = (2, 3)N
Now in this new presentation, we can also compute the product of all
elements in G/N . Y
π= (c, c)N
16c6 pq−1
2
(c,pq)=1
Let’s look at the first component alone. We group the factors from 1
to p − 1, then from p + 1 to 2p − 1 etc. Note the product runs up to
pq−1
2
= q−1
2
p + p−1
2
. In the end we have to divide by those factors which
are not coprime to q, i.e. by q, 2q, . . .
q−1 pq−1
p−1 2p−1 2
p−1 2
Y 1 Y Y Y Y
c= p−1 · c· c··· c· c
pq−1
1 · q · 2q · · · · 2
q c=1 c=p+1
16c6 2 c=( q−1
2
−1)p+1 c= q−1
2
p+1
(c,pq)=1
Q
Note that all the in the above right hand side, except the very last
one, are just (p − 1)! modulo p. The last product is ( p−1
2
)! instead. So
this simplifies to
(p − 1)!(q−1)/2 · p−1
Y !
c≡ p−1
2 (mod p)
q (p−1)/2 · 2 !
pq−1
16c6 2
(c,pq)=1
(−1)(q−1)/2 q
≡ ≡ (−1)(q−1)/2 · (mod p),
q p
p
where we used Euler’s criterion in Proposition 4.2 and the fact that ( pq )
is ±1.
43
Algebra and Number Theory G12ALN cw ’17
Now we can compare the equation (4) and (5). It is clear that both are
either N or (1, −1)N . We can detect in which of the two (a, b)N is by
just looking at ab ∈ ±1. Here we get that
44
Algebra and Number Theory G12ALN cw ’17
5 Diophantine equations
45
Algebra and Number Theory G12ALN cw ’17
On the one hand, there are two easy ways to prove that an equation
does not have an integer solution: Inequalities and congruences. The two
lemma below are obvious, yet useful.
(It was a conjecture of Euler that there were none, disproved by Elkies
in 1987.)
If the equation has only finitely many solutions in C, then we can just
compute them to very high precision and check if any integer close-by is
a solution. That is a way to solve equations f (x) = 0 in one variable;
though that is not the best way to do so. If there are infinitely many
solutions in the real numbers, then this method can not be used.
46
Algebra and Number Theory G12ALN cw ’17
Now if there are infinitely many solutions to the equation over R, then there
is a constant C such that the equation has automatically a (liftable) solution
modulo p for all primes p > C. Given the equation, one can, in principle,
determine C effectively. For instance for an equation like ax3 + by 3 + cz 3 = 0
with pair-wise coprime non-zero integer constants a, b, c, then C can be taken
to be the largest prime divisor of 3abc. The general result is a consequence of
the work of many mathematicians starting with André Weil in the 1940s and
culminating with the work of Pierre Deligne that won him the Fields medal
in 1978.
3 x2 + 10 xy + 4 y 2 + 12 x − 6 y − 21 = 0.
They are called quadratic forms. Minkowski proved that such a quadratic
form has a rational solution if and only if it has a real solution and a
solution modulo m for all m > 1. The proof involves a method called
the “geometry of numbers”. A good exposition of Minkowski’s theorem
can be found in Serre’s “Course in arithmetic” QA155 SER.
However, there is some bad news. This only holds for quadratic forms.
For instance Selmer found that 3x3 + 4y 3 + 5z 3 = 0 has no non-trivial
solution, yet it has plenty of real solutions and also a non-trivial solution
modulo m for all m > 1. Here is another example of this.
Theorem 5.4 (Lind 1940, Reichardt 1942). There are no rational num-
bers x and y such that 2y 2 = 1 − 17x4 .
It is easy to show that there are real solutions: A picture of the curve
can be seen in Figure 4 at the end of the notes. The corresponding
equation for integers (see (7) below) has a non-trivial solution modulo
47
Algebra and Number Theory G12ALN cw ’17
all integers m > 1. Hence the proof has to use something stronger; in
our case it is going to be the quadratic reciprocity law.
2Y 2 = Z 4 − 17 X 4 (7)
Note first that 17 can not divide Y : If it did, then Z would also be
divisible by 17, but that is not allowed as (Y, Z) = 1. Now let p be a
p
prime factor of Y . Hence p 6= 17. If p = 2, then ( 17 ) = +1 as 17 ≡ 1
(mod 8). If p 6= 2, then from the equation Z ≡ 17X 4 (mod p), we see
4
48