Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
41 views46 pages

Number Theory

Uploaded by

abhinavgoyal914
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views46 pages

Number Theory

Uploaded by

abhinavgoyal914
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Solutions to Ireland, Rosen “A Classical Introduction to

Modern Number Theory”


Richard Ganaye

April 22, 2025

Chapter 1

Ex 1.1 Let a and b be nonzero integers. We can find nonzero integers q and r such
that a = qb + r where 0 ≤ r < b. Prove that (a, b) = (b, r).

Proof. Notation : if a, b are integers in Z, a ∧ b is the non negative greatest common


divisor of a, b, the generator in N = {0, 1, 2, . . .} of the ideal (a, b) = aZ + bZ.
Let d ∈ Z.
• If d | a, d | b, then d | a − qb = r, so d | b, d | r.
• If d | b, d | r, then d | qb + r = a, so d | a, d | b.

∀d ∈ Z, (d | b, d | r) ⇐⇒ (d | a, d | b).
If a = bq + r, the set of common divisors of a, b is equal to the set of common divisors
of b, r.
As a ∧ b is the smallest positive element of this set, so is b ∧ r, we conclude that
a ∧ b = b ∧ r.

Ex 1.2 If r ̸= 0, we can find q1 and r1 such that b = q1 r + r1 , with 0 ≤ r1 < r. Show


that (a, b) = (r, r1 ). This process can be repeated. Show that it must end in finitely many
steps. Show that the last nonzero remainder must equal (a, b). The process looks like

a = bq + r, 0≤r<b
b = q1 r + r1 , 0 ≤ r1 < r
r = q2 r1 + r2 , 0 ≤ r2 < r1
..
.
rk−1 = qk+1 rk + rk+1 , 0 ≤ rk+1 < rk
rk = qk+2 rk+1

Then rk+1 = (a, b). This process of finding (a, b) is known as the Euclidian algorithm.

Proof. The Euclidian division of b by r gives b = q1 r + r1 , 0 ≤ r1 < r. The result of


exercise 1.1 applied to the couple (b, r) shows that

b ∧ r = r ∧ r1 .

1
Let N ∈ N. While the remainders ri , i ≤ N , are not equal to 0, we can define the
sequences (qi ), (ri ) by

r−1 = a, r0 = b, ri−1 = qi+1 ri + ri+1 , 0 ≤ ri+1 < ri 0≤i≤N


.
If no ri , i ∈ N, is equal to 0, we can continue this construction indefinitely. So
we obtain a strictly decreasing sequence (ri )i∈N of positive numbers : it is impossible.
Therefore, there exists an index k such as rk+2 = 0, this is the end of the algorithm.

a = bq + r, 0≤r<b
b = q1 r + r1 , 0 ≤ r1 < r
r = q2 r1 + r2 , 0 ≤ r2 < r1
..
.
rk−1 = qk+1 rk + rk+1 , 0 ≤ rk+1 < rk
rk = qk+2 rk+1 , rk+2 = 0

From exercise 1, ri−1 ∧ ri = ri ∧ ri+1 , 0 ≤ i ≤ k, so

a ∧ b = b ∧ r = · · · = rk ∧ rk+1 = rk+1 ∧ rk+2 = rk+1 ∧ 0 = rk+1 .


The last non zero remainder is the gcd of a, b.

Ex 1.3 Calculate (187, 221), (6188, 4709), (314, 159).

Proof. With direct instructions in Python, we obtain :

>>> a, b = 187, 221


