





























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






























































(^1) www.math.cmu.edu/~vahagn/
CONTENTS v
Bibliography 70
Dominus Illuminatio Mea. Psalm 27:
These are lecture notes for the Number Theory course taught at CMU in Fall 2017 and Fall 2018. I used several texts when preparing these notes. In particular, most of the material can be found in [Bak12, Gre17, HW80]. The books [Bak12, HW80] go way beyond the material of these notes and the reader is referred to those books for more advanced topics.
Please email me if you notice any mistakes or typos.
Divisibility in the ring of integers, primes, the fundamental theorem of arith- metic. Multiplicative functions, the Möbius inversion formula. Modular arithmetic, Wilson’s theorem, Fermat’s little theorem, Euler’s theorem, the Chinese Remainder Theorem. Primitive roots. Quadratic residues, Gauss’s law of quadratic reciprocity. Fermat’s theorem on sums of two squares, La- grange’s theorem on sums of four squares. Some classical Diophantine equa- tions. Continued fractions, Pell’s equation. Diophantine approximations, Liouville numbers, algebraic and transcendental numbers. Quadratic num- ber fields, Gaussian integers. Chebyshev’s theorem, a weak version of the prime number theorem.
1
Definition 1.1. For two integers a and b with a 6 = 0 we say that a divides b or b is divisible by a and write a | b, iff there is an integer c such that b = ca.
Definition 1.2. The greatest common divisor of two integers a and b, de- noted gcd(a, b), is defined as a positive number d which divides a and b and is divisible by every common divisor of a and b.
Proposition 1.3. The greatest common divisor of any two numbers a and b , which are not simultaneously zero, exists and is unique. It is the biggest among the common divisors of a and b_._
Proof. Denote d := min{ax + by : x, y ∈ Z, ax + by > 0 }. We claim that d = gcd(a, b). If d′^ | a, b then clearly d′^ | ax + by for all integers x, y and hence d′^ | d. Further, if a = dq + r for some r with 0 ≤ r < d, then it is easy to see that r = a − dq = ax 0 + by 0 for some a 0 , b 0 ∈ Z. Now if r > 0 then we get a contradiction to minimality of d. Uniqueness of d is evident.
Lemma 1.4. For any integers a, b there are integers x, y such that
gcd(a, b) = ax + by.
Proof 1. This follows immediately from the proof of the previous result.
Proof 2. (Euclid’s algorithm) Let a = bq 0 + r 0 for some 0 ≤ r 0 < b. If r 0 = 0 then gcd(a, b) = b. Otherwise let b = q 1 r 0 + r 1 with 0 ≤ r 1 < r 0. Now if r 1 = 0 then gcd(a, b) =
3
r 0. Otherwise continue the process and divide r 0 by r 1 with remainder. In the (k + 2)-th step we get r k − 1 = q k +1r k + r k +1 with 0 ≤ r k +1 < r k. The sequence of non-negative integers r i is strictly decreasing so the process must terminate at some point, that is, r k +1 = 0 for some k. Then r k = gcd(a, b) and going up from the bottom we see that r k can be written as a linear combination of a and b with integer coefficients.
Remark 1.5_._ Euclid’s algorithm allows one to compute the numbers x and y for which ax + by = gcd(a, b).
Definition 1.6. Two integers are called coprime or relatively prime if their greatest common divisor is 1.
Corollary 1.7. If a and b are coprime and a | bc then a | c_._
Proof. There are integers x, y such that ax+by = 1. This implies acx+bcy = c. Now a divides the left hand side and so it must divide the right hand side as well.
1.2 Linear Diophantine equations
Theorem 1.8. Let a, b, c be integers with a, b 6 = 0_. Then the linear equation_
ax + by = c
has an integer solution, that is, a solution (x, y) ∈ Z^2 , if and only if d := gcd(a, b) | c_. Given one solution_ (x 0 , y 0 ) , all solutions are of the form x = x 0 + k · bd , y = y 0 − k · ad for k ∈ Z_._
Proof. If the equation has a solution (x 0 , y 0 ) then obviously d | ax 0 + by 0 = c. Conversely, if c = dl then since d = am + bn for some integers m, n, we know that (ml, nl) is a solution. If (x, y) and (x 0 , y 0 ) are two solutions then a(x − x 0 ) + b(y − y 0 ) = 0. Denote u = x − x 0 , v = y 0 − y. Then au = bv. If a = da′, b = db′^ then gcd(a′, b′) = 1 and a′u = b′v and so a′^ | v, b′^ | u. Therefore v = a′k, u = b′k for some integer k. The result follows.
1.3 Primes and irreducibles
Definition 1.9. An integer p 6 = 0, ± 1 is called irreducible if a | p implies a = ± 1 or a = ±p. A number p 6 = 0, ± 1 is prime if whenever p | ab, we have p | a or p | b.
1.5 Exercises
(i) every two consecutive integers are relatively prime, (ii) every two consecutive odd integers are relatively prime.
gcd
( a + b,
a p^ + b p a + b
) = 1 or p.
Definition 2.1. A function f : N → C is multiplicative if f (1) = 1 and whenever m, n are coprime natural numbers, we have f (mn) = f (m)f (n).
Lemma 2.2. If f is multiplicative and g(n) =
∑ d | n f^ (d)^ then^ g^ is also mul- tiplicative.
Proof. If gcd(m, n) = 1 then any divisor d of mn can be factored into a product ab with a | m and b | n. The numbers a and b are determined uniquely by d, m, n. Therefore
g(mn) =
∑
d | mn
f (d) =
∑
a,b : a | m,b | n
f (ab) =
∑
a,b : a | m,b | n
f (a)f (b)
∑ a | m
f (a) ·
∑ b | n
f (b) = g(m)g(n).
Example 2.3. If τ (n) and σ(n) are respectively the number and the sum of all positive divisors of a natural number n, then those are multiplicative. Indeed, τ (n) =
∑ d | n^1 and^ σ(n) =^
∑ d | n d^ and the functions^ f^ (n) = 1^ and f (n) = n are obviously multipliactive.
An important multiplicative function, namely Euler’s totient function, will be introduced in the next chapter. The following is obvious.
Lemma 2.4. If f is multiplicative and n =
∏ i p
ki i is the prime factorisation of n then f (n) =
∏ i
f (p k i i ).
Proposition 2.8. If f (n) =
∑
d | n
μ(d)g(n/d)
then g(n) =
∑ d | n f^ (d).
Proof. We have ∑
d | n
f (d) =
∑
d | n
∑
d ′| d
μ(d′)g(d/d′) =
∑
d ′| n
∑
d : d ′| d,d | n
μ(d′)g(d/d′)
∑ d ′| n
∑ a | (^) dn ′
μ(d′)g(a) =
∑ a | n
g(a) ∑ d ′| na
μ(d′)
(^) = ∑ a | n
g(a)ν(n/a) = g(n).
2.3 Exercises
σ s (n) :=
∑
d | n
d s.
Prove that σ s is multiplicative. Notice that σ 0 = τ, σ 1 = σ.
d | n
μ(d)^2 ϕ(d)
n ϕ(n)
n for all n ∈ N.
Definition 3.1. For a, b, m ∈ Z with m 6 = 0 it is said that a is congruent to b modulo m, written a ≡ b mod m, if m | b − a.
This gives rise to residue classes mod m. More precisely for an integer a we denote [a] m := {b ∈ Z : a ≡ b mod m}. Obviously mZ = {mk : k ∈ Z} is an ideal of the ring of integers and [a] m = a + mZ is just its coset with a representative a. Then the quotient ring Z/mZ consists of the residue classes modulo m and the operations are defined by
(a + Z/mZ) + (b + Z/mZ) = (a + b) + Z/mZ, (a + Z/mZ) · (b + Z/mZ) = (ab) + Z/mZ.
We will often identify a + mZ with the integer a and by abuse of notation write Z/mZ = { 0 , 1 ,... , m − 1 }.
Definition 3.2. For a ring R its multiplicative group R×^ is the set of all invertible elements of R which is a group under multiplication of the ring.
Lemma 3.3. For m 6 = 0 we have
(Z/mZ)×^ = {a + mZ : gcd(a, m) = 1}.
Note that here gcd(a, m) does not depend on the choice of the represen- tative a.
Proof. Clearly, a + mZ is invertible iff ak ≡ 1 mod m for some integer k. Such a k exists iff gcd(a, m) = 1.
Corollary 3.4. If p is prime then every non-zero element in Z/pZ is invert- ible. Hence it is a field and is normally denoted by F p.
11
Proof. Consider the map
ψ : Z/M Z → Z/m 1 Z × · · · × Z/m n Z, ψ : x + M Z 7 → (x + m 1 Z,... , x + m n Z).
Observe that x + M Z = y + M Z iff x ≡ y mod M iff x ≡ y mod m i , 1 ≤ i ≤ n iff x + m i Z = y + m i Z, 1 ≤ i ≤ n iff ψ(x + M Z) = ψ(y + M Z). This shows that ψ is well defined and injective. Hence, it is surjective since its domain and range have the same cardinality M. It is now evident that ψ is also an isomorphism.
Remark 3.10_._ For the proof of Theorem 3.8 we need only surjectivity of ψ. However, the isomorphism of the rings is an important result and we will use it later.
The above proof is not constructive so we give a second proof for Theorem 3.8.
Second proof of Theorem 3.8. Denote M i :=
m i
where M = m 1 · · · m n. It is
easy to see that gcd(M i , m i ) = 1. Hence there are integers k i with k i M i ≡ 1 mod m i for all i. Now take
x =
∑^ n i =
a i k i M i.
Since M i ≡ 0 mod m j for i 6 = j, we deduce that x ≡ a i mod m i.
Remark 3.11_._ Compare this to Lagrange interpolation.
Note that if x solves the above system of congruences then y is also a solution if and only if x ≡ y mod M.
3.5 Euler’s totient function
Definition 3.12 (Euler’s function). For m > 0 define ϕ(m) = #{k : 1 ≤ k ≤ m, gcd(k, m) = 1}.
The following result follows from Lemma 3.3.
Proposition 3.13. The order of the group (Z/mZ)×^ is ϕ(m).
Lemma 3.14. Euler’s function ϕ is multiplicative. Hence if n = p k 11 · · · p k ll is the prime factorisation of n then
ϕ(n) =
∏ i
p k i i −^1 (p i − 1).
Proof. Theorem 3.9 implies that if gcd(m, n) = 1 then
(Z/mnZ)×^ ∼= (Z/mZ)×^ × (Z/nZ)×,
and the result follows. For the second part of the theorem notice that if p is prime and k > 0 then among the numbers 1 , 2 ,... , p k^ all multiples of p and only those are not coprime to p k. There are p k −^1 many such numbers. Therefore ϕ(p k ) = p k^ − p k −^1.
Proposition 3.15.
∑ d | n ϕ(d) =^ n_._
Proof 1. For a divisor d of n denote A d := {a : 1 ≤ a ≤ n : gcd(n, a) = d}. Then { 1 ,... , n} is the disjoint union of (A d ) d | n and |A d | = ϕ(n/d).
Proof 2. Since ϕ is multiplicative,
∑ d | n ϕ(d)^ is also multiplicative.^ So it suffices to establish the equality for n = p k^ where p is a prime. In this case
∑
d | n
ϕ(d) =
∑^ k i =
ϕ(p i ) = 1 + (p − 1) + (p^2 − p) + · · · + (p k^ − p k −^1 ) = p k.
3.6 Euler’s theorem
Theorem 3.16 (Euler). If gcd(a, m) = 1 then a ϕ ( m )^ ≡ 1 mod m_._
Proof 1. Denote k := ϕ(m) and let m 1 ,... , m k be a reduced residue system modulo m, that is, gcd(m i , m) = 1 for all i and m i 6 ≡ m j mod m for i 6 = j. In other words, (Z/mZ)×^ = {m 1 ,... , m k }. Observe that am 1 ,... , am k is again a reduced residue system mod m and hence it is a permutation of m 1 ,... , m k mod m. Therefore ∏ i
m i ≡
∏ i
am i = a k^
∏ i
m i.
Since gcd (
∏ i m i , m) = 1, we can deduce that^ a k^ ≡^1 mod^ m.
Proof 2. Consider the multiplicative group (Z/mZ)×^ and its subgroup (a) generated by a. If the latter has order (cardinality) n then a n^ = 1. By Lagrange’s theorem n divides the order of the group (Z/mZ)×^ which is ϕ(m). Thus, a ϕ ( m )^ = 1 in (Z/mZ)×^ and we are done.
Corollary 3.17 (Fermat’s little theorem). If p is prime and p - a then a p −^1 ≡ 1 mod p_._
Proof. When p is prime, ϕ(p) = p − 1.
Definition 4.1. For integers a, m 6 = 0 with gcd(a, m) = 1 the order of a mod m is its order in the multiplicative group (Z/mZ)×, that is,
ord m (a) = min{γ ∈ N : a γ^ ≡ 1 mod m}.
Lemma 4.2. If a n^ ≡ 1 mod m then ord m (a) | n_. In particular_ ord m (a) | ϕ(m).
Proof. Denote k := ord m (a) and let n ≡ l mod k with 0 ≤ l < k. Then a l^ ≡ 1 mod m and by minimality of k we must have l = 0. The second part of the lemma follows from the first part and Euler’s theorem (or from Lagrange’s theorem directly).
Definition 4.3. If ord m (a) = ϕ(m) then a is called a primitive root modulo m.
In other words, a primitive root is a generator of the multiplicative group (Z/mZ)×. So there is a primitive root mod m if and only if (Z/mZ)×^ is cyclic. We are going to describe all integers that have a primitive root. More generally, we will prove a structure theorem about the multiplicative group (Z/mZ)×. But now we recall two classical results from the theory of finite groups.
Lemma 4.4. If G is a group and a, b ∈ G with ab = ba and ord(a) = k, ord(b) = l and gcd(k, l) = 1 then ord(ab) = lk_._
17
Proof. Let ord(ab) = m. Since (ab) kl^ = (a k ) l (b l ) k^ = 1, we have m | kl. On the other hand (ab) m^ = 1, hence 1 = (ab) ml^ = a ml. This implies k | ml and so k | m. Similarly, l | m and kl | m.
Lemma 4.5. Let G be a group and a ∈ G be an element of order m_. Then for every integer_ k the order of a k^ is equal to (^) gcd( mm,k ).
Proof. Let ord(a k ) =: l. Then a kl^ = 1 and so m|kl. Now if d := gcd(m, k) then m = dm′, k = dk′^ with gcd(m′, k′) = 1. So m′|k′l and m′|l. Thus md |l. On the other hand (a k ) m/d^ = a mk
′ = 1.
4.2 Primitive roots modulo a prime
Let p be a prime number. Since F p = Z/pZ is a field, every polynomial equation f (x) = 0 hast at most deg(f ) solutions in F p where f (X) ∈ F p [X]
{ 0 }. Alternatively, we could say the congruence f (x) ≡ 0 mod p has at most deg(f ) integer solutions incongruent mod p where f (X) ∈ Z[X] and p does not divide all coefficients of f.
Lemma 4.6. For d | p − 1 the polynomial X d^ − 1 has exactly d roots in F p.
Proof. Since d | p − 1 there is a polynomial g(X) ∈ F p [X] such that
X p −^1 − 1 = (X d^ − 1)g(X).
Obviously, deg(g) = p − 1 − d and hence g(X) has at most p − 1 − d roots. However, X p −^1 − 1 has exactly p − 1 roots and therefore X d^ − 1 has at least p − 1 − (p − 1 − d) = d roots. On the other hand, it cannot have more than d roots and therefore it has exactly d roots.
Lemma 4.7. If p, q are primes and q k^ | p − 1 for some k ≥ 1 , then there is a ∈ F p with ord p (a) = q k.
Proof. By the above lemma the equation x qk − 1 = 0 has exactly q k^ solutions in F p. Suppose none of them has order q k. This means that for each a ∈ F p with a qk = 1 we have ord p (a) | q k −^1. Therefore a is a root of X qk −^1 − 1. But this polynomial has only q k −^1 roots which is a contradiction.
Theorem 4.8. For every prime p there is a primitive root mod p_. Equiva- lently,_ F× p is cyclic.
Proof. Let p − 1 = q k 1 1 · · · q k ss be the prime factorisation of p − 1 and let a i ∈ F× p be of order q ik i. Then g = a 1 · · · a s has order p − 1.