Introduction to Analytic Number Theory
Selected Topics
Lecture Notes
Winter 2019/ 2020
Alois Pichler
Faculty of Mathematics
DRAFT Version as of April 23, 2021 2
Figure 1: Wizzard of Evergreen Terrace: Fermat’s last theorem wrong
rough draft: do not distribute Contents
1 Introduction 7
2 Definitions 9 2.1 Elementary properties...... 9 2.2 Fundamental theorem of arithmetic...... 12 2.3 Properties of primes...... 13 2.4 Chinese remainder theorem...... 14 2.5 Problems...... 16
3 Elementary number theory 19 3.1 Euler’s totient function...... 19 3.2 Euler’s theorem...... 21 3.3 Fermat Primality test...... 23 3.4 AKS Primality test...... 23 3.5 Problems...... 24
4 Continued fractions 25 4.1 Generalized continued fraction...... 25 4.2 Regular continued fraction...... 27 4.3 Elementary properties...... 29 4.4 Problems...... 29
5 Bernoulli numbers and polynomials 31 5.1 Definitions...... 31 5.2 Summation and multiplication theorem...... 32 5.3 Fourier series...... 33 5.4 Umbral calculus...... 34
6 Gamma function 35 6.1 Equivalent definitions...... 35 6.2 Euler’s reflection formula...... 36 6.3 Duplication formula...... 38
7 Euler–Maclaurin formula 39 7.1 Euler–Mascheroni constant...... 40 7.2 Stirling formula...... 40
8 Summability methods 43 8.1 Silverman–Toeplitz theorem...... 43 8.2 Cesàro summation...... 44 8.3 Euler’s series transformation...... 44 8.4 Summation by parts...... 45 8.4.1 Abel summation...... 46
3 4 CONTENTS
8.4.2 Lambert summation...... 46 8.5 Abel’s summation formula...... 47 8.6 Poisson summation formula...... 47 8.7 Borel summation...... 49 8.8 Abel–Plana formula...... 49 8.9 Mertens’ theorem...... 49
9 Multiplicative functions 51 9.1 Arithmetic functions...... 51 9.2 Examples of arithmetic functions...... 51 9.3 Dirichlet product and Möbius inversion...... 52 9.4 Möbius inversion...... 53 9.5 The sum function...... 54 9.6 Other sum functions...... 55 9.7 Problems...... 56
10 Euler’s product formula 57 10.1 Euler’s product formula...... 57 10.2 Problems...... 61
11 Dirichlet Series 63 11.1 Properties...... 63 11.2 Abscissa of convergence...... 63 11.3 Problems...... 64
12 Mellin transform 65 12.1 Inversion...... 65 12.2 Perron’s formula...... 67 12.3 Ramanujan’s master theorem...... 69 12.4 Convolutions...... 70
13 Riemann zeta function 73 13.1 Related Dirichlet series...... 73 13.2 Representations as integral...... 75 13.3 Globally convergent series...... 77 13.4 Power series expansions...... 79 13.5 Euler’s theorem...... 80 13.6 The functional equation...... 81 13.7 Riemann Hypothesis (RH)...... 85 13.8 Hadamard product...... 85
14 Further results and auxiliary relations 87 14.1 Occurrence of coprimes...... 87 14.2 Exponential integral...... 87 14.3 Logarithmic integral function...... 88 14.4 Analytic extensions...... 89
rough draft: do not distribute CONTENTS 5
15 Prime counting functions 91 15.1 Riemann prime counting functions and their relation...... 91 15.2 Chebyshev prime counting functions and their relation...... 93 15.3 Relation of prime counting functions...... 96
16 The prime number theorem 99 16.1 Zeta function on <(·) = 1 ...... 99 16.2 The prime number theorem...... 101 16.3 Consequences of the prime number theorem...... 102
17 Riemann’s approach by employing the zeta function 105 17.1 Mertens’ function...... 105 17.2 Chebyshev summatory function 휓 ...... 105 17.3 Riemann prime counting function...... 106 17.4 Prime counting function 휋 ...... 106
18 Further results 109 18.1 Results...... 109 18.2 Open problems...... 110
Bibliography 110
Version: April 23, 2021 6 CONTENTS
rough draft: do not distribute Introduction 1
Even before I had begun my more detailed investigations into higher arithmetic, one of my first projects was to turn my attention to the decreasing frequency of primes, to which end I counted primes in several chiliads. I soon recognized that behind all of its fluctuations, this frequency is on average inversely proportional to the logarithm.
Gauß, letter to Encke, Dec. 1849
For an introduction, see Zagier [21]. Hardy and Wright [10] and Davenport [5], as well as Apostol [2] are benchmarks for analytic number theory. Everything about the Riemann 휁 function can be found in Titchmarsh [18, 19] and Edwards [7]. Other useful references include Ivaniec and Kowalski [12] and Borwein et al. [4]. Some parts here follow the nice and recommended lecture notes Forster [8] or Sander [17]. This lecture note covers a complete proof of the prime number theorem (Section 16), which is based on a new, nice and short proof by Newman, cf. Newman [14], Zagier [22].
Please report mistakes, errors, violations of copyrights, improvements or necessary comple- tions. Updated version of these lecture notes: https://www.tu-chemnitz.de/mathematik/fima/public/NumberTheory.pdf
Conjecture (Frank Morgan’s math chat). Suppose that there is a nice probability function 푃(푥) that a large integer 푥 is prime. As 푥 increases by Δ푥 = 1, the new potential divisor 푥 is prime with probability 푃(푥) and divides future numbers with probability 1/푥. Hence 푃 gets multiplied by (1 − 푃/푥), so that Δ푃 = (1 − 푃/푥)푃 − 푃 = −푃2/푥, or roughly
푃0 = −푃2/푥.
The general solution to this differential equation is
1 1 푃(푥) = ∼ . 푐 + log 푥 log 푥
7 8 INTRODUCTION
Figure 1.1: Gauss’ 1849 conjecture in his letter to the astronomer Johann Franz Encke, https://gauss.adw-goe.de/handle/gauss/199. Notably, all numbers 휋(·) are wrong in this letter: 휋(500 000) = 41 538, e.g.
rough draft: do not distribute Definitions 2
Before creation, God did just pure mathematics. Then he thought it would be a pleasant change to do some applied.
John Edensor Littlewood, 1885–1977
N = {1, 2, 3,... } the natural numbers P = {2, 3, 5,... } the prime numbers Z = {..., −2, −1, 0, 1, 2, 3 ... } the integers lcm: least common multiple, lcm(6, 15) = 30; sometimes also [푚, 푛] = lcm(푚, 푛) gcd: greatest common divisor, gcd(6, 15) = 3. We shall also write (6, 15) = 3. 푚 ⊥ 푛: the numbers 푚 and 푛 are co-prime, i.e., (푚, 푛) = 1 푓 (푥) 푓 ∼ 푔: the functions 푓 and 푔 satisfy lim푥 푔(푥) = 1.
푓 = O(푔): if there is 푀 > 0 such that | 푓 (푥)| ≤ 푀 · 푔(푥) for all 푥 > 푥0.
2.1 ELEMENTARY PROPERTIES
In number theory, the fundamental theorem of arithmetic, also called the unique factorization theorem or the unique-prime-factorization theorem, states that every integer greater than 1 ei- ther is prime itself or is the product of prime numbers, and that this product is unique, up to the order of the factors. Theorem 2.1 (Euclidean division1). Given two integers 푎, 푏 ∈ Z with 푏 ≠ 0, there exist unique integers 푞 and 푟 such that 푎 = 푏 푞 + 푟 and 0 ≤ 푟 < |푏|. Proof. Assume that 푏 > 0. Let 푟 > 0 be such that 푎 = 푏 푞 + 푟 (for example 푞 = 0, 푟 = 푎). If 푟 < 푏, then we are done. Otherwise, 푞2 B 푞1 + 1 and 푟2 B 푟1 − 푏 (with 푞1 B 푞, 푟1 B 푟) satisfy 푎 = 푏 푞2 + 푟2 and 0 ≤ 푟2 < 푟1. Repeating this process one gets eventually 푞 = 푞푘 and 푟 = 푟푘 such that 푎 = 푏 푞 + 푟 and 0 ≤ 푟 < 푏. If 푏 < 0, then set 푏0 B −푏 > 0 and 푎 = 푏0푞0 + 푟 with some 0 ≤ 푟 < 푏0 = |푏|. With 푞 B −푞0 it holds that 푎 = 푏0푞0 + 푟 = 푏푞 + 푟 and hence the result. Uniqueness: suppose that 푎 = 푏 푞 + 푟 = 푏 푞0 + 푟 0 with 0 ≤ 푟, 푟 0 < |푏|. Adding 0 ≤ 푟 < |푏| and −|푏| < −푟 0 ≤ 0 gives −|푏| < 푟 − 푟 0 ≤ |푏|, that is |푟 − 푟 0| ≤ |푏|. Subtracting the two equations yields 푏(푞0 − 푞) = 푟 − 푟 0. If |푟 − 푟 0| ≠ 0, then |푏| < |푟 − 푟 0|, a contradiction. Hence 푟 = 푟 0 and 푏(푞0 − 푞) = 0. As 푏 ≠ 0 it follows that 푞0 = 푞, proving uniqueness. 1Euclid, 300 bc
9 10 DEFINITIONS
Definition 2.2. If 푚 and 푛 are integers, and more generally, elements of an integral domain, it is said that 푚 divides 푛, 푚 is a divisor of 푛, or 푛 is a multiple of 푚, written as
푚 | 푛,
if there exists an integer 푘 ∈ Z such that 푚 푘 = 푛.
Remark 2.3. The following hold true.
(i) 푚 | 0 for all 푚 ∈ Z;
(ii) 0 | 푛 =⇒ 푛 = 0;
(iii) 1 | 푛 and −1 | 푛 for all 푛 ∈ Z;
(iv) if 푚 | 1, then 푚 = ±1;
(v) transitivity: if 푎 | 푏 and 푏 | 푐, then 푎 | 푐 and 푎 | 푏 푐 ;
(vi) if 푎 | 푏 and 푏 | 푎, then 푎 = 푏 or 푎 = −푏;
(vii) if 푎 | 푏 and 푎 | 푐, then 푎 | 푏 + 푐 and 푎 | 푏 − 푐.
Definition 2.4. A natural number 푛 ∈ N is composite if 푛 = 푘 · ℓ for 푘, ℓ ∈ N and 푘 > 1, ℓ > 1. A natural number 푛 > 1 which is not composite is called prime.
Composite numbers are {4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24,... }, prime numbers are P = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 39, 41, 43, 47, 51,... }. Remark 2.5. Note that a number 푛 ∈ N is either composite, prime or the unit, 푛 = 1.
Definition 2.6. The greatest common divisor of the integers 푎1, . . . , 푎푛 is the largest natural number that dives all 푎푖, i.e.,
gcd(푎1, . . . , 푎푛) = max {푚 ≥ 1: 푚 | 푎1, . . . , 푚 | 푎푛} .
We shall also write (푎, 푏) B gcd(푎, 푏). Definition 2.7. The numbers 푎 and 푏 are coprime, relatively prime or mutually prime if (푎, 푏) = 1. We shall also write 푎 ⊥ 푏.
Lemma 2.8 (Bézout’s identity2). For every 푎, 푏 ∈ Z there exist integers 푥 and 푦 ∈ Z such that
푎 푥 + 푏 푦 = gcd(푎, 푏); (2.1)
more generally, {푎 푥 + 푏 푦 : 푥, 푦 ∈ Z} = {푧 · 푑 : 푧 ∈ Z}, where 푑 = gcd(푎, 푏).
Proof. Given 푎 ≠ 0 and 푏 ≠ 0, 푎, 푏 ∈ Z, define 푆 B {푎푥 + 푏푦 : 푥 ∈ Z, 푦 ∈ Z and 푎푥 + 푏푦 > 0}. The set is not empty, as 푎 ∈ 푆 or −푎 ∈ 푆 (indeed, choose 푥 = ±1 and 푦 = 0). By the well-ordering principle, there is a minimum element 푑 B min {푑0 : 푑0 ∈ S} = 푎 푠 + 푏 푡 ∈ 푆. We shall show that 푑 = gcd(푎, 푏). By Euclidean division we have that 푎 = 푑 푞 + 푟 with 0 ≤ 푟 < 푑. It holds that
푟 = 푎 − 푑 푞 = 푎 − (푎 푠 + 푏 푡)푞 = 푎(1 − 푠 푞) − 푏(푡 푞),
2Étienne Bézout, 1730–1783, proved the statement for polynomials.
rough draft: do not distribute 2.1 ELEMENTARY PROPERTIES 11 and thus 푟 ∈ 푆 ∪ {0}. As 푟 < 푑 = min S, it follows that 푟 = 0, i.e., 푑 | 푎; similarly, 푑 | 푏 and thus 푑 ≤ gcd(푎, 푏). Now let 푐 be any divisor of 푎 and 푏, that is, 푎 = 푐 푢 and 푏 = 푐 푣. Hence
푑 = 푎 푠 + 푏 푡 = 푐푢푠 + 푐푣푡 = 푐(푢푠 + 푣푡), that is 푐 | 푑 and therefore 푐 ≤ 푑, i.e., 푑 ≥ gcd(푎, 푏). Hence the result.
Corollary 2.9. There are integers 푥1, . . . , 푥푛 so that
gcd(푎1, . . . , 푎푛) = 푥1 푎1 + · · · + 푥푛 푎푛.
Corollary 2.10. It holds that 푎 and 푏 are coprime,
(푎, 푏) = 1 ⇐⇒ 푎 푠 + 푏 푡 = 1 (2.2) for some 푠, 푡 ∈ Z.
Proof. It remains to verify “ ⇐= ”: suppose that 푎 푠 + 푏 푡 = 1 and 푑 is a divisor of 푎 and 푏, i.e., 푎 = 푢 푑 and 푏 = 푣 푑. Then 1 = 푢푑푠 + 푣푑푡 = 푑(푢푠 + 푣푡), that is, 푑 | 1, thus 푑 = 1 and consequently (푎, 푏) = 1.
Lemma 2.11 (Euclid’s lemma). If 푝 ∈ P is prime and 푎 · 푝 a product of integers, then
푝 | (푎 · 푏) =⇒ 푝 | 푎 or 푝 | 푏.
Theorem 2.12 (Generalization of Euclid’s lemma). If
푛 | (푎 · 푏) and (푛, 푎) = 1, then 푛 | 푏.
Proof. We have from (2.2) that 푟 푛 + 푠 푎 = 1 for some 푟, 푠 ∈ Z. It follows that 푟 푛 푏 + 푠 푎 푏 = 푏. The first term is divisible by 푛. By assumption, 푛 divides the second term as well, and hence 푛 | 푏.
The extended Euclidean algorithm (Algorithm1) computes the gcd of two numbers and the coefficients in Bezout’s identity (2.1).
input :two integers 푎 and 푏 output :gcd(푎, 푏) and the coefficients of Bézout’s identity (2.1) set (푑, 푠, 푡, 푑0, 푠0, 푡0) = (푎, 1, 0, 푏, 0, 1); initialize while 푑0 ≠ 0 do set 푞 = 푑 div 푑0 integer division set (푑, 푠, 푡, 푑0, 푠0, 푡0) = (푑0, 푠0, 푡0, 푑 − 푞 · 푑0, 푠 − 푞 · 푠0, 푡 − 푞 · 푡0) end return (푑, 푠, 푡) it holds that 푑 = gcd(푎, 푏) = 푎 푠 + 푏 푡 Algorithm 1: Extended Euclidean algorithm
Table 2.1 displays the results of the Euclidean algorithm for 푎 = 2490 and 푏 = 558: it holds that 13 ∗ 2490 − 58 ∗ 558 = 6 = gcd(푎, 푏).
Version: April 23, 2021 12 DEFINITIONS
푞 푑 푠 푡 푑0 푠0 푡0 2490 1 0 558 0 1 initialize 4 558 0 1 258 1 −4 2490/558 = 4 + 258/558 2 258 1 −4 42 −2 9 558/258 = 2 + 42/258 6 42 −2 9 6 13 −58 258/42 = 6 + 6/42 7 6 13 −58 0 −93 415 42/6 = 7 + 0
Table 2.1: Results of Algorithm1 for 푎 = 2490 and 푏 = 558
2.2 FUNDAMENTALTHEOREMOFARITHMETIC
The fundamental theorem of arithmetic, also called the unique factorization theorem or the unique-prime-factorization theorem, states that every integer greater than 1 either is a prime number itself or can be represented as the product of prime numbers and that, moreover, this representation is unique, up to the order of factors. Theorem 2.13 (Canonical representation of integers). Every integer 푛 > 1 has the unique rep- resentation 훼1 · · 훼휔 푛 = 푝1 ... 푝 휔 , (2.3)
where 푝1 < 푝2 < ··· < 푝 휔 and 훼푖 = 1, 2,... (훼푖 > 0). Proof. We need to show that every integer is prime or a product of primes. For the base case, 푛 = 2 is prime. Assume the assertion is true for all numbers < 푛. If 푛 is prime, there is nothing more to prove. Otherwise, 푛 is composite and there are integers so that 푛 = 푎푏 and 1 < 푎 ≤ 푏 < 푛. By induction hypothesis, 푎 = 푝1 ··· 푝 푗 and 푏 = 푞1 ··· 푞푘 , but then 푛 = 푝1 ··· 푝 푗 · 푞1 ··· 푞푘 is a product of primes. Uniqueness: suppose that 푛 is a product of primes which is not unique, i.e.,
푛 = 푝1 ··· 푝 푗
= 푞1 ··· 푞푘 .
Apparently, 푝1 | 푛. By Euclid’s lemma (Lemma 2.11) we have that 푝1 divides one of the 푞푖s, 푞1, say. But 푞1 is prime, thus 푞1 = 푝1. Now repeat the reasoning to
푛/푝1 = 푝2 ··· 푝 푗 and
= 푞2 ··· 푞푘 ,
so that 푞2 = 푝2, etc. Theorem 2.14 (Euclid’s theorem). There exist infinity many primes.
Proof. Assume to the contrary that there are only finitely many primes, 푛, say, which are 푝1 = 2, 푝2 = 3, . . . , 푝푛. Consider the natural number
푞 B 푝1 · 푝2 · ... · 푝푛. If 푞 + 1 is prime, then the initial list of primes was not complete. If 푞 + 1 is not prime, then 푝 | (푞 + 1) for some prime number 푝. But 푝 | 푞, and hence, by Remark 2.3 (iv), it follows that 푝 | 1. But no prime number 푝 satisfies 푝 | 1 and hence 푞 + 1 is prime, but not in the list.
rough draft: do not distribute 2.3 PROPERTIESOFPRIMES 13
Theorem 2.15. Let 푝1 B 2, 푝2 B 3, etc. be the primes in increasing order. It holds that 2푛−3 푝푛 < 6 for 푛 ≥ 3.
Proof. The assertion is true for 푛 = 3. It follows from the proof of Theorem 2.14 that 푝푛+1 < 20 21 2푛−3 2푛−2 푝1 ··· 푝푛, thus 푝푛+1 < 2 · 3 · 6 · 6 ··· 6 = 6 , the result.
2.3 PROPERTIESOFPRIMES
Í푛−1 Definition 2.16 (Prime gap). The 푛-th prime gap is 푔푛 B 푝푛+1 − 푝푛. (I.e., 푝푛 = 2 + 푖=1 푔푖.) There exist prime gaps of arbitrary length.
Theorem 2.17 (Prime gap). For every 푔 ∈ N there exist 푛 ∈ N so that all 푛 + 1, . . . , 푛 + 푔 are not prime, i.e., there is an 푚 ∈ N so that 푝푚+1 ≥ 푝푚 + 푔.
Proof. Define 푛 B (푔 + 1)!, then 푑 | (푛 + 푑) for every 푑 ∈ {2, . . . , 푔 + 1}.
Remark 2.18. Alternatively, one may choose 푛 B lcm (1, 2, 3, . . . , 푔 + 1) in the preceding proof. Definition 2.19 (Prime gaps). Let 푝 ∈ P;
(i) if 푝 + 2 ∈ P, then they are called twin primes;
(ii) if 푝 + 4 ∈ P, they are called cousin primes;
(iii) if 푝 + 6 ∈ P, then they are called sexy primes.3
Note that every prime 푝 ∈ P is either 푝 = 2, or 푝 = 4푘 + 1 or 푝 = 4푘 + 3.
Theorem 2.20. There are infinity many primes of the form 4푘 + 3.
Proof. Observe that
(4푘 + 1)·(4ℓ + 1) = 4 (4푘ℓ + 푘 + ℓ) + 1 and (2.4) (4푘 + 3)·(4ℓ + 3) = 4(4푘ℓ + 3푘 + 3ℓ + 2) + 1. (2.5)
By reductio ad absurdum, suppose that there are only finitely many primes in
P3 B {푝 ∈ P: 푝 = 4푘 + 3 for some 푘 ∈ N} = {3, 7, 11, 19,... } = {푝1, . . . , 푝푠 }.
2 2 Consider 푁 B 푝1 ··· 푝푠 + 2. By (2.5) and (2.4), 푁 = 4푘 + 3 and thus 2 - 푁. Let 푞1, . . . , 푞푟 = 푁 be the prime factors of 푁. As 2 - 푁, we have that 푞푖 = 4푘푖 + 1 or 푞푖 = 4푘푖 + 3. If all factors were of the form 푞푖 = 4푘푖 + 1, then 푁 = 4푘 + 1 by (2.4), but 푁 = 4푘 + 3. Hence there is some 푞푖 ∈ P3 for some 2 2 2 2 푖. But 푞푖 | 푁 and 푞푖 | 푝1 ··· 푝푠 (these are all primes in P3), thus 푞푖 | 푁 − 푝1 ··· 푝푠 , i.e., 푞푖 | 2 and this is a contradiction. The following theorem represents the beginning of rigorous analytic number theory.
Theorem 2.21 (Dirichlet’s theorem on arithmetic progressions, 1837). For any two positive co- prime integers 푎, 푏 there are infinity many primes of the form 푎 + 푛 푏, 푛 ∈ N.
Proposition 2.22. The following hold true:
3because 6 = sex in Latin
Version: April 23, 2021 14 DEFINITIONS
(i) if 2푛 − 1 ∈ P, then 푛 ∈ P;
(ii) if 2푛 + 1 ∈ P, then 푛 = 2푘 for some 푘 ∈ N.
ℓ ℓ Íℓ−1 푖 ℓ−푖−1 Proof. Suppose that 푛 ∉ P, thus 푛 = 푗·ℓ with 1 < 푗, ℓ < 푛. Recall that 푥 −푦 = (푥−푦)· 푖=0 푥 푦 , thus ℓ−1 ℓ ∑︁ 2푛 − 1 = 2 푗 − 1ℓ = 2 푗 − 1 · 2 푗·푖 푖=0 and thus 2 푗 − 1 | 2푛 − 1. But 2푛 − 1 ∈ P by assumption and so this contradicts the assertion (ii), as 1 < 푗 < 푛. As for (ii) suppose that 푛 ≠ 2푘 , then 푛 = 푗 · ℓ, with ℓ being odd and ℓ > 1. As above,
ℓ−1 ℓ ∑︁ 2푛 + 1 = 2 푗 − (−1)ℓ = 2 푗 − (−1) · (−1)ℓ−푖−1 2 푗·푖 푖=0
and hence 2 푗 +1 | 2푛 +1. The result follows by reductio ad absurdum, as 2푛 +1 ∈ P by assumption and 2 ≤ 푗 < 푛.
2푛 Definition 2.23 (Fermat4 prime). The Fermat numbers are 퐹푛 B 2 + 1. 퐹푛 is a Fermat prime, if 퐹푛 is prime.
As of 2019, the only known Fermat primes are 퐹0 = 3, 퐹1 = 5, 퐹2 = 17, 퐹3 = 257 and 퐹4 = 65 537. The factors of 퐹6, . . . , 퐹11 are known.
Theorem 2.24 (Gauss–Wantzel5 theorem). An 푛-sided regular polygon can be constructed with compass and straightedge if and only if 푛 is the product of a power of 2 and distinct Fermat 푘 primes: in other words, if and only if 푛 is of the form 푛 = 2 푝1 푝2 . . . 푝2, where 푘 is a nonnegative integer and the 푝푖 are distinct Fermat primes.
Definition 2.25 (Mersenne6 prime). Mersenne primes are prime numbers of the form 푀푛 B 2푛 − 1.
Some Mersenne primes include 푀2 = 3, 푀3 = 7, 푀5 = 31, 푀7 = 127, 푀13 = 8191. As of 2018, 51 Mersenne primes are known.
Proposition 2.26. It holds that
lcm(푎, 푏) ∗ gcd(푎, 푏) = 푎 ∗ 푏.
2.4 CHINESEREMAINDERTHEOREM
Definition 2.27. For 푚 ≠ 0 we shall say
푎 = 푏 mod 푚
if 푚 | (푎 − 푏).
4Pierre de Fermat, 1607–1665 5Pierre Wantzel, 1814–1848, French mathematician 6Marin Mersenne, 1588–1648, a French Minim friar
rough draft: do not distribute 2.4 CHINESEREMAINDERTHEOREM 15
Remark 2.28. By Definition 2.2 we have that 푎 = 푏 mod 푚 iff 푎 = 푏 + 푘 · 푚 for some 푘 ∈ Z. Proposition 2.29. It holds that (i) Reflexivity: 푎 = 푎 mod 푚 for all 푎 ∈ Z; (ii) Symmetry: 푎 = 푏 mod 푚, then 푏 = 푎 mod 푚 for all 푎, 푏 ∈ Z; (iii) Transitivity: 푎 = 푏 mod 푚 and 푏 = 푐 mod 푚, then 푎 = 푐 mod 푚; In what follows we assume that 푎 = 푎0 mod 푚 and 푏 = 푏0 mod 푚. (iv) 푎 ± 푏 = 푎0 ± 푏0 mod 푚; (v) 푎 푏 = 푎0 푏0 mod 푚; (vi) 푐 푎 = 푐 푎0 mod 푚 for all 푐 ∈ Z; (vii) (compatibility with exponentiation) 푎푘 = 푎0푘 mod 푚 for all 푘 ∈ N; (viii) 푝(푎) = 푝(푎0) mod 푚 for all polynomials 푝(·) with integer coefficients. Proposition 2.30. If gcd(푎, 푚) | 푐, then the problem 푎 푥 = 푐 mod 푚 has a solution (this is a possible converse to (vi)). 푠푐 푐 Proof. From (2.1) we have that 푑 B gcd(푎, 푚) = 푎푠+푚푡 and hence 푐 = 푎 푑 +푚푡 푑 . By assumption 푠푐 푐 we have that 푥 = 푑 is an integer and it follows that 푐 = 푎푥 + 푚 · 푡 푑 , that is, 푎푥 = 푐 mod 푚. Remark 2.31. Suppose that 0 < 푎 < 푝 for a prime 푝. Then 1 = gcd(푎, 푝) | 1 and hence the problem 푎푥 = 1 mod 푝 has a solution, irrespective of 푎. Algorithm1 provides numbers with 1 = 푎 푠 + 푝 푡, that is 푎−1 = 푠 mod 푝.
Theorem 2.32 (Chinese remainder theorem). Suppose that 푛1, . . . , 푛푘 are all pairwise coprime and 0 ≤ 푎푖 < 푛푖 for every 푖. Then there is exactly one integer with 푥 ≥ 0 and 푥 < 푛1 · ... · 푛푘 =: 푁 with
푥 = 푎1 mod 푛1, (2.6) . .
푥 = 푎푘 mod 푛푘 . (2.7)
Proof. The numbers 푛푖 and 푁푖 B 푁/푛푖 are coprime. Bézout’s identity provides integers 푀푖 and Í푛 푚푖 such that 푀푖 푁푖 + 푚푖 푛푖 = 1. Set 푥 B 푗=1 푎 푗 푀 푗 푁 푗 mod 푁. Recall that 푛푖 | 푁 푗 whenever 푖 ≠ 푗. Hence 푥 = 푎푖 푀푖 푁푖 = 푎푖 (1 − 푚푖 푛푖) = 푎푖 − 푎푖 푚푖 푛푖 mod 푛푖 and thus 푥 solves (2.6)–(2.7). Suppose there were two solutions 푥 and 푦 of (2.6)–(2.7). Then 푛푖 | 푥 − 푦 and, as the 푛푖 are all coprime, it follows that 푁 | 푥 − 푦. Hence 푥 = 푦, as it is required that 0 ≤ 푥, 푦 < 푁. Theorem 2.33 (Lucas’s theorem7). For integers 푛, 푘 and 푝 prime it holds that
ℓ 푛 Ö 푛 ≡ 푖 mod 푝, 푘 푘 푖=0 푖 ℓ ℓ−1 ℓ ℓ−1 where 푛 = 푛ℓ 푝 + 푛ℓ−1 푝 + · · · + 푛0 and 푘 = 푘ℓ 푝 + 푘ℓ−1 푝 + · · · + 푘0 are the base 푝 expansions with 0 ≤ 푛푖, 푘 < 푝. 7Édouard Lucas, 1842–1891, French mathematician
Version: April 23, 2021 16 DEFINITIONS