>>> print("q = ",a//b); a, b = b, a%b; print(a,b)
q = 0
221 187
>>> print("q = ",a // b); a, b = b, a%b; print(a,b)
q = 1
187 34
>>> print("q = ",a // b); a, b = b, a%b; print(a,b)
q = 5
34 17
>>> print("q = ",a // b); a,b = b, a%b; print(a,b)
q = 2
17 0

This gives the equalities

187 = 0 × 221 + 187


221 = 1 × 187 + 34
187 = 5 × 34 + 17
34 = 2 × 17 + 0

2
So 187 ∧ 221 = 17.
With the same instructions, we obtain

6188 = 1 × 4709 + 1479


4709 = 3 × 1479 + 272
1479 = 5 × 272 + 119
272 = 2 × 119 + 34
119 = 3 × 34 + 17
34 = 2 × 17 + 0

6188 ∧ 4709 = 17.


Finally

314 = 1 × 159 + 155


159 = 1 × 155 + 4
155 = 38 × 4 + 3
4=1×3+1
3=3×1+0

314 ∧ 159 = 1.
The Python script which gives the gcd is very concise :
def gcd(a,b):
a, b = abs(a), abs(b)
while b != 0:
a, b = b, a % b
return a

Ex 1.4 Let d = (a, b). Show how one can use the Euclidean algorithm to find numbers
m and n such that am + bn = d.(Hint: In Exercise 2 we have that d = rk+1 . Express
rk+1 in terms of rk and rk+1 , then in terms of rk−1 and rk−2 , etc.).

Proof. With a slight modification of the notations of exercise 2, we note the Euclid’s
algorithm under the form

r0 = a, r1 = b, ri = ri+1 qi+1 +ri+2 , 0 < ri+2 < ri+1 , 0 ≤ i < k, rk = qk+1 rk+1 , rk+2 = 0

We show by induction on i (i ≤ k + 1) the proposition

P (i) : ∃(mi , ni ) ∈ Z × Z, ri = ami + bni .

• r0 = a = 1.a + 0.b. Define m0 = 1, n0 = 0. We obtain r0 = am0 + bn0 , then P (0)


is true.
r1 = b = 0.a + 1.b. Define m1 = 0, n1 = 1. We obtain r1 = am1 + bn1 , then P (1) is
true.

3
• Suppose for 0 ≤ i < k the induction hypothesis P (i) et P (i + 1) :

ri = ami + bni , mi , ni ∈ Z,
ri+1 = ami+1 + bni+1 , mi+1 , ni+1 ∈ Z.

Then ri+2 = ri − ri+1 qi+1 = a(mi − qi+1 mi+1 ) + b(ni − qi+1 ni+1 ).
If we define mi+1 = mi − qi+1 mi+1 , ni+1 = ni − qi+1 ni+1 , we obtain ri+2 = ami+2 +
bni+2 , mi+2 , ni+2 ∈ Z, so P (i + 2).
• The conclusion is that P (i) is true for all i, 0 ≤ i ≤ k + 1, in particular rk+1 =
amk+1 + bnk+1 , that is
a ∧ b = d = am + bn,
where m = mk+1 , n = nk+1 ∈ Z.

Ex 1.5 Find m and n for the pairs a and b given in Ex 1.3

Proof. From exercises 1.3, 1.4, we know that the sequences (ri ), (mi ), (ni ) are given by

r0 = a, r1 = b
m0 = 1, m1 = 0
n0 = 0, n1 = 1

and for all i < k,

ri+2 = ri − qi+1 ri+1


mi+2 = mi − qi+1 mi+1
ni+2 = ni − qi+1 ni+1

and for all i


ri = mi a + ni b.
This gives the direct instructions in Python :
>>> a,b = 187, 221
>>> r0,r1,m0,m1,n0,n1 = a,b,1,0,0,1
>>> q = r0//r1;
>>> q = r0//r1; r0,r1,m0,m1,n0,n1 = r1, r0 -q*r1,m1, m0 -q*m1, n1, n0 - q*n1
>>> print(r0,r1,m0,m1,n0,n1)
221 187 0 1 1 0
>>> q = r0//r1; r0,r1,m0,m1,n0,n1 = r1, r0 -q*r1,m1, m0 -q*m1, n1, n0 - q*n1
>>> print(r0,r1,m0,m1,n0,n1)
187 34 1 -1 0 1
>>> q = r0//r1; r0,r1,m0,m1,n0,n1 = r1, r0 -q*r1,m1, m0 -q*m1, n1, n0 - q*n1
>>> print(r0,r1,m0,m1,n0,n1)
34 17 -1 6 1 -5
>>> q = r0//r1; r0,r1,m0,m1,n0,n1 = r1, r0 -q*r1,m1, m0 -q*m1, n1, n0 - q*n1
>>> print(r0,r1,m0,m1,n0,n1)
17 0 6 -13 -5 11

4
So
17 = 187 ∧ 221 = 6 × 187 − 5 × 221.
Similarly
17 = 6188 ∧ 4709 = 121 × 6188 − 159 × 4709.
1 = 314 ∧ 159 = −40 × 314 + 79 × 159.
We obtain the same results with the following Python script :
def bezout(a,b):
"""input : entiers a,b
output : tuple (x,y,d),
(x,y) solution de ax+by = d, d = pgcd(a,b)
"""
(r0,r1)=(a,b)
(u0,v0) = (1,0)
(u1,v1) = (0,1)
while r1 != 0:
q = r0 // r1
(r2,u2,v2) = (r0 - q*r1,u0 - q*u1,v0 - q*v1)
(r0,r1) = (r1,r2)
(u0,u1) = (u1,u2)
(v0,v1) = (v1,v2)
return (u0,v0,r0)

Ex 1.6 Let a, b, c ∈ Z. Show that the equation ax + by = c has solutions in integers


iff (a, b)|c.

Proof. Let d = a ∧ b.
• If ax + by = c, x, y ∈ Z, as d | a, d | b, d | ax + by = c.
• Conversely, if d | c, then c = dc′ , c′ ∈ Z.
From Prop. 1.3.2., dZ = aZ + bZ, so d = au + bv, u, v ∈ Z, and c = dc′ =
a(c u) + b(c′ v) = ax + by, where x = c′ u, y = c′ v are integers.

Conclusion :

∃(x, y) ∈ Z × Z, ax + by = c ⇐⇒ a ∧ b | c.

Ex 1.7 Let d = (a, b) and a = da′ and b = db′ . Show that (a′ , b′ ) = 1.

Proof. Suppose d ̸= 0 (if d = 0, then a = b = 0, and a′ , b′ are any numbers in Z and the
result may be false, so we must suppose d ̸= 0).
As d = am+bn, m, n ∈ Z, d = d(a′ m+b′ n), so 1 = a′ m+b′ n, which proves a′ ∧b′ = 1.
Conclusion : if d = a ∧ b ̸= 0, and a = da′ , b = db′ , then a′ ∧ b′ = 1.

5
Ex. 1.8 Let x0 and y0 be a solution to ax + by = c. Show that all solutions have the
form x = x0 + t(b/d), y = y0 − t(a/d), where d = (a, b) and t ∈ Z.

Proof. Suppose a ̸= 0, b ̸= 0.
Let x0 and y0 be a solution to ax + by = c.
If (x, y) is any solution of the same equation,

ax + by = c
ax0 + by0 = c,

then
a(x − x0 ) = −b(y − y0 ),
so
a b
(x − x0 ) = − (y − y0 ).
d d
Let a′ = a/d, b′ = b/d : from ex. 1.7, we know that a′ ∧ b′ = 1.
As a′ (x − x0 ) = −b′ (y − y0 ), b′ | a′ (x − x0 ), and b′ ∧ a′ = 1, so (Gauss’ Lemma : prop.
1.1.1) b′ | x − x0 .
There exists t ∈ Z such that x − x0 = tb′ . Then a′ tb′ = −b′ (y − y0 ). As b ̸= 0, b′ ̸= 0,
so a′ t = −(y − y0 ) :

x = x0 + t(b/d)
y = y0 − t(a/d)

Conversely, a(x0 + t(b/d)) + b(y0 − t(a/d)) = ax0 + by0 = c.


Conclusion : if a ̸= 0, b ̸= 0, and ax0 + by0 = c,

ax + by = c ⇐⇒ ∃t ∈ Z, x = x0 + t(b/d), y = y0 − t(a/d).

Ex. 1.9 Suppose that u, v ∈ Z and that (u, v) = 1. If u | n and v | n, show that uv | n.
Show that this is false if (u, v) ̸= 1.

Proof. As u | n, n = uq, q ∈ Z, so v | n = uq, and v ∧ u = 1, so (Gauss’ lemma : prop.


1.1.1), v | q : q = vl, l ∈ Z, and n = uvl : uv | n.
If the case u ∧ v ̸= 1, we give the counterexample 6 | 18, 9 | 18, but 6 × 9 ∤ 18.

Ex. 1.10 Suppose that (u, v) = 1. Show that (u + v, u − v) is either 1 or 2.

Proof. Let d = (u + v) ∧ (u − v). Then d | u + v, d | u − v, so d | 2u = (u + v) + (u − v)


and d | 2v = (u + v) − (u − v). So d | (2u) ∧ (2v) = 2(u ∧ v) = 2. As d ≥ 0, d = 1 or
d = 2.

Ex. 1.11 Show that (a, a + k) | k.

Proof. Let d = a ∧ (a + k). As d | a, d | (a + k), d | k = (a + k) − a.


Conclusion : a ∧ (a + k) | k.

6
Ex. 1.12 Suppose that we take several copies of a regular polygon and try to fit them
evenly about a common vertex. Prove that the only possibilities are six equilateral trian-
gles, four squares, and three hexagons.

Proof. Let n be the number of sides of the regular polygon, m the number of sides
starting from a summit in the lattice, α the measure of the exterior angle, β the measure
of the interior angle (in radians) (α + β = π).
Then α = 2π/n, β = π − 2π/n.
mβ = 2π, m(π − 2π/n) = 2π, m(1 − 2/n) = 2, so
1 1 1
+ = , m > 0, n > 0. (1)
m n 2
As this equation is symmetric in m, n, we may suppose first m ≤ n.
In this case 1/m ≥ 1/n, so 2/n ≤ 1/2 : n ≥ 4.
If n > 6, 1/n < 1/6, 1/m = 1/2 − 1/n > 1/2 − 1/6 = 1/3, so m < 3, m ≤ 2 : m = 1
or m = 2.
If m = 1, n < 0 : it is impossible. If m = 2, 1/n = 0 : also impossible. Therefore
n ≤ 6 : 4 ≤ n ≤ 5. If n = 4, m = 4. if n = 5, n = 10/3 : impossible. if n = 6, m = 3.
Using the symmetry, the set of solutions of (1) is

S = {(3, 6), (6, 3), (4, 4)},

corresponding with the usual lattices composed of equilateral triangles, squares or hexagons.

Ex. 1.13 Let n1 , n2 , . . . , ns ∈ Z. Define the greatest common divisor d of n1 , n2 , . . . , ns


and prove that there exist integers m1 , m2 , . . . , ms such that n1 m1 +n2 m2 · · ·+ns ms = d.

Proof. Let n1 , n2 , . . . , ns ∈ Z. The ideal of Z, (n1 , . . . , ns ) = n1 Z + · · · + ns Z is principal,


so there exists an unique d ∈ Z, d ≥ 0 such that

n1 Z + · · · + ns Z = d Z (d ≥ 0).

We define

d = gcd(n1 , . . . , ns ) ⇐⇒ n1 Z + · · · + ns Z = d Z and d ≥ 0. (2)

The characterization of the gcd is

d = gcd(n1 , . . . , ns ) ⇐⇒

(i) d ≥ 0 (3)
(ii) d | n1 , . . . , d | ns (4)
(iii) ∀δ ∈ Z, (δ | n1 , . . . , δ | ns ) ⇒ δ | d (5)

(⇒) Indeed, if we suppose (1), then d ≥ 0, and n1 = n1 .1 + n2 .0 + · · · + ns .0 ∈


n1 Z + · · · + ns Z = d Z, so d | n1 . Similarly d | ni , 1 ≤ i ≤ s so (i)(ii) are true. if
δ | ni , 1 ≤ i ≤ s, as d = n1 m1 + · · · + ns ms , m1 , . . . , ms ∈ Z, then δ | d.
(⇐) Suppose that d verify (i)(ii)(iii). From (ii), we see that ni Z ⊂ dZ, i = 1, . . . , s,
so n1 Z + · · · + ns Z ⊂ dZ.

7
As Z is a principal ring, there exists δ ≥ 0 such that n1 Z + · · · + ns Z = δ Z. ni ∈
n1 Z+· · ·+ns Z so ni ∈ δZ, i = 1, . . . , s : δ | n1 , . . . , δ | ns . From (iii), we deduce δ | d. As
δZ ⊂ dZ, d | δ, with d ≥ 0, δ ≥ 0. Consequently, d = δ and n1 Z + · · · + ns Z = d Z, d ≥ 0,
so d = gcd(n1 , . . . , ns ).
At last, as n1 Z + · · · + ns Z = d Z, there exist integers m1 , m2 , . . . , ms such that
n1 m1 + n2 m2 + · · · + ns ms = d.

Ex. 1.14 Discuss the solvability of a1 x1 + a2 x2 + · · · + ar xr = c in integers. (Hint:


Use Exercise 13 to extend the reasoning behind Exercise 6.)

Proof. Let a1 , a2 , . . . , ar ∈ Z.
Note gcd(a1 , a2 , . . . , ar ) = a1 ∧ a2 ∧ · · · ∧ ar . The following result generalizes Ex. 6 :

∃(x1 , x2 , . . . , xr ) ∈ Zr , a1 x1 + a2 x2 + · · · + ar xr = c ⇐⇒ a1 ∧ a2 ∧ · · · ∧ ar | c.

Let d = a1 ∧ a2 ∧ · · · ∧ ar .
• If a1 x1 + a2 x2 + · · · + ar xr = c, as d | a1 , . . . , d | ar , d | a1 x1 + a2 x2 + · · · + ar xr = c.
• Conversely, if d | c, then c = dc′ , c′ ∈ Z.
As dZ = a1 Z+a2 Z+· · ·+ar Z, so d = a1 m1 +a2 m2 +· · ·+ar mr , m1 , m2 , . . . , mr ∈ Z.
c = dc′ = a1 (m1 c′ ) + · · · ar (mr c′ ) = a1 x1 + · · · + ar xr , where xi = mi c′ , i = 1, 2, . . . , r.

Ex. 1.15 Prove that a ∈ Z is the square of another integer iff ordp (a) is even for all
primes p. Give a generalization.

Proof. Suppose a = b2 , b ∈ Z. Then ordp (a) = 2 ordp (b) is even for all primes p.
Conversely, Qsuppose that ordp (a) is even for all primes p. We must also suppose
a > 0. Let a = pa(p ) the decomposition of a in primes. As a(p) is even, a(p) = 2b(p)
p
for an integer b(p) function of the prime p. Let b = pb(p) . Then a = b2 .
Q
p
With a similar proof, we obtain the following generalization for each integer a ∈
Z, a > 0 :
a = bn for an integer b ∈ Z iff n | ordp (a) for all primes p.

Ex. 1.16 If (u, v) = 1 and uv = a2 , show that both u and v are squares.

Proof. Here u, v ∈ N, where N = {0, 1, 2, . . .}.


For all primes p such that p | u, ordp (u) + ordp (v) = 2 ordp (a). As u ∧ v = 1 and p | u,
then p ∤ v, thus ordp (v) = 0. Therefore ordp (u) is even for all prime p such that p | u.
From Exercise 1.15, we can conclude that u is a square. Similarly, v is a square.

Ex. 1.17 Prove that the square root of 2 is irrational, i.e., that there is no rational
number r = a/b such that r2 = 2.

Proof. Suppose that there exists some r ∈ Q, r > 0, such that r2 = 2. Then r = a/b, a ∈
N∗ , b ∈ N∗ . With d = a ∧ b, a = da′ , b = db′ , a′ ∧ b′ = 1, so r = a′ /b′ , a′ ∧ b′ = 1, so we
may suppose r = a/b, a > 0, b > 0, a ∧ b = 1 and a2 = 2b2 .
a2 is even, then a is even (indeed, if a is odd, a = 2k + 1, k ∈ Z, a2 = 4k 2 + 4k + 1 =
2(2k 2 + 2k) + 1 is odd).
So a = 2A, A ∈ N, then 4A2 = 2b2 , 2A2 = b2 .

8
With the same reasoning, b2 is even, then b is even, so b = 2B, B ∈ N. Thus 2 | a, 2 | b,
2 | a ∧ b, in contradiction
√ with a ∧ b = 1.
Conclusion : 2 is irrational.

n
Ex. 1.18 Prove that m is irrational if m is not the n-th power of an integer.

Proof. Here m ∈ N.

Suppose that r = n m ∈ Q. As r ≥ 0, r = a/b, a ≥ 0, b > 0, a ∧ b = 1. Moreover
rn = m, thus an = mbn .
For every prime p, n ordp (a) = ordp (m) + n ordp (b), so n | ordp (m).
From Ex. 1.15, we conclude that m is a n-th power.

Conclusion : if m ≥ 0 is not the n-th power of an integer, n m is irrational.

Ex. 1.19 Define the least common multiple of two integers a and b to be an integer m
such that a | m, b | m, and m divides every common multiple of a and b. Show that such
an m exists. It is determined up to sign. We shall denote it by [a, b].

Proof. As aZ ∩ bZ is an ideal of Z, and Z is a principal ideal domain, there exists an


unique m ≥ 0 such that aZ ∩ bZ = mZ. So by definition,

m = [a, b] ⇐⇒ aZ ∩ bZ = mZ and m ≥ 0.

We may note also [a, b] = a ∨ b.


Characterization of lcm :

m = a ∨ b ⇐⇒
(i) m ≥ 0
(ii) a | m, b | m
(iii) ∀µ ∈ Z, (a | µ, b | µ) ⇒ m | µ

(⇒) By definition, m ≥ 0. m ∈ mZ = aZ ∩ bZ, so a | m and b | m : (ii) is verified. If


µ ∈ Z is such that a | µ, b | µ, then µ ∈ aZ ∩ bZ = mZ, so m | µ : (iii) is true.
(⇐) Suppose that m verifies (i),(ii),(iii). Let m′ such that aZ ∩ bZ = m′ Z, m′ ≥ 0.
We show that m = m′ .
As m′ ∈ aZ ∩ bZ, a | m′ , b | m′ , so we see from (iii) that m | m′ . From (ii), we obtain
that m ∈ aZ ∩ bZ = m′ Z, thus m′ | m, m ≥ 0, m′ ≥ 0. The conclusion is m = m′ and
aZ ∩ bZ = mZ, m ≥ 0, so m = a ∨ b.

Ex. 1.20 Prove the following:


(a) ordp [a, b] = max(ordp (a), ordp (b)).
(b) (a, b)[a, b] = ab.
(c) (a + b, [a, b]) = (a, b).

Proof.
pa(p) , b = ε′ pb(p) , ε, ε′ = ±1, and
Q Q
(a) Let a = ε
p p
Y
m= pmax(a(p),b(p)) .
p

Then

9
(i) m ≥ 0.
(ii) As a(p) ≤ Q max(a(p), b(p)), pa(p) | pmax(a(p),b(p)) , so a | m. Similarly, b | m.
(iii) If µ = ε ′′ pc(p) is a common multiple of a and b, then for all primes p, a(p) ≤
p
c(p), b(p) ≤ c(p), so max(a(p), b(p)) ≤ c(p), so m | µ. Since m verifies the characterization
of lcm, we obtain
Therefore ordp [a, b] = max(ordp (a), ordp (b)).
(b) Similarly, we prove that Y
a∧b= pmin(a(p),b(p)) .
p

As max(a, b) + min(a, b) = a + b, we obtain

(a ∨ b)(a ∧ b) = |ab|.

Second proof (without decompositions in primes):


Let d = a ∧ b. If d = 0, then a = b = 0 and (a ∨ b)(a ∧ b) = ab.
Suppose now that d ̸= 0. There exist integers a′ , b′ such that

a = da′ , b = db′ , a′ ∧ b′ = 1.

Let m = da′ b′ . Then a = da′ | m and b = db′ | m. If µ is a common multiple of a


and b, then d | µ, and a′ | µ/d, b′ | µ/d. As a′ ∧ b′ = 1, a′ b′ | µ/d (see Ex.1.9). Thus
m = da′ b′ | µ.
|m| verifies the characterization of lcm (Ex. 1.19), so a ∨ b = |m| = |da′ b′ | = |ab|/d.
Conclusion : (a ∨ b)(a ∧ b) = |ab|.
(c) Let δ ∈ Z. If δ | a, δ | b, then δ | a + b and δ | a ∨ b.
Conversely, suppose that δ | a + b, δ | a ∨ b.
Let a′ , b′ ∈ Z such that a = da′ , b = db′ , a′ ∧ b′ = 1. Then a ∨ b = da′ b′ , so

δ | d(a′ + b′ ),
δ | da′ b′ .

Multiplying the first relation by b′ and similarly by a′ , we obtain :

δ | da′ b′ + db′2 , δ | da′2 + da′ b′ .

Since δ | da′ b′ , we obtain :

δ | db′2
δ | da′2

As a′2 ∧ b′2 = 1, δ | d(a′2 ∧ b′2 ) = d, so δ | a, δ | b.


The set of divisors of a, b is the same that the set of divisors of a + b, a ∨ b, so

(a + b) ∧ (a ∨ b) = a ∧ b.

10
Ex. 1.21 Prove that ordp (a + b) ≥ min(ordp a, ordp b) with equality holding if ordp a ̸=
ordp b.

Proof. As a ∧ b | a + b, ordp (a ∧ b) ≤ ordp (a + b), so min(ordp (a), ordp (b)) ≤ ordp (a + b).
Suppose ordp (a) ̸= ordp (b),The problem being symmetric in a, b, we may suppose
α = ordp (a) < β = ordp (b). So there exist q, r ∈ Z such that

a = pα q, p ∤ q
b = pβ r, p ∤ r α < β.

Then a + b = pα (q + pβ−α r), where p ∤ q + pβ−α r (as p | pβ−α and p ∤ q).


So ordp (a + b) = α = min(ordp (a), ordp (b)).

Ex. 1.22 Almost all the previous exercises remain valid if instead of the ring Z we
consider the ring k[x]. Indeed, in most we can consider any Euclidean domain. Convince
yourself of this fact. For simplicity we shall continue to work in Z.

Proof. We can adapt all the preceding proofs to the Euclidean domain k[x]. The only
difference is that the units in Z are ±1, and the units in k[x] are the elements of k ∗ .

Ex. 1.23 Suppose that a2 + b2 = c2 with a, b, c ∈ Z. For example, 32 + 42 = 52 and


52 + 122 = 132 . Assume that (a, b) = (b, c) = (c, a) = 1. Prove that there exist integers u
and v such that c − b = 2u2 and c + b = 2v 2 and (u, v) = 1 (there is no loss in generality
in assuming that b and c are odd and that a is even). Consequently a = 2uv, b = v 2 − u2 ,
and c = v 2 + u2 . Conversely show that if u and v are given, then the three numbers a, b,
and c given by these formulas satisfy a2 + b2 = c2 .

Proof. Suppose x2 + y 2 = z 2 , x, y, z ∈ Z. Let d = x ∧ y ∧ z. If d = 0, then x = y = z = 0.


If d ̸= 0, and a = x/d, b = y/d, c = z/d, then a2 + b2 = c2 , with a ∧ b ∧ c = 1. If a prime
p is such that p | a, p | b, then p | c2 , so p | c (as p is a prime). Then p | a ∧ b ∧ c = 1 :
this is impossible, so a ∧ b = 1, and similarly a ∧ c = 1, b ∧ c = 1.
If a, b are odd, then a2 ≡ b2 ≡ 1 (mod 4), so c2 ≡ 2 (mod 4). As the squares modulo
4 are 0, 1, this is impossible. As a ∧ b = 1, a, b are not both even, so a, b are not of the
same parity. Without loss of generality, we may exchange a, b so that a is even, b is odd,
and then c is odd.
a2 = c2 − b2 = (c − b)(c + b), so
 a 2  c − b   c + b 
= .
2 2 2

where a/2, (c − b)/2, (c + b)/2 are integers.


If d | (c − b)/2 and d | (c + b)/2, then d | c = (c + b)/2 + (c − b)/2, and d | b =
(c − b)/2 − (c − b)/2, so d | c ∧ b = 1. This proves
   
c+b c−b
∧ = 1.
2 2

Using Ex. 1.16, we see that (c + b)/2 and (c − b)/2 are squares : there exist u, v such
that
c − b = 2u2 , c + b = 2v 2 , u ∧ v = 1.

11
(a/2)2 = u2 v 2 , and we can choose the signs of u, v such that a = 2uv. Then b =
v 2 − u2 , c = v 2 + u2 . There exists λ ∈ Z (λ = d) such that x = 2λuv, y = λ(v 2 − u2 ), z =
λ(v 2 + u2 ).
Conversely, if λ, u, v are any integers, (2λuv)2 + (λ(v 2 − u2 )2 = λ2 (4u2 v 2 + v 4 + u4 −
2u v 2 ) = λ2 (v 4 + u4 + 2u2 v 2 ) = (λ(u2 + v 2 ))2 .
2

Conclusion : if x, y, z ∈ Z,

x2 + y 2 = z 2 ⇐⇒ ∃λ ∈ Z, ∃(u, v) ∈ Z2 , u ∧ v = 1,

 x = λ(v 2 − u2 )
 
 x = 2λuv
y = λ(v − u )2 2 or y = 2λuv

z = λ(v + u )2 2 
z = λ(v 2 + u2 )

Ex. 1.24 Prove the identities


(a) xn − y n = (x − y)(xn−1 + xn−2 y + · · · + y n−1 )
(b) For n odd, xn + y n = (x + y)(xn−1 − xn−2 y + · · · + y n−1 )

Proof. Let R any commutative ring, and x, y ∈ R.


a) Let
n−1
X
S= xn−1−i y i .
i=0

Then
n−1
X n−1
X
xS = xn−i y i = xn + xn−i y i
i=0 i=1
n−1
X n
X
yS = xn−1−i y i+1 = xn−j y j (j = i + 1)
i=0 j=1
n−1
X
n
=y + xn−i y i .
i=1

So xS − yS = xn − y n ,
n−1
X
n n
x − y = (x − y) xn−1−i y i = (x − y)(xn−1 + xn−2 y + · · · + xn−1−i y i + · · · + y n−1 ).
i=0

b) If we substitute −y by y, we obtain
n−1
X
xn − (−1)n y n = (x + y) (−1)i xn−1−i y i .
i=0

If n is odd,
n−1
X
n n
x +y = (x+y) (−1)i xn−1−i y i = (x+y)(xn−1 −xn−2 y+· · ·+(−1)i xn−1−i y i +· · ·+y n−1 ).
i=0

12
Ex. 1.25 If an − 1 is a prime, show that a = 2 and that n is a prime. Primes of the
form 2p − 1 are called Mersenne primes. For example, 23 − 1 = 7 and 25 − 1 = 31. It is
not known if there are infinitely many Mersenne primes.

Proof. Suppose n > 1, a ≥ 0, and an − 1 is a prime. As 0n − 1 = −1, 1n − 1 = 0 are not


primes, a ≥ 2.
Since (an − 1) = (a − 1)(an−1 + · · · + ai + · · · + 1), a − 1 is a factor of the prime an − 1,
so a − 1 = 1 or a − 1 = an − 1.
As a ≥ 2, and n > 1, a = an is impossible, thus a = 2.
If n ≥ 2 wasn’t prime, then n = uv, 1 < u < n, 1 < v < n, and

2n − 1 = 2uv − 1 = (2u − 1)(2u(v−1) + · · · + 2ui + · · · + 1).

where 1 = 21 − 1 < 2u − 1 < 2n − 1. Therefore 2n − 1 has a non trivial factor. This


is impossible, therefore n is a prime.
Conclusion: if an − 1 (a ≥ 0, n > 1) is a prime, then a = 2 and n is a prime.

Ex. 1.26 If an + 1 is a prime, show that a is even and that n is a power of 2. Primes
t 1 2
of the form 22 + 1 are called Fermat primes. For example, 22 + 1 = 5 and 22 + 1 = 17.
It is not known if there are infinitely many Fermat primes.

Proof. If a = 1, an + 1 is a prime. Suppose a > 1, and n > 1. If a was odd, an + 1 > 2 is


even, so is not a prime. Consequently, if an + 1 is prime, a > 1, then a is even.
Write n = 2t u, where u is odd.
If u > 1, then, from Ex. 24(b), we obtain
u−1
tu t t
X
an + 1 = a2 + 1 = (a2 + 1) (−1)i ai2 .
i=0

t t
So 1 < a2 + 1 < an + 1, and a2 + 1 is a non trivial factor of an + 1, in contradiction
with the hypothesis.
Conclusion : if an + 1 is a prime (a > 1, n > 1), a is even and n is a power of 2.

Ex. 1.27 For all odd n show that 8 | n2 − 1. If 3 ∤ n, show that 6 | n2 − 1.

Proof. As n is odd, write n = 2k + 1, n ∈ Z. Then

n2 − 1 = (2k + 1)2 − 1 = 4k 2 + 4k = 4k(k + 1).

As k or k + 1 is even, 8 | n2 − 1.
(n − 1)n(n + 1) = n(n2 − 1), product of three consecutive numbers, is a multiple of 3.
As 3 ∤ n, and 3 is a prime, 3 ∧ n = 1, so 3 | n2 − 1.

3 ∤ n ⇒ 3 | n2 − 1.

(This is also a consequence of Fermat’s Little Theorem.)


As n is odd, n2 − 1 is even. 3 | n2 − 1, 2 | n2 − 1 and 2 ∧ 3 = 1, so 6 | n2 − 1.

13
Ex. 1.28 For all n show that 30 | n5 − n and that 42 | n7 − n.

Proof. If we want to avoid Fermat’s Little Theorem (Prop. 3.3.2. Corollary 2 P. 33),
note that

(n − 2)(n − 1)n(n + 1)(n + 2) = n(n2 − 1)(n2 − 4)


= n5 − 5n2 + 4n
= n5 − n + 5(−n2 + n)

As the product of 5 consecutive numbers is divisible by 5,

5 | n5 − n.

Moreover,

2 | (n − 1)n | (n4 − 1)n = n5 − n


3 | (n − 1)n(n + 1) = n(n2 − 1) | n(n4 − 1) = n5 − n

As 2, 3, 5 are distinct primes, 2 × 3 × 5 = 30 | n5 − n.


Similarly,

(n − 3)(n − 2)(n − 1)n(n + 1)(n + 2)(n + 3) = n(n2 − 1)(n2 − 4)(n2 − 9)


= n(n4 − 5n2 + 4)(n2 − 9)
= n7 − 14n5 + 49n3 − 36n
= n7 − n + 7(−2n5 + 7n3 − 5n)

As the product of 7 consecutive numbers is divisible by 7,

7 | n7 − n.

Moreover

2 | (n − 1)n | (n6 − 1)n = n7 − n


3 | (n − 1)n(n + 1) = n(n2 − 1) | n(n6 − 1) = n7 − n

As 2, 3, 7 are distinct primes 2 × 3 × 7 = 42 | n7 − n.

Ex. 1.29 Suppose that a, b, c, d ∈ Z and that (a, b) = (c, d) = 1.


If (a/b) + (c/d) = an integer, show that b = ±d.

Proof. If ab + dc = n ∈ Z (a ∧ b = c ∧ d = 1), then ad + bc = nbd, thus d | bc, d ∧ c = 1,


which implies d | b. Similarly b | d. Then d = ±b.

1 1 1
Ex. 1.30 Prove that Hn = 2 + 3 + ... +
is not an integer.
n

Proof. Let s such that 2s ≤ n < 2s+1 (s = ln


 n
ln 2 ≥ 1).
Pn
1 1 ai n!
Hn = + · · · + = i=2 , where ai = ∈ Z.
2 n n! i
Let k = ord2 (n!). We will show that ords (ai ) is minimal for i0 = 2s , where ord2 (ai0 ) =
k − s, and that this minimum is reached only for this index i0 .

14
Indeed, each i such that 2 ≤ i ≤ n can be written with the form i = 2t q, 2 ∤ q. Then
i = 2t q ≤ n < 2s+1 , so 2t < 2s+1 , t < s + 1, t ≤ s, which proves

ord2 (ai ) = k − t ≥ k − s = ord2 (ai0 ).

Moreover, if ord2 (ai ) = ord2 (ai0 ), then k − t = k − s, so s = t.


Since s = t, i = 2s q, where 2 ∤ q. If q > 1, then i ≥ 2s+1 > n : it’s impossible. So
q = 1 and i = 2s = i0 .
Using Ex 1.21, we see that
n
!
X
ord2 ai = ord2 (ai0 ) = k − s < k = ord2 (n!).
i=2

So
2k−s Q Q
Hn = k
= s ,
2 R 2 R
where Q, R are odd integers. Hn is a quotient of an odd integer by an even integer: Hn
is never an integer.

Ex. 1.31 Show that 2 is divisible by (1 + i)2 in Z[i].

Proof. (1 + i)2 = 1 + 2i − 1 = 2i, so 2 = −i(1 + i)2 is divisible by (1 + i)2 . (As i is an


unit, 2 and (1 + i)2 are associate.)

Ex. 1.32 For α = a + bi ∈ Z[i] we defined λ(α) = a2 + b2 . From the properties of λ


deduce the identity (a2 + b2 )(c2 + d2 ) = (ac − bd)2 + (ad + bc)2 .

Proof. For all complex numbers α, β, |αβ| = |α||β|, so

λ(αβ) = λ(α)λ(β).

If α = a + bi ∈ Z[i), β = c + di ∈ Z[i], then αβ = (ac − bd) + (ad + bc)i, thus

(a2 + b2 )(c2 + d2 ) = (ac − bd)2 + (ad + bc)2 .

Ex. 1.33 Show that α ∈ Z[i] is a unit iff λ(α) = 1. Deduce that 1, -1, i, and - i are
the only units in Z[i].

Proof. Let α = a + bi ∈ Z[i].


• If λ(α) = 1, then αα = 1, where α = a − bi ∈ Z[i], so α is an unit.
• Conversely, if α is an unit, there exists β ∈ Z[i] such that αβ = 1, then λ(α)λ(β) =
1, where λ(α), λ(β) are positive integers, hence λ(α) = 1.
So α = a + ib is an unit of Z[i] if and only if a2 + b2 = 1. In this case, |a|2 ≤ 1,
a ∈ {0, 1, −1}. If a = 0, b = ±1, and if a = ±1, b = 0, so the only units of Z[i] are
1, i, −1, −i.

15
Ex. 1.34 Show that 3 is divisible by (1 − ω)2 in Z[ω].

Proof. As ω 3 = 1, ω = ω 2 , and 1 + ω + ω 2 = 0, so
|1 − ω|2 = (1 − ω)(1 − ω 2 ) = 1 + ω 3 − ω − ω 2 = 3, therefore

3 = (1 − ω)(1 − ω 2 ).

Consequently,

3 = (1 − ω)(1 − ω 2 ) = (1 + ω)(1 − ω)2 = −ω 2 (1 − ω)2 .

3 is divisible by (1 − ω)2 in Z[ω].


Note: As −ω 2 is an unit, 3 and (1 − ω)2 are associated. This shows that 3 is not
irreducible in Z[ω].

Ex. 1.35 For α = a + bω ∈ Z[ω] we defined λ(α) = a2 − ab + b2 . Show that α is a unit


iff λ(α) = 1. Deduce that 1, −1, ω, −ω, ω 2 , and − ω 2 are the only units in Z[ω].

Proof. If α = a + bω ∈ Z[ω], using 1 + ω + ω 2 = 0 and ω = ω 2 , we obtain

αα = (a + bω)(a + bω 2 )
= a2 + b2 + ab(ω + ω 2 )
= a2 + b2 − ab
= λ(α)

Consequently, λ is a multiplicative function.


• If λ(α) = 1, then αα = 1, where α = a + bω 2 = (a − b) − bω ∈ Z[ω], so α is an unit.
• Conversely, if α is an unit, there exists β ∈ Z[ω] such that αβ = 1, then λ(α)λ(β) =
1, where λ(α), λ(β) are positive integers, so λ(α) = 1.

λ(α) = 1 ⇐⇒ a2 − ab + b2 = 1
⇐⇒ (2a − b)2 + 3b2 = 4

3b2 ≤ 4, so b = 0 or b = ±1.
If b = 0, then a = ±1, α = 1 or α = −1
If b = 1, then (2a − 1)2 = 1, 2a − 1 = ±1 : a = 0 or a = 1, α = ω or α = 1 + ω = −ω 2 .
If b = −1, then (2a + 1)2 = 1, 2a + 1 = ±1 : a = 0 or a = −1, α = −ω or
α = −1 − ω = ω 2 .
So
λ(α) = 1 ⇐⇒ α ∈ {1, ω, ω 2 , −1, −ω, −ω 2 }.
The set of units of Z[ω] is the group of the roots of x6 − 1.
√ √
Ex. 1.36 Define Z[ −2] √ as the set of all complex numbers of the form a + b√−2,
where a, b ∈ Z. Show that 2 2
√ Z[ −2] is a ring. Define λ(α) = a + 2b for α = a + b −2.
Use λ to show that Z[ −2] is a Euclidean domain.

16
√ √ √
Proof. Note −2√= i 2, and A √ = Z[ −2].
Let α = a +√b −2, β = c + d −2 ∈ A :
• 1 = 1 + 0 −2 √ ∈ A. √ √
• α − β = (a +√b −2) − (c √ + d −2) = (a − c) + (b − d)√ −2 ∈ A.
• αβ = (a + b −2)(c + d −2) = (ac √ − 2bd) + (ad + bc) −2 ∈ A.
√ of (C, +, ×) : Z[ −2] is a ring.
So A is a subring
Let z = a + b −2 be any complex number, and define integers a0 , b0 ∈ Z such that
|a − a0 | ≤ 1/2,
 |b − b0 | ≤ 1/2 (it
√ suffice to take for a0 the nearest integer of a, that is
1
a0 = a + 2 ). Let z0 = a0 + b0 −2.
As λ(z) = zz = a2 + 2b2 , then
1 1 3
λ(z − z0 ) = (a − a0 )2 + 2(b − b0 )2 ≤ + 2 × = < 1.
4 4 4
Conclusion : for any z ∈ C, there exists z0 ∈ A such that λ(z − z0 ) < 1.
Let (z1 , z2 ) ∈ A × A, z2 ̸= 0. We apply the preceding result to the complex z1 /z2 :
there exists q ∈ A such that zz12 − q ≤ 1. Let r = z1 − qz2 . Then z1 = qz2 + r, λ(r) <
λ(z2 ). √
So Z[ −2] is a Euclidean domain.

Ex. 1.37 Show that the only units in Z[ −2] are 1 and −1.

Proof. As in Ex. 35, we prove that α = a + b −2 is an unit if and only if λ(α) = 1, i.e.
a2 + 2b2 = 1. As 2b2 ≤ 1, b = 0, and a2 = 1. So the only units are 1 and −1.

Ex. 1.38 Suppose that π ∈ Z[i] and that λ(π) = p is a prime in Z. √Show that π is a
prime in Z[i]. Show that the corresponding result holds in Z[ω] and Z[ −2].

Proof. If π = αβ, where α, β ∈ Z[i], then p = λ(π) = λ(α)λ(β). As p is a prime in Z, and


λ(α) ≥ 0, , λ(β) ≥ 0, λ(α) = 1 or λ(β) = 1, so (Ex.1.33) α or β is an unit. Consequently,
π is irreducible in √
Z[i]. As Z[i] is a PID, π is a prime in Z[i] (Prop. 1.3.2 Corollary 2).
As Z[ω] and Z[ −2] are Euclidean domains, the same result is true in these principal
ideals domains.

Ex. 1.39 Show that in any integral domain a prime element is irreducible.

Proof. Let R an integral domain, and π a prime in R.


If π = αβ, α, β ∈ R, a fortiori π divides αβ. As π is a prime, π divides α or β, say α,
so there exists ξ ∈ R such that α = ξπ, so π = ξπβ, π(1 − ξβ) = 0. As A is an integral
domain, and π ̸= 0 by definition, 1 = ξβ, so β is an unit. If π = αβ, α or β is a unit, so
π is irreducible.

17
Chapter 2

Ex 2.1 Show that k[x], with k a finite field, has infinitely many irreducible polynomi-
als.
Proof. Suppose that the set S of irreducible polynomials is finite : S = {P1 , P2 , . . . , Pn }.
Let Q = P1 P2 · · · Pn + 1. As S contains the polynomials x − a, a ∈ k, deg(Q) ≥
q = |k| > 1. Thus Q is divisible by an irreducible polynomial. As S contains all the
irreducible polynomials, there exists i, 1 ≤ i ≤ n, such that Pi | Q = P1 P2 · · · Pn + 1, so
Pi | 1, and Pi is an unit, in contradiction with the irreducibility of Pi .
Conclusion: k[x] has infinitely many irreducible polynomials. As each polynomial
has only a finite number of associates, there exist infinitely many monic irreducible
polynomials.

Ex. 2.2. Let p1 , p2 , . . . , pt ∈ Z be primes and consider the set of all rational numbers
r = a/b, a, b ∈ Z, such that ordpi a ≥ ordpi b for i = 1, 2, . . . , t. Show that this set is a
ring and that up to taking associates p1 , p2 , . . . , pt are the only primes.
Proof. Let R the set of such rationals. Simplifying these fractions, we obtain
p
r ∈ R ⇐⇒ ∃p ∈ Z, ∃q ∈ Z \ {0}, r = , q ∧ p1 p2 · · · pt = 1.
q
• 1 = 1/1 ∈ R.
• if r, r′ ∈ R, r = p/q, r′ = p′ /q ′ , with q ∧ p1 p2 · · · pt = 1, q ′ ∧ p1 p2 · · · pt = 1. then
′ −qp′ ′
qq ′ ∧ p1 p2 · · · pt = 1, and r − r′ = pq qq ′ , rr′ = pp ′ ′
qq ′ , so r − r , rr ∈ R.
Thus R is a subring of Q.
If r = a/b ∈ R is an unit of R, then b/a ∈ R, so ordpi a = ordpi (b), i = 1, . . . , t. After
simplification, r = p/q, with p ∧ p1 · · · pt = 1, q ∧ p1 · · · pt = 1, and such rationals are all
units.
Note that pi , 1 ≤ i ≤ t, is a prime: if pi | rs in R, where r = a/b, s = c/d ∈ R, then
there exists u = e/f ∈ R such that rs = pi u, with b, d, f relatively prime with p1 , . . . , pt .
Then acf = pi bde. As pi ∧ f = 1, pi divides a or c in Z, so pi divides r or s in R.
If r = a/b ∈ R, with b ∧ p1 · · · pr = 1, a = pk11 · · · pkt t v, v ∈ Z, ki ≥ 0, i = 1, . . . , t. So
r = upk11 · · · pkt t , where u = v/b is an unit.
Let π be any prime in R. As any element in R, π = upk11 · · · pkt t , ki ≥ 0, u = a/b an
unit. u−1 π = pk11 · · · pkt t , so π | pk11 · · · pkt t (in R). As π is a prime in R, π | pi for an index
i = 1, . . . , t. Thus pi = qπ, where q ∈ R. Since pi is irreducible, q is a unit, so pi and π
are associate.
Conclusion: the primes in R are the associates of p1 , . . . , pt .

Ex. 2.3 Use the formula for ϕ(n) to give a proof that there are infinitely many primes.
[Hint: If p1 , p2 , . . . , pt were all the primes, then ϕ(n) = 1, where n = p1 p1 · · · pt .]
Proof. Let {p1 , · · · , pt } the finite set of primes,with p1 < p2 < · · · < pt , and n = p1 · · · pt .
By definition, ϕ(n) is the number of integers k, 1 ≤ k ≤ n, such that k ∧ n = 1. From the
existence of decomposition in primes, if k ≥ 1, k = pk11 · · · pkt t , where ki ≥ 0, i = 1, . . . , t.
So k ∧ n = 1 if and only if k = 1. Thus ϕ(n) = 1 The formula for ϕ(n) gives ϕ(n) =
(p1 − 1) · · · (pt − 1) = 1. As pi ≥ 2, this equation implies that p1 = p2 = · · · = pt = 2,
so t = 1, and the only prime number is 2. But 3 is also a prime number : this is a
contradiction.
Conclusion : there are infinitely many prime numbers.

18
n m
Ex. 2.4 If a is a nonzero integer, then for n > m show that (a2 + 1, a2 + 1) = 1 or
2 depending on whether a is odd or even.
n m n m
Proof. Let d = a2 + 1 ∧ a2 + 1. Then d | a2 + 1, d | a2 + 1. So
n
a2 ≡ −1 (mod d),
2m
a ≡ −1 (mod d).

As n > m, 2n−m is even, so


n m 2n−m n−m
−1 ≡ a2 = a2 ≡ (−1)2 ≡1 (mod d).

−1 ≡ 1 (mod d), then d | 2 (d ≥ 0). Thus d = 1 or d = 2.


n
If a is even, a2 + 1 is odd, so d = 1.
n m
If a is odd, both a2 + 1, a2 + 1 are even, so d = 2.

Ex. 2.5 Use the result of Ex. 2.4 to show that there are infinitely many primes. (This
proof is due to G.Polya.)
n
Proof. Let Fn = 22 + 1, n ∈ N. We know from Ex. 2.4 that n ̸= m ⇒ Fn ∧ Fm = 1.
Define pn as the least prime factor of Fn . If n ̸= m, Fn ∧ Fm = 1, so pn ̸= pm . The
application φ : N → N, n 7→ pn is injective (one to one), so φ(N) is an infinite set of
prime numbers.

Ex. 2.6 For a rational number r let ⌊r⌋ be the largest integer
j k jlessk than
j ork equal to r,
1  1
 n n n
e.g., 2 = 0, ⌊2⌋ = 2, and 3 + 3 = 3. Prove ordp n! = p + p2 + p3 + · · · .

Proof. The number Nk of multiples m of pk which are not multiple of pk+1 , where
1 ≤ m ≤ n, is    
n n
Nk = k − k+1 .
p p
n
P
Each of these numbers brings the contribution k to the sum ordp n! = ordp i. Thus
i=1

X  n   n 
ordp n! = k − k+1
pk p
k≥1
X n X  n 
= k k − k k+1
p p
k≥1 k≥1
   
X n X n
= k k − (k − 1) k
p p
k≥1 k≥2
  X 
n n
= +
p pk
k≥2
X n 
=
pk
k≥1
j k
n
Note that pk
= 0 if pk > n, so this sum is finite.

19

n
n! ≤ p≤n p1/(p−1) .
Q
Ex. 2.7 Deduce from Ex. 2.6 that ordp n! ≤ n/(p − 1) and that
(The original statement p|n p1/(p−1) was modified.)
Q

Proof.
X n  X n n 1 n
ordp n! = ≤ = 1 =
pk p k p1− p
p−1
k≥1 k≥1

The decomposition of n! in prime factors is


n! = pα1 1 pα2 2 · · · pαk k where αi = ordpi n! ≤ pin−1 , and pi ≤ n, i = 1, 2, · · · , k.
Then
n n n
p −1 p −1
n! ≤ p1 1 p2 2 · · · pkpn −1

n
1
p −1
1
p −1
1
n! ≤ p1 1 p2 2 · · · pkpn −1
Y 1
≤ p p−1
p≤n

(the values of p in this product describe all prime numbers p ≤ n.)

Ex. 2.8 Use Exercise 7 to show that there are infinitely many primes.

Proof. If the set P of prime numbers was finite, we obtain from Ex.2.7, for all n ≥ 2,

n
Y 1
n! ≤ C = p p−1 ,
p∈P

where C is an√absolute constant.


Yet lim n n! = +∞. Indeed
n→∞


n 1
ln( n!) = (ln 1 + ln 2 + · · · + ln n)
n

As ln is an increasing fonction,
Z i
ln t dt ≤ ln i, i = 2, 3, . . . , n
i−1

So
Z n n Z
X i n
X n
X
ln t dt = ln t dt ≤ ln i = ln i
1 i=2 i−1 i=2 i=1

Thus

n 1
Z
1 n
1
ln( n!) ≥ (n ln n − n + 1) = ln n − 1 +
ln t dt =
n1 n n
√ √
As lim ln n − 1 + n1 = +∞, lim ln( n n!) = +∞, so lim n n! = +∞.
n→∞ n→∞ √ n→∞
Thus there exists n such that n n! ≥ C: this is a contradiction. P is an infinite
set.

20
Ex. 2.9 A function on the integers is said to be multiplicative if f (ab) = f (a)f (b).
whenever (a, b) = 1. Show that a multiplicative function is completely determined by its
value on prime powers.

Proof. Let the decomposition of n in prime factors be n = pk11 · · · pkt t , p1 < · · · < pt . As
k
pki i ∧ pj j = 1 for i ̸= j, i, j = 1, . . . , t,

f (n) = f (pk11 · · · pkt t ) = f (pk11 ) · · · f (pkt t )

(by induction on the number of prime factors.)


So f (n) is completely determined by its value on prime powers.
P
Ex. 2.10 If f (n) is a multiplicative function, show that the function g(n) = d|n f (d)
is also multiplicative.

Proof. If n ∧ m = 1,
X
g(nm) = f (δ)
δ|nm
X
= f (dd′ )
d|n,d′ |m

Actually, if d | n, d′ | m, so δ = dd′ | nm, and conversely, if δ | nm, as n ∧ m = 1, there


exist d, d′ such that d | n, d′ | m, and δ = dd′ .
If d | n, d′ | m, with n ∧ m = 1, then d ∧ d′ = 1, so
XX
g(nm) = f (d)f (d′ )
d|n d′ |m
X X
= f (d) f (d′ )
d|n d′ |m

= g(n)g(m)

g is a multiplicative function.
P
Ex. 2.11 Show that ϕ(n) = n d|n µ(d)/d by first proving that µ(d)/d is multiplicative
and then using Ex. 2.9 and 2.10.

Proof. Let’s verify that µ is a multiplicative function.


If n∧m = 1, then n = pa11 · · · pal l , m = q1b1 · · · qrbr , where p1 , . . . , pl , q1 , . . . qr are distinct
primes. Then the decomposition in prime factors of nm is nm = pa11 · · · pal l q1b1 · · · qrbr . If
one of the ai or one of the bj is greater than 1, then µ(nm) = 0 = µ(n)µ(m). Otherwise,
n = p1 · · · pl , m = q1 · · · qr , nm = p1 · · · pl q1 · · · qr , and µ(nm) = (−1)l+r = (−1)l (−1)r =
µ(n)µ(m). So
µ(nm) µ(n) µ(m)
= .
nm n m
µ(n)
that is, n 7→ n is a multiplicative function.

21
P µ(d)
From Ex.2.10, n 7→ d|n d is also a multiplicative function, and so is ψ, where ψ
is defined by
X µ(d)
ψ(n) = n .
d
d|n

To verify the equality ϕ = ψ, it is sufficient from Ex. 2.9 to verify ϕ(pk ) = ψ(pk ) for all
prime powers pk , k ≥ 1 (ϕ(1) = ψ(1) = 1).
X µ(pk )
ψ(pk ) = pk
pk
d|pk
 
k µ(1) µ(p)
=p +
1 p
(The other terms are null.)
So  
1
ψ(pk ) = pk 1 − = pk − pk−1 = ϕ(pk ).
p
Thus ϕ = ψ : for all n ≥ 1,
X µ(d)
ϕ(n) = n .
d
d|n

2 ϕ(d)2 ,
P P P
Ex. 2.12 Find formulas for d|n µ(d)ϕ(d), d|n µ(d) and d|n µ(d)/ϕ(d).

Proof. As µ, ϕ are multiplicative, so are µϕ, µ2 ϕ2 , µ/ϕ. We deduce from Ex. 2.10 that
the three following fonctions F, G, H are multiplicative, defined by
X X X
F (n) = µ(d)ϕ(d), G(n) = µ(d)2 ϕ(d)2 , H(n) = µ(d)/ϕ(d),
d|n d|n d|n

so it is sufficient to compute their values on prime powers pk , k ≥ 1.

k
X
F (pk ) = µ(pi )ϕ(pi )
i=0
= ϕ(1) − ϕ(p) = 1 − (p − 1) = 2 − p
Q
So F (n) = p|n (2 − p).
Similarly,
k
X
G(pk ) = µ(pi )2 ϕ(pi )2
i=0
= ϕ(1)2 + ϕ(p)2 = 1 + (p − 1)2 = p2 − 2p + 2

k
X
H(pk ) = µ(pi )/ϕ(pi )
i=0
= 1/ϕ(1) − 1/ϕ(p) = 1 − 1/(p − 1) = (p − 2)/(p − 1)

22
k
P
Ex. 2.13 Let σk (n) = d|n d . Show that σk (n) is multiplicative and find a formula
for it.

Proof. As n 7→ nk is multiplicative, then so is σk (Ex. 2.10).


• Suppose that k ̸= 0.
If n = pα is a prime power (α ≥ 1),
α
X
α
σk (p ) = pik
i=0
p(α+1)k −1
=
pk − 1

• if k = 0, σ0 (n) is the number of divisors of n.


α
X
σ0 (pα ) = 1
i=0
=α+1

Conclusion : if n = pα1 1 · · · pαt t is the decomposition of n in prime factors, then

σ0 (n) = (α1 + 1) · · · (αt + 1),


t (α +1)k
Y p i i −1
σk (n) = (k ̸= 0).
i=0
pki − 1

P
Ex. 2.14 If f (n) is multiplicative, show that h(n) = d|n µ(n/d)f (d) is also multi-
plicative.

Proof. We show first that the Dirichlet product f ◦ g of two multiplicative functions f, g
is multiplicative. Suppose that n∧m = 1. If d | n, d′ | m, so δ = dd′ | nm, and conversely,
if δ | nm, as n ∧ m = 1, there exist d, d′ such that d | n, d′ | m, and δ = dd′ . Thus
X  nm 
(f ◦ g)(nm) = f (δ)g
δ
δ|nm
X  nm 

= f (dd )g
dd′
d|n,d′ |m
XX n m
= f (d)f (d′ )g g ′
d d
d|n d′ |m
X  n X
  m
= f (d)g f (d′ )g ′
d ′ d
d|n d |m

= (f ◦ g)(n)(f ◦ g)(m)
P
Applying this result with g = µ, we obtain that n 7→ h(n) = d|n µ(n/d)f (d) is multi-
plicative, if f is multiplicative.

23
Ex. 2.15 Show that
P
(a) d|n µ(n/d)ν(d) = 1 for all n.
P
(b) d|n µ(n/d)σ(d) = n for all n.

Proof. Here ν = σ0 , σ = σ1 .
P P
(a) From the Möbius Inversion Theorem, as ν(n) = d|n 1 = d|n I(d), where I(n) =
1 for all n ≥ 1, X
1 = I(n) = µ(n/d)ν(d).
d|n
P P
(b) From the same theorem, as σ(n) = d|n d = d|n Id(d), where Id(n) = n for all
n ≥ 1, X
n = Id(n) = µ(n/d)σ(d).
d|n

Ex. 2.16 Show that ν(n) is odd iff n is a square.

Proof. • If n = a2 is a square, where a = pk11 · · · pkt t , then ν(n) = (2k1 + 1) · · · (2kt + 1)


is odd.
• Conversely, if ν(n) = ν(q1l1 · · · qrlr ) is odd, then (l1 + 1) · · · (lr + 1) is odd. So each
li + 1 is odd, and then li is even, for i = 1, 2, . . . , r : n is a square.

Ex. 2.17 Show that σ(n) is odd iff n is a square or twice a square.

Proof. • Note that for all r ≥ 0, σ(2r ) = 1 + 2 + 22 + · · · + 2r = 2r+1 − 1 is always odd.


If p ̸= 2, σ(p2k ) = 1 + p + p2 + · · · + p2k is a sum of 2k + 1 odd numbers, so is odd.
Therefore, if n = a2 , or n = 2a2 , a ∈ Z, σ(n) is odd.
• Conversely, suppose that σ(n) is odd, where n = pk11 pk22 · · · pkt t , with p1 = 2 < p2 <
· · · < pt . Then
pk2 +1 − 1 pkt +1 − 1
σ(n) = (2k1 +1 − 1) 2 ··· t
p2 − 1 pt − 1
ki +1
p −1
is odd. Then each ipi −1 = 1+pi +· · ·+pki i (i = 2, · · · , t) is odd. As each pji , j = 0, . . . , ki
is odd, the number of terms ki + 1 is odd, so ki is even (i = 2, . . . , t). Moreover, if k1 is
odd, 2k1 is twice a square. Thus n is a square, or twice a square.

Ex. 2.18 Prove that ϕ(n)ϕ(m) = ϕ((n, m))ϕ([n, m]).

Proof. Let p1 , · · · , pr be the common prime factors of n and m.

n = pα1 1 · · · pαr r q1λ1 · · · qsλs ,


m = pβ1 1 · · · pβr r sµ1 1 · · · sµt t .

24
where αi , βi , λj , µk ∈ N∗ , 1 ≤ i ≤ r, 1 ≤ j ≤ s, 1 ≤ k ≤ t (the formula ϕ(pα ) = pα − pα−1
is not valid if α = 0). Then
n ∧ m = pγ11 · · · pγr r
n ∨ m = pδ11 · · · pδrr q1λ1 · · · qsλs sµ1 1 · · · sµt t ,

where γi = min(αi , βi ), δi = max(αi , βi ) (γi ≥ 1, δi ≥ 1), 1 ≤ i ≤ r. Then


r
(pγi i − piγi −1 )
Y
ϕ(n ∧ m) =
i=1
r s t
(pδi i − pδi i −1 ) (qiλi − qiλi −1 ) (sµi i − sµi i −1 )
Y Y Y
ϕ(n ∨ m) =
i=1 i=1 i=1

As αi + βi = min(αi , βi ) + max(αi , βi ) = γi + δi , 1 ≤ i ≤ r, then


r s r t
pαi i −1 ) λi −1 βi βi −1
) (pi − pi ) (sµi i − siµi −1 )
Y Y Y Y
ϕ(n)ϕ(m) = (pαi i − λi
(qi − qi
i=1 i=1 i=1 i=1
r  # s t
"
1 2 Y λi

αi +βi
(qi − qiλi −1 ) (sµi i − siµi −1 )
Y Y
= pi 1−
pi
i=1 i=1 i=1
r s t
"  2 # Y
1
γi +δi λi −1
) (sµi i − siµi −1 )
Y λi
Y
= pi 1− (qi − qi
pi
i=1 i=1 i=1
r r s t
(pγi i − piγi −1 ) (pδi i − pδi i −1 ) (qiλi − qiλi −1 ) (sµi i − siµi −1 )
Y Y Y Y
=
i=1 i=1 i=1 i=1
= ϕ(n ∧ m)ϕ(n ∨ m).

Ex. 2.19 Prove that ϕ(nm)ϕ((n, m)) = (n, m)ϕ(n)ϕ(m).


Proof. With the notations of Ex. 2.18,
r   s   t  
Y αi +βi 1 Y λi 1 Y µi 1
ϕ(nm) = pi 1− qi 1 − si 1 −
pi qi si
i=1 i=1 i=1
r  
Y γi 1
ϕ(n ∧ m) = pi 1 −
pi
i=1
so
r r  # s  t
"
1 2 Y λi
   
1 Y µi 1
pγi i pαi i +βi
Y Y
(n ∧ m)ϕ(n)ϕ(m) = 1− qi 1 − si 1 −
pi qi si
i=1 i=1 i=1 i=1
r s t
" #
1 2 Y λi
     
1 Y µi 1
pαi i +βi +γi 1 −
Y
= qi 1 − si 1 −
pi qi si
i=1 i=1 i=1
= ϕ(nm)ϕ(n ∧ m).
Conclusion:
(n ∧ m)ϕ(n)ϕ(m) = ϕ(nm)ϕ(n ∧ m).

25
= nν(n)/2 .
Q
Ex. 2.20 Prove that d|n d

Proof. Let
n = pα1 1 · · · pαk k
be the decomposition of n in prime factors.
 2
Y Y Y
 d = d d
d|n d|n d|n
Y Yn
= d (δ = n/d)
δ
d|n δ|n
Y Y1
= nν(n) d
d
d|n d|n

= nν(n)

Conclusion: Y ν(n)
d=n 2 .
d|n

Ex. 2.21 Define ∧(n) = log p if n is a power P


P of p and zero otherwise. Prove that
d|n µ(n/d) log d = ∧(n). [Hint: First calculate d|n ∧(d) and then apply the Möbius
inversion formula.]

Proof.
∧(n) = log p if n = pα , α ∈ N∗


= 0 otherwise.
Let n = pα1 1 · · · pαt t be the decomposition of n in prime factors. As ∧(d) = 0 for all factors
of n, except for d = pij , i > 0, j = 1, . . . t,

X α1
X αt
X
∧(d) = ∧(pi1 ) + ··· + ∧(pit )
d|n i=1 i=1

= α1 log p1 + · · · + αt log pt
= log n

By Möbius Inversion Theorem,


X n
∧(n) = µ log d.
d
d|n

Ex. 2.22 Show that the sum of all the integers t such that 1 ≤ t ≤ n and (t, n) = 1 is
1
2 nϕ(n).

26
Proof. Suppose nP> 1 (the formulaPis false if n = 1).
Let S = t= t.
1≤t≤n, t∧n=1 1≤t≤n−1, t∧n=1
Using the symmetry t 7→ n − t, as t ∧ n = 1 ⇐⇒ (n − t) ∧ n = 1, we obtain
X X
2S = t+ t
1≤t≤n−1, t∧n=1 1≤t≤n−1, t∧n=1
X X
= t+ n−s (s = n − t)
1≤t≤n−1, t∧n=1 1≤s≤n−1, (n−s)∧n=1
X X
= t+ n−t
1≤t≤n−1, t∧n=1 1≤t≤n−1, (n−t)∧n=1
X X
= t+ n−t
1≤t≤n−1, t∧n=1 1≤t≤n−1, t∧n=1
X
= n
1≤t≤n−1, t∧n=1

= n Card{t ∈ N | 1 ≤ t ≤ n − 1, t ∧ n = 1}
= nϕ(n)

Conclusion : X 1
∀n ∈ N∗ , t = nϕ(n).
2
1≤t≤n, t∧n=1

(See another interesting proof in Adam Michalik’s paper.)

Ex. 2.23 Let f (x) ∈ Z[x] and let ψ(n) be the number of f (j), j = 1, 2, . . . , n, such that
(f (j), n) = t t−1
Q1. Show that ψ(n) is multiplicative and that ψ(p ) = p ψ(p). Conclude that
ψ(n) = n p|n ψ(p)/p.

Proof. My interpretation of this statement is that ψ(n) is the number of j, j = 1, 2, . . . , n,


such that (f (j), n) = 1 (if f is not one to one, we may obtain a different value). Pd
Let An = {j ∈ Z, 1 ≤ j ≤ n | f (j) ∧ n = 1}. Then ψ(n) = |A |. If f (x) = k
Pn n k=0 ak x ,
note fn (x) ∈ (Z/nZ)[x] the polynomial fn (x) = k=0 [ak ]n xk (here, we represent the
class of j ∈ Z in Z/nZ by [j]n ). We can write without inconvenient f = fn .
Let Bn = {a ∈ Z/nZ | f (a) ∈ (Z/nZ)∗ }, where (Z/nZ)∗ is the group of invertible
elements of Z/nZ.
Then u : An → Bn , j 7→ [j]n is a bijection.
Indeed u is well defined : if j ∈ An , f (j) ∧ n = 1 , so f ([j]n ) = [f (j)]n ∈ (Z/nZ)∗ .
u is injective : [j]n = [k]n with 1 ≤ j ≤ n, 1 ≤ k ≤ n implies j = k.
u is surjective : if a ∈ Z/n/Z verifies f (a) ∈ (Z/nZ)∗ , let j the unique representative
of a such that 1 ≤ j ≤ n. Then f (j) ∧ n = 1, so u(j) = a.
Thus
ψ(n) = |Bn |, where Bn = {a ∈ Z/nZ | f (a) ∈ (Z/nZ)∗ }.
Suppose n ∧ m = 1. Let

Bnm → Bn × Bm
φ:
[j]nm 7→ ([j]n , [j]m )

• φ is well defined : [j]nm = [k]nm ⇒ j ≡ k (mod nm) ⇒ (j ≡ k (mod n), j ≡ k


(mod m)) ⇒ ([j]n , [j]m ) = ([k]n , [k]m ).

27
• φ is injective : if φ([j]nm ) = φ([k]nm ), then [j]n = [k]n , [j]m = [k]m , so n | j − k, m |
j − k. As n ∧ m = 1, nm | j − k so [j]nm = [k]nm .
• φ is surjective : if (a, b) ∈ Bn × Bm , there exist j, k ∈ Z, 1 ≤ j ≤ n, 1 ≤ j ≤ m,
such that a = [j]n , b = [k]m . From the Chinese Remainder Theorem, there exists i ∈
Z, 1 ≤ i ≤ n, such that i ≡ j (mod n), i ≡ k (mod m). Then φ([i]nm ) = ([i]n , [i]m ) =
([j]n , [k]m ) = (a, b).
Finally, ψ(nm) = |Bnm | = |Bn | |Bm | = ψ(n)ψ(m), if n ∧ m = 1 : ψ is a multiplicative
function.
The interval I = [1, pt ] is the disjoint reunion of the pt−1 intervals Ik = [kp+1, (k+1)p]
pt−1
P−1
for k = 0, 1, · · · , pt−1 − 1, so ψ(pt ) = Card Ck , where Ck = {j ∈ Ik | f (j) ∧ pt =
k=0
1} = {j ∈ Ik | f (j) ∧ p = 1}.
As f (j)∧p = 1 ⇐⇒ f (j −kp)∧p = 1, the application v : Ck → C0 , j 7→ j −kp is well
defined and is bijective, so |Ck | = |C0 | = ψ(p). Thus ψ(pt ) = pt−1 Card I0 = pt−1 ψ(p) :
ψ(pt ) = pt−1 ψ(p).
t(p) ,
Q
If n = p|n p then
Y
ψ(n) = ψ(pt(p) )
p|n
Y
= pt(p)−1 ψ(p)
p|n
Y ψ(p)
=n
p
p|n

Ex. 2.24 Supply the details to the proof of Theorem 3.


As Adam Michalik, I suppose that there is a misprint, we must prove Theorem 4 :
Let
P − k a finite field with q elements.
q deg p(x) diverges, where the sum is over all monic irreducible p(x) in k[x].

Proof. Notations :
P : set of all monic polynomials p in k[x].
Pn : set of all monic polynomials p in k[x] with deg(p) ≤ n.
M : set of all monic irreducible polynomials p in k[x].
Mn : set of all monicP irreducible polynomials p in k[x] with deg(p) ≤ n.
We must prove that q − deg p(x) diverges.
p∈M
P − deg p(x)
• q diverges :
p∈P
n
X 1 X X 1
=
q deg f qd
f ∈Pn d=0 deg(f )=d
n
X 1
= Card {f ∈ P | deg(f ) = d}
qd
d=0
n
X 1 d
= q = n + 1.
qd
d=0

28
q − deg f diverges.
P
So
f ∈P
P −2 deg f
• q converges :
f ∈P

n
X X X 1
q −2 deg(f ) =
q 2d
f ∈Pn d=0 deg(f )=d
n
X 1
= Card{f ∈ P | deg(f ) = d}
q 2d
d=0
n
X 1
=
qd
d=0
1
≤ 1
1− q

q −2 deg f converges.
P
As any finite subset of P is included in some Pn ,
f ∈P
P − deg p(x)
• q diverges :
p∈M
Let Mn = {p1 , p2 , . . . , pl(n) } the set of all monic irreducible polynomials such that
deg pi ≤ n. Let
l(n)
Y 1
λ(n) = 1 .
i=1
1 − qdeg(p i)

For simplicity, we write l = l(n) for a fixed n ∈ N. Then



l X
Y 1
λ(n) =
q ai deg pi
i=1 ai =0
   
1 1 1 1
= 1+ + 2 + ··· × ··· × 1 + + 2 + ···
q deg p1 q deg p1 q deg pl q deg pl
X 1
= a1 a
···pl l )
(a1 ,··· ,aj )∈Nl
q deg(p1

Since the monic prime factors of any polynomial p ∈ Pn are in Pn , the decomposition of
p is p = pa11 · · · pal l , so
X 1
λ(n) ≥ = n + 1.
q deg p
p∈Pn

So lim λ(n) = ∞ : this is another proof that there exist infinitely many monic irreducible
n→∞

29
polynomials in k[x] (cf Ex. 2.1).
l(n)  
X 1
log λ(n) = − log 1 −
q deg pi
i=1
l(n) ∞
X X 1
=
mq m deg pi
i=1 m=1
l(n) ∞
1 1 X X 1
= + ··· + +
q deg p1 q deg pl(n) mq m deg pi
i=1 m=2

Yet
∞ ∞
X 1 X 1

mq m deg pi q m deg pi
m=2 m=2
1 1
= 1
q 2 deg pi 1 − degp
q i

1 2
= ≤ 2 deg p
q 2 deg pi −q deg p i q i

(the last inequality is equivalent to 2 ≤ q deg pi ). So


 
1 1 1 1
log λ(n) ≤ deg p1 + · · · + deg p + 2 2 deg p1 + · · · + 2 deg p .
q q l(n) q q l(n)

1 1 P −2 deg f P − deg p(x)


As q2 deg p1 + · · · + 2 deg pl(n) is less than the constant q , if q con-
q f ∈P p∈M
verges, then log λ(n) ≤ C, where C is a constant, so λ(n) ≤ eC for all n ∈ N, in
contradiction with lim λ(n) = ∞.
Pn→∞
Conclusion : q − deg p(x) diverges.
p∈M

P∞ s
Ex. 2.25 Consider the function ζ(s) = n=1 1/n . ζ is called the Riemann zeta
function. It converges for s > 1. Prove the formal identity (Euler’s identity)
Y
ζ(s) = (1 − 1/ps )−1 .
p

Proof. We prove this equality, not only formally, but for all complex value s such that
Re(s) > 1.
Let s ∈ C and f (n) = n1s , n ∈ N∗ .

P∞ multiplicative : f (mn) = f (m)f (n) for m, n ∈ N .
f is completely
Moreover n=1 f (n) is absolutely convergent for Re(s) > 1. Indeed, if s = u +
iv, u, v ∈ R, |f (n)| = |n−s | = |e−s log(n) | = |e−u log(n) e−iv log(n) | = e−u log(n) = n1u , so
∞ ∞
1/nu converges if u = Re(s) > 1.
P P
|f (n)| =
n=1 n=1

30
With these properties of f (f multiplicative and ∞
P
n=1 f (n) absolutely convergent),
we will show that
X∞ Y
f (n) = (1 + f (p) + f (p2 ) + · · · ).
n=1 p
∞ ∞ ∞
Let S ∗ = |f (pk )|
P P P
|f (n)| < ∞, and S = f (n) ∈ C. For each prime number p,
n=1 n=1 k=1

converges (this sum is less than S ∗ ), so f (pk ) converges absolutely. Thus, for x ∈ R,
P
k=0
the two finite products

YX ∞
YX
k ∗
P (x) = f (p ), P (x) = |f (pk )|
p≤x k=0 p≤x k=0

are well defined.


If p, q are two prime numbers, as ∞
P i
P∞ j
i=0 f (p ), j=0 f (q ) are absolutely convergent,
i j
(f (p )f (q ))(i,j)∈N2 is summable, so the sum of these elements can be arranged in any
order :

X ∞
X X X
i
f (p ) f (q k ) = f (pi )f (q j ) = f (pi q j ).
i=0 k=0 (i,j)∈N2 (i,j)∈N2
If p1 , · · · , pt are all the prime p ≤ x, repeating t times these products, we obtain
YX ∞
P (x) = f (pk )
p≤x k=0
X∞ ∞
X
= f (pi11 ) · · · f (pitt )
i1 =0 it =0
X
= f (pi11 · · · pitt )
(i1 ,...,ik )∈Nk
X
= f (n),
n∈∆
where ∆ is the set of integers n ∈ N∗ whose
prime factors are not greater than x. Let
∆ = N∗ \ ∆ : this is the set of numbers n ∈ N∗ such that at least a prime factor is greater
than x. So X X
P (x) = f (n) = S − f (n).
n∈∆ n∈∆
Then X X
|P (x) − S| ≤ |f (n)| ≤ |f (n)|.
n∈∆ n≥x

So lim P (x) = S, that is


x→+∞

YX ∞
X
f (pk ) = f (n).
p k=0 n=1
Finally,
∞ Y 
X 1 1 1
= 1 + + · · · + + · · ·
ns p
ps pks
n=1
Y
= (1 − 1/ps )−1
p

31
Ex. 2.26 Verify the formal identities:

(a) ζ(s)−1 = µ(n)/ns


P

(b) ζ(s)2 = ν(n)/ns


P

(c) ζ(s)ζ(s − 1) = σ(n)/ns


P

Proof. Without any consideration of convergence :

(a)
∞ ∞ ∞
X µ(m) X 1 X µ(m)
ζ(s) =
ms ns ms
m=1 n=1 m=1
X µ(m)
=
ns ms
n,m≥1
∞ X
X 1
= µ(m) (u = nm)
us
u=1 m|u

X 1 X
= µ(m)
us
u=1 m|u

=1
P
Indeed, m|u µ(m) = 1 if u = 1, 0 otherwise. So
X
ζ(s)−1 = µ(n)/ns .
n∈N∗

(b)
∞ ∞
2
X 1 X 1
ζ(s) =
ns ms
n=1 m=1
X 1
=
(nm)s
n,m≥1
XX 1
=
us
u≥1 n|u
X 1 X
= 1
us
u≥1 n|u
X 1
= ν(u)
us
u≥1

So

2
X ν(n)
ζ(s) = .
ns
n=1

32
(c) For Re(s) > 2,
X 1 X 1
ζ(s)ζ(s − 1) =
ns ms−1
n≥1 m≥1
X m
=
(nm)s
m,n≥1
 
X X 1
=  m s
u
u≥1 m|u
X σ(u)
=
us
u≥1

So
X σ(n)
ζ(s)ζ(s − 1) = .
ns
n≥1

P
Ex. Q2.27 Show that 1/n, the sum being over square free integers, diverges. Conclude
x
P
that p<N (1 + 1/p) → ∞ as N → ∞. Since e > 1 + x, conclude that p<N 1/p → ∞.
(This proof is due to I.Niven.)

Proof. Let ∆ ⊂ N∗ the set of square free integers.


Let N ∈ N∗ . Every integer n, 1 ≤ n ≤ N can be written√as n = ab2 , where a, b are
integers and a is square free. Then 1 ≤ a ≤ N , and 1 ≤ b ≤ N , so

X 1 X X 1 X 1 X 1 π2 X 1
≤ ≤ = .
n √ ab2 a b2 6 a
n≤N a∈∆,a≤N 1≤b≤ N a∈∆,a≤N b=1 a∈∆,a≤N

Therefore X 1 6 X 1
≥ 2 .
a π n
a∈∆,a≤N n≤N
P∞ 1 P 1 1

As n=1 n diverges, lim a = +∞, so the family a a∈∆ of the inverse of square
N →∞ a∈∆,a≤N
free integers is not summable:
X1
= ∞.
a
a∈∆
Q
Let SN = p<N (1 + 1/p) , and p1 , p2 , . . . , pl (l = l(N )) all prime integers less than
N . Then
   
1 1
SN = 1+ ··· 1 +
p1 pl
X 1
=
pε11 · · · pεl l
(ε1 ,··· ,εl )∈{0,1}l

ε
P
We prove this last formula by induction. This is true for l = 1 : ε∈{0,1} 1/p1 = 1+1/p1 .

33
If it is true for the integer l, then
      
1 1 1 X 1 1
1+ ··· 1 + 1+ = 1+
p1 pl pl+1 p1 · · · pεl l
ε1
pl+1
(ε1 ,...,εl )∈{0,1}l
X 1 X 1
= +
pε1 · · · pεl l pε1 · · · pεl l pl+1
(ε1 ,...,εl )∈{0,1}l 1 (ε1 ,...,εl )∈{0,1}l 1
X 1
= εl+1
pε11 · · · pεl l pl+1
(ε1 ,...,εl ,εl+1 )∈{0,1}l+1

So it is true for all


Pl. 1
Thus SN = n , where ∆N is the set of square free integers whose prime factors
n∈∆N
are less than N .
Let A ⊂ ∆ be any finite set of square free integers. There exists N ∈ N such that
A ⊂ ∆N , namely N = max(A). Indeed, if n ∈ A, then n ≤ N , so that every prime factor
of n is less than N . P
Let B P be an arbitrary real. Since n∈∆ 1/n diverges, there is a finite set A ⊂ ∆
such that n∈A 1/n P > B. By the preceding argument, there is some N ∈ N such that
A ⊂ ∆N , thus SN = n∈∆N 1/n > B. This proves that lim SN = +∞, that is
N →∞

Y 1

lim 1+ = +∞.
N →∞ p
p<N

We know that ex ≥ 1 + x, x ≥ log(1 + x) for x > 0, so


l(N )  l(N
X 
1 X) 1
log SN = log 1 + ≤ .
pk pk
k=1 k=1

lim log SN = +∞ and lim l(N ) = +∞, so


N →∞ N →∞

X1
lim = +∞.
N →∞ p
p<N

34
Chapter 3

Ex. 3.1 Show that there are infinitely many primes congruent to −1 modulo 6.

Proof. Let n be any integer such that n ≥ 3, and N = n! − 1 = 2 × 3 × · · · × n − 1 > 1.


Then N ≡ −1 (mod 6). As 6k + 2, 6k + 3, 6k + 4 are composite for all integers k,
every prime factor of N is congruent to 1 or −1 modulo 6. If every prime factor of N was
congruent to 1, then N ≡ 1 (mod 6) : this is a contradiction because −1 ̸≡ 1 (mod 6).
So there exists a prime factor p of N such that p ≡ −1 (mod 6).
If p ≤ n, then p | n!, and p | N = n!−1, so p | 1. As p is prime, this is a contradiction,
so p > n.
Conclusion:
for any integer n, there exists a prime p > n such that p ≡ −1 (mod 6) : there are
infinitely many primes congruent to −1 modulo 6.

Ex. 3.2 Construct addition and multiplication tables for Z/5Z, Z/8Z, and Z/10Z.

Proof. More a latex exercise than a mathematical one.


Z/5Z :
+ 0 1 2 3 4 × 0 1 2 3 4
0 0 1 2 3 4 0 0 0 0 0 0
1 1 2 3 4 0 1 0 1 2 3 4
2 2 3 4 0 1 2 0 2 4 1 3
3 3 4 0 1 2 3 0 3 1 4 2
4 4 0 1 2 3 4 0 4 3 2 1

Z/8Z:
+ 0 1 2 3 4 5 6 7 × 0 1 2 3 4 5 6 7
0 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 0
1 1 2 3 4 5 6 7 0 1 0 1 2 3 4 5 6 7
2 2 3 4 5 6 7 0 1 2 0 2 4 6 0 2 4 6
3 3 4 5 6 7 0 1 2 3 0 3 6 1 4 7 2 5
4 4 5 6 7 0 1 2 3 4 0 4 0 4 0 4 0 4
5 5 6 7 0 1 2 3 4 5 0 5 2 7 4 1 6 3
6 6 7 0 1 2 3 4 5 6 0 6 4 2 0 6 4 2
7 7 0 1 2 3 4 5 6 7 0 7 6 5 4 3 2 1

Z/10Z :
+ 0 1 2 3 4 5 6 7 8 9 × 0 1 2 3 4 5 6 7 8 9
0 0 1 2 3 4 5 6 7 8 9 0 0 0 0 0 0 0 0 0 0 0
1 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9
2 2 3 4 5 6 7 8 9 0 1 2 0 2 4 6 8 0 2 4 6 8
3 3 4 5 6 7 8 9 0 1 2 3 0 3 6 9 2 5 8 1 4 7
4 4 5 6 7 8 9 0 1 2 3 4 0 4 8 2 6 0 4 8 2 6
5 5 6 7 8 9 0 1 2 3 4 5 0 5 0 5 0 5 0 5 0 5
6 6 7 8 9 0 1 2 3 4 5 6 0 6 2 8 4 0 6 2 8 4
7 7 8 9 0 1 2 3 4 5 6 7 0 7 4 1 8 5 2 9 6 3
8 8 9 0 1 2 3 4 5 6 7 8 0 8 6 4 2 0 8 6 4 2
9 9 0 1 2 3 4 5 6 7 8 9 0 9 8 7 6 5 4 3 2 1

35
Python code to generate the latex code to create such an array :
n= 10
print(’$’)
ligne = ’\\begin{array}{c|’+ n*’c’+’}’
print(ligne)
ligne=’\\times’
for j in range(n):
ligne += ’ & ’ + str(j)
ligne += ’\\’
ligne += ’\\’
ligne += ’ \\hline’
print(ligne)
for i in range(n):
ligne = str(i)
for j in range(n):
ligne +=’ & ’+ str((i * j) % n)
ligne += ’\\’
ligne += ’\\’
print(ligne)
print(’\\end{array}’)
print(’$’)

Ex. 3.3 Let abc be the decimal representation for an integer between 1 and 1000. Show
that abc is divisible by 3 iff a + b + c is divisible by 3. Show that the same result is true
if we replace 3 by 9. Show that abc is divisible by 11 iff a − b + c is divisible by 11.
Generalize to any number written in decimal notation.

Proof. Let n = abc the decimal representation of n.


As 10 ≡ 1 (mod 3), 102 ≡ 10 ≡ 1 (mod 3), so

3 | n ⇐⇒ 102 a + 10b + c ≡ 0 (mod 3)


⇐⇒ a + b + c ≡ 0 (mod 3) 3|a+b+c

As 10 ≡ 1 (mod 9) the same demonstration is true for the following result

9 | n ⇐⇒ 9 | a + b + c.

Similarly, 10 ≡ −1 (mod 11), and 102 ≡ 1 (mod 11), so

11 | n ⇐⇒ 102 a + 10b + c ≡ 0 (mod 11)


⇐⇒ a − b + c ≡ 0 (mod 11)

More generally, let n = al al−1 · · · a0 is the decimal representation of n.

36
Then 10n ≡ 1 (mod 9), so
l
X
9 | n ⇐⇒ ak 10k ≡ 0 (mod 9)
k=0
Xl
⇐⇒ ak ≡ 0 (mod 9)
k=0
⇐⇒ 9 | a0 + a1 + · · · + an ,

and the same is true if we replace 9 by 3.


Similarly, 10n ≡ (−1)n (mod 11), so
l
X
11 | n ⇐⇒ ak 10k ≡ 0 (mod 11)
k=0
l
X
⇐⇒ (−1)k ak ≡ 0 (mod 11)
k=0
⇐⇒ 11 | a0 − a1 + · · · + (−1)n an

Ex. 3.4 Show that the equation 3x2 + 2 = y 2 has no solution in integers.

Proof. If 3x2 + 2 = y 2 , then y 2 = 2 in Z/3Z.


2
As {−1, 0, 1} is a complete set of residues modulo 3, the squares in Z/3Z are 0 = 0
2
and 1 = 1 = (−1)2 , so 2 is not a square in Z/3Z : y 2 = 2 is impossible in Z/3Z.
Thus 3x2 + 2 = y 2 has no solution in integers.

Ex. 3.5 Show that the equation 7x2 + 2 = y 3 has no solution in integers.

Proof. If 7x2 + 2 = y 3 , x, y ∈ Z, then y 3 ≡ 2 (mod 7) (thus y ̸≡ 0 (mod 7)).


From Fermat’s Little Theorem, y 6 ≡ 1 (mod 7), thus 22 ≡ y 6 ≡ 1 (mod 7), which
implies 7 | 22 − 1 = 3 : this is a contradiction. Therefore the equation 7x2 + 2 = y 3 has
no solution in integers.

Ex. 3.6 Let an integer n > 0 be given. A set of integers a1 , . . . , aϕ(n) is called a reduced
residue system modulo n if they are pairwise incongruent modulo n and (ai , n) = 1 for all
i. If (a, n) = 1, prove that aa1 , aa2 , . . . , aaϕ(n) is again a reduced residue system modulo
n.

Proof. Let a1 , . . . , aϕ(n) a reduced residue system modulo n.


• As a ∧ n = 1 and ai ∧ n = 1, i = 1, 2, . . . , ϕ(n), then aai ∧ n = 1.
• As a ∧ n = 1, there exists a′ ∈ Z such that aa′ ≡ 1 (mod n). then

aai ≡ aaj ⇒ a′ aai ≡ a′ aaj (mod n) ⇒ ai ≡ aj (mod n).

So i ̸= j ⇒ ai ̸≡ aj ⇒ aai ̸≡ aaj :
aa1 , . . . , aaϕ(n) a reduced residue system modulo n.
Note that {a1 , a2 , . . . , aϕ(n) } is a reduced residue system modulo n if and only if
{a1 , a2 , . . . , aϕ(n) } = U (Z/nZ).

37
Ex. 3.7 Use Ex. 2.6 to give another proof of Euler’s theorem, aϕ(n) ≡ 1 (mod n) for
(a, n) = 1.
Proof. The proofQis more clear if we stay in Z/nZ.
Let P = x
x∈U (Z/nZ)
ϕ(n)
Q
(if {a1 , . . . , aϕ(n) } is a reduced residue system modulo n, then P = ai .)
i=1
Let a ∈ Z such that a ∧ n = 1, then b = a ∈ U (Z/nZ). We define

U (Z/nZ) → U (Z/nZ)
ψ
x 7→ bx.
• Then ψ(x) = ψ(x′ ) ⇒ bx = bx′ ⇒ b−1 bx = b−1 bx′ ⇒ x = x′ , so ψ is injective.
• Let y ∈ U (Z/nZ). If x = b−1 y, then ψ(x) = bb−1 y = y, so ψ is surjective.
ψ is a bijection, so
Y Y
bx = x,
x∈U (Z/nZ) x∈U (Z/nZ)

that is Y Y
bϕ(n) x= x.
x∈U (Z/nZ) x∈U (Z/nZ)
Q
As y = x is in the group U (Z/nZ), y is invertible, thus
x∈U (Z/nZ)

bϕ(n) = 1.
That is aϕ(n) = 1 : for all a ∈ Z, if a ∧ n = 1, then aϕ(n) ≡ 1 (mod n).

Ex. 3.8 Let p be an odd prime. If k ∈ {1, 2, . . . , p − 1}, show that there is a unique bk
in this set such that kbk ≡ 1 (mod p). Show that k ̸= bk unless k = 1 or k = p − 1.
Proof. • existence.
As p is prime and 1 ≤ k ≤ p − 1, k ∧ p = 1, so there exist λk , µk ∈ Z such that
λk p + µk k = 1. Let bk ∈ {0, 1, . . . , p − 1} such that bk ≡ µk (mod p). Then kbk ≡ 1, and
bk ̸≡ 0 (mod p), so 1 ≤ bk ≤ p − 1.
• unicity. If kbk ≡ kb′k (mod p), where bk , b′k ∈ {1, 2, . . . , p − 1}, then p | k(b′k − bk ),
and p ∧ k = 1, thus p | b′k − bk . b′k ≡ bk , and bk , b′k ∈ {1, 2, . . . , p − 1}, so bk = b′k .
If p is a prime number, and k ∈ {1, 2, . . . , p−1}, there is a unique bk in {1, 2, . . . , p−1}
such that kbk ≡ 1 (mod p).
If k = bk , then k 2 ≡ 1 (mod p), so p | (k − 1)(k + 1), and p is a prime, thus p | k − 1
or p | k + 1, that is k ≡ ±1 (mod p). As 1 ≤ k ≤ p − 1, k = 1 or k = p − 1 (and
12 ≡ (p − 1)2 ≡ 1 (mod p)).

Ex. 3.9 Use Ex. 3.8 to prove that (p − 1)! ≡ −1 (mod p). (misprint corrected)
Proof. If p = 2, then the proposition is true : (2 − 1)! = 1 ≡ −1 (mod d). If p is odd, by
Exercise 3.8, each element k in the product p! can be associated with its inverse bk ̸= k
modulo k, with the exceptions 1 and p − 1, which are their own inverses, so
p! ≡ 1 × (p − 1) ≡ −1 (mod p).

38
Ex. 3.10 If n is not a prime, show that (n − 1)! ≡ 0 (mod n), except when n = 4.

Proof. Suppose that n > 1 is not a prime. Then n = uv, where 2 ≤ u ≤ v ≤ n − 1.


• If u ̸= v, then n = uv | (n − 1)! = 1 × 2 × · · · × u × · · · × v × · · · × (n − 1) (even if
u ∧ v ̸= 1 !).
• If u = v, then n = u2 is a square.
If u is not prime, u = st, 2 ≤ s ≤ t ≤ u − 1 ≤ n − 1, and n = u′ v ′ , where
u = s, v ′ = st2 verify 2 ≤ u′ < v ′ ≤ n − 1. As in the first case, n = u′ v ′ | (n − 1)!.

If u = p is a prime, then n = p2 .
In the case p = 2, n = 4 and n = 4 ∤ (n − 1)! = 6. In the other case, p > 2, and
(n − 1)! = (p2 − 1)! contains the factors p, 2p, where 1 < p < 2p < p2 , so p2 | (p2 − 1)!,
that is n | (n − 1)!.
Conclusion : if n is not a prime, (n − 1)! ≡ 0 (mod n), except when n = 4.

Ex. 3.11 Let a1 , . . . , aϕ(n) be a reduced residue system modulo n and let N be the
number of solutions to x2 ≡ 1 (mod n). Prove that a1 · · · aϕ(n) ≡ (−1)N/2 (mod n).

Proof. If n = 2, then N = 1 and the result is false. So we suppose n > 2.


Let H be the subset of Z/nZ containing all x ∈ Z/nZ such that x2 = 1:

H = {x ∈ Z/nZ | x2 = 1}

(here 1 = 1).
Then H ⊂ U (Z/nZ), 1 ∈ H ̸= ∅, and

x ∈ H, y ∈ H ⇒ x2 = y 2 = 1 ⇒ (xy −1 )2 = 1 ⇒ xy −1 ∈ H,

so H is a subgroup of (U (Z/nZ), ×), and N = Card H.


Each x ∈ U (Z/nZ) such that x ̸∈ H can be paired with its inverse x−1 , and xx−1 = 1,
so Y Y
P := x= x.
x∈U (Z/nZ) x∈H

If x ∈ H, −x ∈ H.
• If n is odd, each x = a ∈ H(a ∈ Z, 1 ≤ a ≤ n − 1) satisfies −x ̸= x: otherwise
2a ≡ 0 (mod n), 2a = kn, k ∈ Z . As 0 < 2a = kn < 2n, then k = 1, and n = 2a is even,
in contradiction with the hypothesis.
So each x ∈ H can be paired with −x in the product P , and x(−x) = −1, so
Y
P = x = (−1)N/2 .
x∈H

• If n is even, assume that some x = a ∈ H (a ∈ Z, 1 ≤ a ≤ n − 1) satisfies x = −x,


then 0 < a = k n2 < n, so a = n2 , and x = n2 is the only element in Z/nZ such that


x = −x. Then 2x = 0, andQ x ∈ H, so 2x2 = 0, 2 = 0. Since n > 2, this is impossible, so


x ̸= −x for all x ∈ H, and x∈H x = (−1)N/2 .
Conclusion: if n > 2, Y
x = (−1)N/2 .
x∈U (Z/nZ)

39
If a1 , . . . , aϕ(n) is a reduced residue system modulo n, then a1 · · · aϕ(n) = P =
N/2 , so
Q
x∈U (Z/nZ) x = (−1)

a1 · · · aϕ(n) ≡ (−1)N/2 (mod n).

p!
Ex. 3.12 Let kp = k!(p−k)!

be a binomial coefficient, and suppose that p is prime. If
1 ≤ k ≤ p − 1, show that p divides kp . Deduce (a + b)p ≡ ap + bp (mod p).


Proof. p | p! = k!(p − k)! kp .




QIf 1 ≤ k ≤ p − 1, then each i such that 1 ≤ i ≤ k satisfies


Q1 ≤ i< p, so i ∧ p = 1. Thus
k p−k
i=1 i ∧p = 1, that is k!∧p = 1. Similarly, p−k < p, so i ∧p = 1, (p−k)!∧p = 1.
p
 p
i=1
Thus p ∧ k!(p − k)! = 1, and p | p! = k!(p − k)! k , so p | k .
Finally, from binomial formula
p−1  
X p k n−k
(a + b)p = ap + a b + bp
k
k=1
≡ ap + bp (mod p)

Ex. 3.13 Use Ex. 3.12 to give another proof of Fermat’s theorem, ap−1 ≡ 1 (mod p)
if p does not divide a.

Proof. If we make the induction hypothesis

P(k) ⇐⇒ ∀(a1 , a2 , . . . , ak ) ∈ Zk , (a1 + a2 + · · · + ak )p ≡ ap1 + ap2 + · · · + apk (mod p)

(which is true for k = 1, k = 2) then, from induction hypothesis and the case k = 2
already proved in Ex 3.12,

(a1 + a2 + · · · + ak + ak+1 )p = ((a1 + a2 + · · · + ak ) + ak+1 )p


≡ (a1 + a2 + · · · + ak )p + apk+1 (mod p)
≡ ap1 + ap2 + ··· + apk + apk+1 (mod p)

so P(k) ⇒ P(k + 1). We can conclude

∀k ∈ N∗ , ∀(a1 , a2 , . . . , ak ) ∈ Zk , (a1 + a2 + · · · + ak )p ≡ ap1 + ap2 + · · · + apk (mod p).

If we apply this result to the particular case a1 = a2 = · · · = ak = 1, we obtain

∀k ∈ N∗ , k p ≡ k (mod p).

Moreover (−k)p ≡ −k p ≡ −k (mod p) (even if p = 2), and 0p = 0, so

∀k ∈ Z, k p ≡ k (mod p).

If p ∤ a, a ∈ Z, then p ∧ a = 1, and p | ap − a = a(ap−1 − 1), so p | ap−1 − 1, ap−1 ≡ 1


(mod p) : this is another proof of Fermat’s theorem.

40
Ex. 3.14 Let p and q be distinct odd primes such that p−1 divides q −1. If (n, pq) = 1,
show that nq−1 ≡ 1 (mod pq).

Proof. As n ∧ pq = 1, n ∧ p = 1, n ∧ q = 1, so from Fermat’s Little Theorem

nq−1 ≡ 1 (mod q), np−1 ≡ 1 (mod p).

p − 1 | q − 1, so there exists k ∈ Z such that q − 1 = k(p − 1). Thus

nq−1 = (np−1 )k ≡ 1 (mod p).

p | nq−1 − 1, q | nq−1 − 1, and p ∧ q = 1, so pq | nq−1 − 1 :

nq−1 ≡ 1 (mod pq).

Ex. 3.15 For any prime p show that the numerator of 1 + 21 + 13 + . . . + p−1
1
is divisible
by p.

Proof. As the result is false for p = 2, we must suppose p > 2, so p is odd.


1 + 12 + 13 + . . . + p−1
1
=N
D , where

(p − 1)! (p − 1)!
N = (p − 1)! + + ··· + , D = (p − 1)!.
2 p−1
From Wilson’s theorem, (p − 1)! ≡ −1 (mod p), so in the field Z/pZ,
−1 −1 −1
N = (−1)(1 +2 + ··· + p − 1 ).

Since the application φ : (Z/pZ)∗ → (Z/pZ)∗ , x 7→ x−1 is bijective (it’s an involution),


 
−1 −1 −1 p−1
1 +2 + ··· + p − 1 = 1 + 2 + ··· + p − 1 = p × = 0.
2

So p | N , and p ∧ (p − 1)! = 1, that is p ∧ D = 1. Thus p divides the numerator of the


reduced fraction of N/D.

Ex. 3.16 Use the proof of the Chinese Remainder Theorem to solve the system x ≡ 1
(mod 7), x ≡ 4 (mod 9), x ≡ 3 (mod 5).

Proof. Let m1 = 7, m2 = 9, m3 = 5, m = m1 m2 m3 = 315, n1 = m/m1 = m2 m3 =


45, n2 = m1 m3 = 35, n3 = m1 m2 = 63.
If r1 = 13, s1 = −2, then r1 m1 + s1 n1 = 13m1 − 2m2 m3 = 13 × 7 − 2 × 45 = 1,
so e1 = s1 n1 = −2 × 45 = −90 verifies

e1 = −90, e1 ≡ 1 (mod 7), e1 ≡ 0 (mod 9), e1 ≡ 0 (mod 5).

If r2 = 4, s2 = −1, then r2 m2 + s2 n2 = 4 × 9 − 1 × 35 = 1,
so e2 = s2 n2 = −35 verifies

e2 = −35, e2 ≡ 0 (mod 7), e2 ≡ 1 (mod 9), e2 ≡ 0 (mod 5).

If r3 = −25, s3 = 2, then r3 m3 + s3 n3 = −25 × 5 + 2 × 63 = 1,

41
so e3 = s3 n3 = 2 × 63 = 126 verifies

e3 = 126, e3 ≡ 0 (mod 7), e3 ≡ 0 (mod 9), e3 ≡ 1 (mod 5).

Let x0 = e1 + 4e2 + 3e3 = 148 : then

x0 = 148, x0 ≡ 1 (mod 7), x0 ≡ 4 (mod 9), x0 ≡ 3 (mod 5).

If x ∈ Z is any solution of the system, then 7 | x − x0 , 9 | x − x0 , 5 | x − x0 , with


7 ∧ 9 = 7 ∧ 5 = 9 ∧ 5 = 1, so m = 315 | x − x0 :

x = 148 + k 315, k ∈ Z,

and all these integers are solutions of the system.

Ex. 3.17 Let f (x) ∈ Z[x] and n = pa11 · · · pat t . Show that f (x) ≡ 0 (mod n) has a
solution iff f (x) ≡ 0 (mod pai i ) has a solution for i = 1, . . . , t.

Proof. If x is such that f (x) ≡ 0 (mod n), as pαi i | n, f (x) ≡ 0 (mod pai i ).
Conversely, let x1 , x2 , . . . , xt be integers such that

f (x1 ) ≡ 0 (mod pa11 ),


···
f (xt ) ≡ 0 (mod pat t ).
a
As pai i ∧ pj j = 1 if i ̸= j, the Chinese Remainder Theorem gives an integer x such that
x ≡ xi (mod pai i ), i = 1, 2, . . . , t. As f (x) ∈ Z[x], f (x) ≡ f (xi ) ≡ 0 (mod pai i ). Thus
a
pai i | f (x), i = 1, 2, . . . , t, where pai i ∧ pj j = 1 if i ̸= j, then n = pa11 · · · pat t | f (x), so x is
a solution of f (x) ≡ 0 (mod n).
Conclusion: f (x) ≡ 0 (mod n) has a solution iff f (x) ≡ 0 (mod pai i ) has a solution
for i = 1, . . . , t.

Ex. 3.18 For f ∈ Z[x], let N be the number of solutions to f (x) ≡ 0 (mod n) and Ni
be the number of solutions to f (x) ≡ 0 (mod pai i ). Prove that N = N1 N2 · · · Nt .

Proof. Note [x]n the class of x modulo n. Let S the set of solutions in Z/nZ of f (x) = 0,
and Si the set of solutions in Z/pai Z of f (x) = 0.
(We designate with the same letter the polynomial f in Z[x] or its reduction in
Z/nZ[x].)
Let
S → S1 × S2 × · · · × St

φ:
[x]n 7→ ([x]pa1 , [x]pa2 , . . . , [x]pat )
1 2 t

• φ is well defined: if x ≡ x′ (mod n), then x ≡ x′ (mod pai i ), i = 1, 2, · · · , t, so


′ ′ ′
([x]pa1 , [x]pa2 , . . . , [x]pat ) = ([x ]pa1 , [x ]pa2 , . . . , [x ]pat ). Moreover, we proved in Ex 3.17
1 2 t 1 2 t
that [x]n ∈ S ⇒ [x]pai ∈ Si .
i
• φ is injective: if ([x]pa1 , [x]pa2 , . . . , [x]pat ) = ([x′ ]pa1 , [x′ ]pa2 , . . . , [x′ ]pat ), then pai i |
1 2 t 1 2 t
x′ − x, i = 1, 2, . . . , t, thus n | x′ − x and [x]n = [x′ ]n .
• φ is surjective: if y = ([x1 ]pa1 , [x2 ]pa2 , . . . , [xt ]pat ) is any element of S1 ×S2 ×· · ·×St ,
1 2 t
there exists by the Chinese Remainder Theorem x ∈ Z such that x ≡ xi (mod pai i ). Then
φ([x]n ) = y (see Ex. 3.17).
In conclusion, φ is bijective, therefore N = |S| = |S1 ×S2 ×· · ·×St | = N1 N2 · · · Nt .

42
Ex. 3.19 If p is an odd prime, show that 1 and −1 are the only solutions of x2 ≡ 1
(mod pa ).
Proof.
x2 − 1 (mod pa ) ⇐⇒ pa | (x − 1)(x + 1).
Let d = (x − 1) ∧ (x + 1). Then d = 1 or d = 2.
• If d = 1, then x is even (if not, x − 1 and x + 1 are even, and 2 | d). As pa |
(x − 1)(x + 1) and (x − 1) ∧ (x + 1) = 1, then pa | x − 1, or pa | x + 1, that is
x ≡ ±1 (mod pa ).
• If d = 2, then x is odd, and
x−1x+1
pa | 4 .
2 2
As p is an odd prime, p∧4 = 1, so p | x−1
2
x+1 x−1 x+1 a
2 , where 2 ∧ 2 = 1, hence p |
x−1
2 | x−1
or pa | x+1
2 | x + 1, thus
x ≡ ±1 (mod pa ).
Conclusion: {−1, 1} is the set of roots of x2 − 1 in Z/pa Z.

Ex. 3.20 Show that x2 ≡ 1 (mod 2b ) has one solution if b = 1, two solutions if b = 2,
and four solutions if b ≥ 3.
Proof. Consider the equation x2 ≡ 1 (mod 2b ).
• If b = 1, x2 ≡ 1 (mod 2) ⇐⇒ 2 | (x − 1)(x + 1) ⇐⇒ x ≡ 1 (mod 2): we obtain
one solution.
• If b = 2, as 02 ≡ 22 ≡ 0 (mod 4), x2 ≡ 1 (mod 4) ⇐⇒ x ≡ ±1 (mod 4): we
obtain two solutions.
• Suppose that b ≥ 3. The equation has 4 solutions 1, −1, 1 + 2b−1 , −1 + 2b−1 .
Indeed, (±1)2 ≡ 1 (mod 2b ), and
(1 + 2b−1 )2 = 1 + 2.2b−1 + 22b−2 = 1 + 2b (1 + 2b−2 ) ≡ 1 (mod 2b ),
and similarly (−1 + 2b−1 )2 ≡ 1 (mod 2b ).
These solutions are incongruent modulo 2b :
1 ̸≡ −1 (mod 2b ) and 1 + 2b−1 ̸≡ −1 + 2b−1 (if not, 2b | 2, so b ≤ 1).
If 1 + 2b−1 ≡ −1 (mod 2b ), then 2b | 2 + 2b−1 = 2(1 + 2b−2 ), thus 2 | 2b−1 | (1 + 2b−2 ),
this is impossible because 1 + 2b−2 is odd (b ≥ 3). Therefore −1 + 2b−1 ̸≡ 1 (mod 2b ).
Moreover 1 + 2b−1 ≡ 1 (mod 2b ) implies 2b | 2b−1 , so 2 | 1 : this is a contradiction, so
1 + 2b−1 ̸≡ 1 (mod 2b ), and similarly −1 + 2b−1 ̸≡ −1 (mod 2b ). There exist at least 4
solutions.
We show that these are the only solutions :
∀x ∈ Z, x2 ≡ 1 (mod 2b ) ⇒ x ≡ ±1 (mod 2b−1 ).
Indeed, if x2 ≡ 1 (mod 2b ), 2b | (x − 1)(x + 1), where d = (x − 1) ∧ (x + 1) = 2.
As in Ex.3.19, if d = 1, then 2b | x − 1 or 2b | x + 1, a fortiori x ≡ ±1 (mod 2b−1 ).
If d = 2, then x is odd, and 2b | 4 x−1 2
x+1
2 , so 2
b−2 | x−1 x+1 , with x−1 ∧ x+1 = 1, so
2 2 2 2
2b−2 | x−1
2 or 2 b−2 | x+1 , that is 2b−1 | x − 1 or 2b−1 | x + 1, thus x ≡ ±1 (mod 2b−1 ).
2
(Alternatively, we can prove this implication by induction.)
Hence every solution of x2 ≡ 1 (mod 2b ), b ≥ 3 is such that x = ±1 + k2b−1 , k ∈ Z :
there exist only four such values in the interval [0, 2b [, namely 1, −1+2b−1 , 1+2b−1 , −1+2b .
b−1 b−1
Conclusion: if b ≥ 3, the roots of x2 − 1 in Z/2b Z are 1, −1, 1 + 2 , −1 + 2 .

43
Ex. 3.21 Use Ex. 18-20 to find the number of solutions to x2 ≡ 1 (mod n).

Proof. Let n = 2a0 pa11 · · · pakk be the decomposition in prime factors of n > 1 (p0 = 2 <
p1 < · · · < pk , a0 ≥ 0, ai > 0, 1 ≤ i ≤ k). Let N be the number of solutions of x2 ≡ 1
(mod n), and Ni the number of solutions of x2 ≡ 1 (mod pai i ), i = 0, 1, . . . k. From
Ex.3.18, we know that N = N0 N1 · · · Nk , where (Ex. 3.19), Ni = 2, i = 1, 2, . . . , k, and
(Ex.3.20), N0 = 1 if a0 = 1 (or a0 = 0), N0 = 2 if a0 = 2, N0 = 4 if a0 ≥ 3.
Conclusion : the number of solutions of x2 ≡ 1 (mod n), where n = 2a0 pa11 · · · pakk , is

N = 2k if a0 = 0 or a0 = 1
N = 2k+1 if a0 = 2
k+2
N =2 if a0 ≥ 3

Ex. 3.22 Formulate and prove the Chinese Remainder Theorem in a principal ideal
domain.
Proposition. Let R a principal ideal domain, and m1 , . . . , mt ∈ R. Suppose that
(mi , mj ) = 1 for i ̸= j (that is (mi ) + (mj ) = (1), mi R + ni R = R). Let b1 , . . . , bt ∈ R
and consider the system of congruences:

x ≡ b1 (mod m1 ), x ≡ b2 (mod m2 ), . . . , x ≡ bt (mod mt ).

This system has solutions and any two solutions differ by a multiple of m1 m2 · · · mt .

Proof. Let m = m1 m2 · · · mt , and ni = m/mi , i = 1, 2, . . . , t.


As (m1 , mi ) = (1), we can find ui , vi ∈ R such that m1 ui + mi vi = 1 for i = 2, . . . , t.
t
Q
Therefore 1 = (m1 ui + mi vi ) = m1 u + (m2 · · · mt )v for some elements u, v ∈ R,
i=2
thus (m1 , n1 ) = (m1 , m2 m3 · · · mt ) = (1), and similarly (mi , ni ) = 1 for all i = 1, . . . , t.
So there are ri , si ∈ R such that ri mi + si ni = 1. Let ei = si ni . Then ei ≡ 1 (mod mi )
and ei ≡ 0 (modP mj ) for j ̸= i.
Set x0 = ti=1 bi ei . Then we have x0 ≡ bi ei ≡ bi (mod mi ) and so x0 is a solution.
Suppose that x1 is another solution. Then x1 − x0 ≡ 0 (mod mi ) for i = 1, 2, . . . , t,
in other words m1 , m2 , . . . , mt divide x1 − x0 , with (mi , mj ) = 1. By the generalization
of Lemma 2 to principal rings, m divides x1 − x0 .

This result can be generalized to any commutative ring, not necessarily a PID (see
S.LANG, Algebra):
Proposition. Let A a commutative ring. Let a1 , . . . , an be ideals of A such that
ai + aj = A for all i ̸= j. Given elements x1 , . . . , xn ∈ A, there exists x ∈ A such that
x ≡ xi (mod ai ) for all i.

Ex. 3.23 Extend the notion of congruence to the ring Z[i] and prove that a + bi is
always congruent to 0 or 1 modulo 1 + i.

Proof. If a, b, c are in Z[i] we say that a ≡ b (mod c) if there exists q ∈ Z[i] such that
a − b = qc.
As i ≡ −1 (mod 1 + i), a + bi ≡ a − b (mod 1 + i).
(1 − i)(1 + i) = 2, so 2 ≡ 0 (mod 1 + i).

44
If a − b is even, a − b = 2k, k ∈ Z ⊂ Z[i], so a − b ≡ 0 (mod 1 + i).
If a − b is odd, a − b = 2k + 1, k ∈ Z, so a − b ≡ 1 (mod 1 + i).
Conclusion : for all z ∈ Z[i], z ≡ 0, 1 (mod 1 + i).

Ex. 3.24 Extend the notion of congruence to the ring Z[ω] and prove that a + bω is
always congruent to −1, 0 or 1 modulo 1 − ω.

Proof. Same definition of congrence in Z[ω] as in Ex. 3.23.


ω ≡ 1 (mod 1 − ω), so a + bω ≡ a + b (mod 1 − ω).
0 = 1 − ω 3 = (1 − ω)(1 + ω + ω 2 ), with 1 − ω ̸= 0, so 1 + ω + ω 2 = 0. Hence 3 ≡ 0
(mod 1 − ω).
a + b ≡ 0, 1, −1 (mod 3), so a + b ≡ 0, 1, −1 (mod 1 − ω)
For all z ∈ Z[ω], z ≡ 0, 1, −1 (mod 1 − ω).

Ex. 3.25 Let λ = 1 − ω ∈ Z[ω]. If α ∈ Z[ω] and α ≡ 1 (mod λ), prove that α3 ≡ 1
(mod 9).

Proof. α ≡ 1 (mod λ), so α = 1 + βλ, β ∈ Z[ω].


λ = 1 − ω 2 = (1 − ω)(1 + ω) = −ω 2 (1 − ω) = −ω 2 λ (so λ and λ are associate).

α3 − 1 = (α − 1)(α − ω)(α − ω 2 )
= (α − 1)(α − 1 + λ)(α − 1 + λ)
= (α − 1)(α − 1 + λ)(α − 1 − ω 2 λ)
= βλ(βλ + λ)(βλ − ω 2 λ)
= λ3 β(β + 1)(β − ω 2 )

Moreover,

β(β + 1)(β − ω 2 ) ≡ β(β + 1)(β − 1) (mod λ)


≡0 (mod λ)

since β ≡ 0, 1, −1 (mod λ) (see Ex. 3.24).


Therefore λ4 | α3 − 1.
As λλ = (1 − ω)(1 − ω 2 ) = 1 − ω − ω 2 + ω 3 = 3, then λλ = −ω 2 λ2 = 3, so λ2 and 3
are associate : λ2 = −ω3. Thus 9 = (−ω 2 λ2 )2 = ωλ4 , so 9 | ω 2 9 = λ4 | α3 − 1.
For all α ∈ Z[ω],
α ≡ 1 (mod λ) ⇒ α3 ≡ 1 (mod 9).

Ex. 3.26 Use Ex. 25 to show that if ξ, η, ζ ∈ Z[ω] are not zero and ξ 3 + η 3 + ζ 3 = 0,
then λ divides at least one of the elements ξ, η, ζ.

Proof. Let ξ, η, ζ ∈ Z[ω] \ {0} such that ξ 3 + η 3 + ζ 3 = 0.


Reasoning by contradiction, suppose that λ ∤ ξ, λ ∤ η, λ ∤ ζ.
By Ex. 3.24,

ξ ≡ ±1 (mod λ), η ≡ ±1 (mod λ), ζ ≡ ±1 (mod λ),

45
and by Ex.3.25,

ξ 3 ≡ ±1 (mod 9), η 3 ≡ ±1 (mod 9), ζ 3 ≡ ±1 (mod 9),

As ±1 ± 1 ± 1 ̸≡ 0 (mod 9), this is a contradiction.


Conclusion : if ξ, η, ζ are not zero and ξ 3 + η 3 + ζ 3 = 0, then λ divides at least one
of the elements ξ, η, ζ.
(Consequence : if x3 + y 3 + z 3 = 0, x, y, z ∈ Z, then 3 | xyz : this is the first case of
Fermat’s theorem for the exponent 3.)

46

You might also like