* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download NUMBER THEORY
Vincent's theorem wikipedia , lookup
List of first-order theories wikipedia , lookup
Foundations of mathematics wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Mathematical proof wikipedia , lookup
Nyquist–Shannon sampling theorem wikipedia , lookup
Factorization of polynomials over finite fields wikipedia , lookup
Central limit theorem wikipedia , lookup
Brouwer fixed-point theorem wikipedia , lookup
List of important publications in mathematics wikipedia , lookup
Fundamental theorem of calculus wikipedia , lookup
Four color theorem wikipedia , lookup
Wiles's proof of Fermat's Last Theorem wikipedia , lookup
Fermat's Last Theorem wikipedia , lookup
List of prime numbers wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
NUMBER THEORY PROF. SANJU VELANI 1. Elementary Theory and Primes An integer p > 1 is prime if its only positive divisors are 1 and p. An integer > 1 which is not prime composite. Problem: To determine whether a given integer n is prime or composite. Obvious Approach: Divide n by each number proceeding it. If none (except 1) divide n then n is prime, otherwise it is composite. • not so good when n is large!! • a simple observation makes life easier!! √ Lemma 1.1. If n > 1 is composite, then there exists p 6 n s.t. p|n. Proof. By Fundamental Theorem of Arithmetic, n = p1 p2 . . . pk with 1 < p1 6 p2 6 · · · 6 pk and k > 2. Then, and so p1 6 √ n. p12 6 p1 p2 6 n and p1 |n Theorem 1.1 (Fundamental Theorem of Arithmetic). Every natural number n > 1 can be expressed as a product of primes; this representation is unique apart from the order in which the factors appear. The standard form, n = p1α1 p2α2 . . . pkαk with p1 < p2 < · · · < pk is unique. Upshot: √To test whether n is prime or composite, we only need to divide n by those primes 6 n. Example 1.1. Is 509 prime or composite? √ 509 < 23. The primes < 23 are 2, 3, 5, 7, 11, 13,√17 and 19. None divide 509, so it is prime. This method requires a list of primes up to n. To find all primes between 2 an n we can use the sieve of Eratosthenes - the first basic sieve. (1) Write down integers from 2 to n in natural order. (2) Strike out all multiples of 2 (except 2). (3) Strike out all multiples of least number which remains (except that number) 1 2 PROF. SANJU VELANI (4) If least number is 6 √ n then repeat (3) - if not then all numbers left are primes. √ Example 1.2. Find all primes between 2 and 35. Note that 35 < 6. 2 3 4 5 6 7 8 17 11 12 13 14 15 16 18 23 21 22 24 25 26 27 28 31 32 33 34 35 10 9 19 20 29 30 i.e. 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 are primes. 1.1. Obvious Question Is there a largest prime? No! Euclid (≈ 350 BC) proved there are infinitely many primes. Proof. Suppose there are only finitely many primes p1 , . . . , pk . Let N = p1 . . . pk + 1 > 1. Fundamental Theorem of Arithmetic ⇒ there exists a prime p s.t. p|N. So, p = pi for some 1 6 i 6 k. Hence p|N and p|p1 . . . pk ⇒ p|1. A contradiction. Let pn denote the nth prime. Euclid’s proof shows that there exists a prime pm > pn s.t. n Y pm pi + 1 for m > n i=1 Qn pn+1 6 pm 6 i=1 pi + 1. i.e. We have a bound on the rate of increase of the pn , namely pn+1 6 pnn + 1 (1.1) a very weak estimate. For example when n = 3, p3 = 5 and (1.1) states that p4 6 53 + 1 = 126. In fact p4 = 7 - much less than 126. A sharper bound is given by; n−1 Theorem 1.2. For n > 1, pn 6 22 . Proof. By induction (exercise). 2n Corollary 1.1. For n > 1, there are at least (n + 1) - primes 6 2 ! n Proof. By Theorem 1.2, p1 , . . . , pn+1 are all less than 22 . 1.2. Counting primes, π(n) For any n ∈ N, let π(n) denote the number of primes 6 n; i.e. X π(n) = 1 p-primes p6n So far we have (1) Euclid limn→∞ π(n) = ∞ NUMBER THEORY 3 n (2) Corollary 1.1 ⇒ π(22 ) ≡ π(n) > log(log n) (n > 2) 2 is very weak, e.g. n = 109 gives us log(log n) = 2 log(3 log 10) > 2 but π(109 ) is over 50 million. So how does π(n) behave? First significant conjecture, Legendre (≈ 1798) - he suggested that π(n) behaves like, n log n − 1.08366 Gauss (≈ 1791 aged 14) independent of Legendre, concluded that π(n) increases like In particular, n π(n) π(n) ∼ lim n = 1 , n→∞ log n log n n . log n where ∼ means asymptotic. The Results Tchebychef (1850) concluded the following. There exist positive constants a < 1 < b s.t. for n > 2 a n n < π(n) < b log n log n Corollary 1.2 (Tchebychef). i) 1b n log n < pn < a2 n log n for n large. P ii) p 1p = ∞ Proof. i) By definition π(pn ) = n. Corollary 1.2 implies (1.2) a pn pn < π(pn ) = n < b log pn log pn Now the R.H.S. of (1.2) gives us bpn > n log pn > n log n (last inequality holds from pn > n). i.e. pn > gives us n>a Since, √ pn > pn log pn 1 b n log n. Now the L.H.S. of (1.2) for n large. 4 PROF. SANJU VELANI log x =0 for any ǫ > 0. x→∞ xǫ Thus, pn < n2 ⇒ log pn < 2 log n and apn < n log pn < 2n log n. ii) Exercise. lim We’ll come back to the proof of Tchebychef later. Some 45 years later the conjecture of Gauss was proved independently by Hadamard and de la Valle Poussin in 1896. Theorem 1.3 (Prime Number Theorem). We first notice that, lim n→∞ π(n) n log n = 1. Now the theorem says if we choose a number between 1 and n (n large) at ‘random’ then the probability that it’s a prime is about, 1 . log n Corollary 1.3 (P.N.T.). n log n =1 n→∞ pn lim Proof. Exercise. 2. Primes in Arithmetic Progressions The odd integers naturally fall into two classes (or arithmetic progressions). • n ≡ 1 (mod 4) (n = 4k + 1 : k ∈ N) 1, 5, 9, 13, ... • n ≡ 3 (mod 4) (n = 4k + 3 : k ∈ N) 3, 7, 11, 15, ... Question: Do each of these ‘classes’ contain infinitely many primes? Easy to deal with the case n ≡ 3 (mod 4) - slight modification of Euclid’s proof yields. Theorem 2.1. There are infinitely many primes p ≡ 3 (mod 4). Proof. Exercise. (Hint: the product of two or more integers of the form 4n + 1 is of the same form.) Question: Do there exist infinitely many primes of the form 4k + 1? Yes - require more machinery. Fact: Let p be an odd prime. Then x2 ≡ −1 (mod p) has a solution (i.e. -1 is a quadratic residue of p) iff p ≡ 1 (mod 4). Theorem 2.2. There are infinitely many primes p ≡ 1 (mod 4). NUMBER THEORY 5 Proof. Suppose there are finitely many, say p1 , . . . , pk . Let N = (2p1 . . . pk )2 + 1. Clearly N > 1 and is odd, so there exists an odd prime p s.t. p|N, i.e. (2p1 . . . pk )2 ≡ −1 (mod p). FACT ⇒ p ≡ 1 (mod 4); so p = pi for some 1 6 i 6 k. Then p|N and p|(2p1 . . . pk )2 ⇒ p|1, false. Both Theorems 2.1 and 2.2 are special cases of a remarkable theorem due to Dirichlet (1837). Theorem 2.3 (Primes in Arithmetic Progression). If a and b are co-prime (hcf(a, b) = 1), positive integers then the arithmetic progression a + kb, k = 1, 2, . . . , contains infinitely many primes. Remark. (1) i.e. there exists infinitely many primes p ≡ a (mod b) whenever hcf(a, b) = 1. (2) There exists infinitely many primes ending in 999, such as 1999, 100999, 10000999, . . . - simply consider the arithmetic progression given by 999 + 1000k, k = 1, 2, . . . , and notice that hcf(999, 1000) = 1. (3) It is easy to show that there is no arithmetic progression that consists solely of primes (Exercise). (4) In fact, concerning part (iii), it can be shown that there is no non-constant polynomial f (n) with integer coefficients which takes on just prime values for n ∈ N. Assume f (n) takes on just prime values. Write, f (n) = ak nk + ak−1 nk−1 + · · · + a2 n2 + a1 n + a0 , where a0 , . . . , ak ∈ Z and ak 6= 0. Fix n, say n = n0 , f (n0 ) = p - where p is a prime. For t ∈ Z, f (n0 + tp) = ak (no + tp)k + · · · + a1 (n0 + tp) + a0 = ak nk0 + · · · + a1 n0 + a0 + pQ(t) where Q(t) is a polynomial in t with integer coefficients = f (n0 ) + pQ(t) = p + pQ(t) = p(1 + Q(t)) where 1+Q(t) is an integer. The upshot of this is that p|f (no +pt) so f (no +pt) = p for all t ∈ Z since f only takes on prime values. But any integer polynomial of degree k cannot take on the same value more than k-times - a contradiction ... In the Middle Ages they believed that (2.1) f (n) = n2 + n + 41 6 PROF. SANJU VELANI just took on primes - indeed this is the case for n = 0, 1, 2, . . . , 39. However writing (2.1) as n(n + 1) + 41 we see; f (40) = 40 × 41 + 41 = 412 and in view of remark (4), (2.1) can’t take on primes. There have been recent advances for prime producing functions. n Theorem 2.4 (Mills, 1947). There exists r ∈ R such that f (n) = r 3 , which we write to n mean the integer part of r 3 , is prime for n ∈ N. This is an existence theorem, we know nothing about that value of r. 3. Sums of Squares We start by inspecting the first 8 numbers. 1 = 02 + 1 2 5 = 12 + 2 2 2 = 12 + 1 2 6 = 12 + 2 2 + 1 2 3 = 12 + 1 2 + 1 2 7 = 12 + 2 2 + 1 2 + 1 2 4 = 02 + 2 2 8 = 22 + 2 2 Not all n ∈ N can be written as the sum of two or even three squares. In the second year course on number theory you investigated sums of two squares. The key fact was, Fact (S2S): If m and n are the sum of two squares then so is mn. This implies we only need to determine which primes are expressible as the sum of two squares. Theorem 3.1. Let p be prime. Then p is a sum of two sqaures, ⇔ p ≡ 2 or 1 (mod 4). i.e. p ≡ 3 (mod 4) is not the sum of two squares. Now the above fact and theorem together gives us the following theorem about the sums of two squares. Theorem 3.2. Let n ∈ N. Then n is a sum of two squares ⇔ each of its prime factors is of the form 4k + 3 occurs to an even power. We’ve already seen not evey n ∈ N can be written as the sum of three squares. In fact, Theorem 3.3. If n ≡ 7 (mod 8) then n is not expressible as the sum of three squares. (Exercise) Theorem 3.4. Let n ∈ N, then n is a sum of three squares ⇔ n is not of the form 4m (8k + 7) - this is much harder than the sum of two squares theorem since there is no analogue of the FACT for sums of three squares. Question: Is the sum of four squares enough? NUMBER THEORY 7 Theorem 3.5 (Lagrange, 1770). Every n ∈ N is a sum of four squares. Lemma 3.1 (Euler’s Identity). If m and n are the sum of four squares then so is mn. Proof. Verify that, (a21 + a22 + a23 + a24 )(b21 + b22 + b23 + b24 ) = (c21 + c22 + c23 + c24 ). Where we have c1 = (a1 b1 + a2 b2 + a3 b3 + a4 b4 ) c2 = (a1 b2 − a2 b1 + a3 b4 − a4 b3 ) c3 = (a1 b3 − a2 b4 − a3 b1 + a4 b2 ) c4 = (a1 b4 + a2 b3 − a3 b2 − a4 b1 ) In view of Lemma 3.1, we only need to prove Theorem 3.5 for primes (1 = 12 +02 +02 +02 ). First we prove Lemma 3.2. If p is an odd prime, then . (1) x2 + y 2 + 1 ≡ 0 (mod p) has a solutin x0 , y0 where 0 6 x0 , y0 6 p−1 2 (2) there exists k ∈ N with 1 6 k < p such that kp is the sum of four squares. First we mention an extremely simple yet powerful observation. Note (Pigeon-hole principle). If n objects are placed in m boxes and if n > m, the same box will contain at least two objects. Proof. (1) There exists x0 , y0 such that x02 + y02 + 12 + 02 = kp for some k ∈ N. Since 0 6 x0 , y0 < p2 , p 2 p 2 1 1 kp < + 2 + +1=p 2 2 2 p ∵ p is odd ⇒ k < p. Now consider the following sets ( 2 p−1 S1 = 1 + 0 2 , 1 2 + 1 2 , . . . , 1 + 2 ( ) 2 p−1 2 2 S2 = −0 , −1 , . . . , − . 2 < p2 2 ) No two elements of S1 are equivalent modulo p. For if 1 + x12 ≡ 1 + x22 (mod p) and x1 6= x2 then 8 PROF. SANJU VELANI x12 ≡ x22 (mod p) ⇒ (x1 − x2 )(x1 + x2 ) = x12 − x22 ≡ 0 (mod p) ⇒ x1 ≡ x2 (mod p) or x1 ≡ −x2 (mod p) but not both (otherwise we’d have x2 ≡ −x2 (mod p) ⇒ 1 ≡ −1 (mod p) since hcf(x2 , p) = 1 ⇒ p|2, which is false since p is odd). Now x1 ≡ x2 (mod p) ⇒ x1 = x2 or a contradiction. Similarly no two elements of S2 are equivalent modulo p. ) = p + 1 integers. By the Pigeon-hole principle Now S1 and S2 contain 2(1 + p−1 2 some integer in S1 must be equivalent modulo p to some integer in S2 . i.e There exists x0 , y0 such that p−1 . 2 1 + x20 ≡ −y02 (mod p) and 0 6 x0 , y0 6 (2) This follows from the above. In view of Euler’s identity, our next result proves Lagrange’s theorem. Theorem 3.6. Any prime p can be written as the sum of four squares. Proof. 2 = 12 + 12 + 02 + 02 . With out loss of generality assume p is odd. Let k be the smallest positive integer such that kp = x2 + y 2 + z 2 + w 2 Lemma 3.2 ⇒ such a k exists and moreover 1 6 k < p. Our aim is to show k = 1. Claim 1: k is odd. Proof. Assume k is even; then x, y, z, w are all even, all odd or two even and two odd - since even2 =even and odd2 =odd. Rearranging if necessary; x+y and z + w are even. Then, 1 (kp) = 2 x−y 2 2 + x+y 2 2 + z−w 2 2 + z+w 2 2 all the terms in brackets are integers as x + y = 2k ⇒ x − y = 2k − 2y = 2(k − y), which is even. Claim 2: k = 1 (3.1) Proof. Assume k 6= 1. Claim 1 ⇒ k > 3. So there exists a, b, c, d ∈ Z such that a≡x b≡y c≡z d≡w (mod k) with 0 6 |a|, |b|, |c|, |d| < k2 . (For example to obtain a, we have that x ≡ r (mod k) with 0 6 r 6 k − 1. Put a = r if r < k2 and a = r − k if r > k2 ). Thus, NUMBER THEORY a2 + b2 + c2 + d2 = nk (3.2) 9 for some n > 0. Now, 2 k = k2 ⇒ n < k 0 6 nk < 4 2 Also, n 6= 0, otherwise a = b = c = d = 0 and (3.1) ⇒ k divides each x, y, z, w ⇒ k 2 |kp ⇒ k|p impossible since 1 < k < p. Upshot: 0 < n < k. It is easily verified that; k 2 np = (kp)(kn) = (x2 + y 2 + z 2 + w 2)(a2 + b2 + c2 + d2 ) = r 2 + s2 + t2 + u2 where r = xa + yb + zc + wd ≡ a2 + b2 + c2 + d2 ≡ 0 (mod k) s = xb − ya + zd − wc ≡ ab − ba + cd − dc ≡ 0 (mod k) t = xc − yd − za + wb ≡ ac − bd + cd − dc ≡ 0 (mod k) u = xd + yc − zd − wa ≡ ad + bc − cd − da ≡ 0 (mod k) The first equivalence’s hold by (3.1) and the second by (3.2). Thus r ≡ s ≡ t ≡ u ≡ 0 (mod k), hence np = r 2 k + s 2 k 2 t u 2 + + . k k where are the brackets are integers. Since 0 < n < k, this contradicts our minimal choice of k. Thus k = 1. So finally we have k = 1 and hence our prime p can be expressed as, p = x2 + y 2 + z 2 + w 2 as required. 10 PROF. SANJU VELANI 4. Waring’s Problem i) The least s such that each N can be represented as; N = x1k1 + x2k2 + · · · + xsks is defined to be g(k). ii) Thus, g(1) = 1 g(2) = 4 Lagrange ⇒ g(2) 6 4 g(3) = 9 g(4) = 19 Liouville ⇒ g(4) 6 50 g(2) 6 4: Lagrange ⇒ g(2) 6 4 and if n ≡ 7 (mod 8) then three squares isn’t sufficient ⇒ g(2) > 4. Part (i) was proved by Hilbert (1909) namely g(k) < ∞ ⇒ for every k, least s exists but no means of saying what it is! (non-effective) Except for squares, (g(2) = 4), the first Waring type theorem - actually proved and is due to Liouville. Theorem 4.1 (Liouville, 1859). g(4) 6 50, so every n ∈ N can be written as the sum of fifty fourth powers. Proof. For n > 81, we can write; n = 6N + r with r = 0, 1, 2, 81, 16, 17 according to whether n ≡ 0, 1, 2, 3, 4, 5, 6 (mod 6), i.e. 3 ≡ 81 (mod 6) etc. Then each r is the sum of two fourth powers; 0 = 04 + 0 4 1 = 14 + 0 4 2 = 14 + 1 4 81 = 34 + 04 16 = 24 + 04 17 = 24 + 14 Now N = A2 + B 2 + C 2 + D 2 by Lagrange and A2 = a12 + a22 + a32 + a42 by Lagrange. It can be verified that 6A2 is the sum of twelve fourth powers, see problem sheet four Ex. 24. Similarly 6B 2 , 6C 2 , 6D 2 can be expressed as the sum of twelve four powers. Upshot: 6N is the sum of 48 = (4 × 12) fourth powers. If n > 81, n = 6N + r is the sum of fifty fourth powers. For n < 81, use brute force. NUMBER THEORY 11 Remark. It’s known g(4) = 19 (1986) g(3) = 9 (1909) g(5) = 37 (1964) all are as Waring had asserted. Lower bounds for g(k) are easy. Theorem 4.2. For k ∈ N " # k 3 g(k) > 2k + −2 2 where square brackets denote integer part. Proof. This is an exercise (consider the integer); " # k 3 k −1 n=2 2 N.B. ⇒ g(2) > 4, g(3) > 9, g(4) > 19, g(5) > 37. These lower bounds turn out to be equalities. It’s conjectured that the lower bound of Theorem 4.2 is sharp (g(k) = lower bound). Concerning this, we have the following result; when k > 6 and if (4.1) k k 3 3 − 61− 2 2 1 2 !k ! k 3 +3 2 then " # k 3 k g(k) = 2 + −2 2 Mahler (1957) proved (4.1) for all k > k0 - no idea of size of k0 - the proof is ineffective. By computer (1990), (4.1) holds for 6 < k < 471600000 := k. Conclusion: We have " # k 3 −2 g(k) = 2k + 2 for k > k0 and k 6 k1 . If k0 < k1 we’d have a complete proof of conjecture. 12 PROF. SANJU VELANI 4.1. The Quantity G(K) g(k) = minimum s such that every n ∈ N can be expressed as the sum of s kth powers. Consider k = 3, it’s known that g(3) = 9 - every number is representable as the sum of 9 or fewer cubes and every number except; ) 23 = 2 × 23 + 7 × 13 Only these use 9 cubes 239 = 2 × 43 + 4 × 33 + 3 × 13 can be represented as eight cubes. In fact, sufficiently large numbers, can be represented by seven cubes or less; {n ∈ N : n > 455} requires seven or less cubes. Definition: Let G(k) be the least value of s for which all sufficiently large numbers; i.e. all numbers with at most a finite number of exceptions, are representable by s kth powers. In view of above, G(3) 6 7, it’s known that G(3) > 4 - see below - but it’s not known where G(3) = 4, 5, 6, 7. Exact value of G(k) is known in only two cases G(2) = g(2) = 4 as all numbers ≡ 7 (mod 8). Need four squares and G(4) = 16. Clearly G(k) 6 g(k). The next result provides a lower bound for G(k). Theorem 4.3. For k > 2 we have G(k) > k + 1. Proof. By contradiction. Let A(N) be the number of natural numbers n 6 N, which are of the form n = xk1 + . . . xkk > 0. (4.2) Without Loss of Generality, assume 1 (4.3) 0 6 x1 6 x2 6 · · · 6 xk 6 N k . Hence A(N) 6 number of solutions of the inequalities (4.3). This is less than, 1 [N ] k B(N) = Then P X xk =0 ··· x2 x3 X X x2 1. x1 P with respect to x1 gives x2 + 1 ( natural 6 x2 ) x3 X x2 =0 just keep going ... x2 + 1 = (x3 + 1)(x3 + 2) 2! NUMBER THEORY 13 x4 X (x4 + 1)(x4 + 2)(x4 + 3) (x3 + 1)(x3 + 2) = 2! 3! x =0 3 and going ... k N 1 Y h 1 i Nk +r ∼ B(N) = k! r=1 k! N large Now assume G(k) 6 k ⇒ all but a finite number of n ∈ N are representable in the form (4.2). Let E be this finite number of exceptions. For N large enough, A(N) = N − E Note. E is independent of N. Hence, Contradiction! as k > 1. N − E = A(N) 6 B(N) ∼ N . k! It follows that G(k) > k. 5. Tchebychef’s Theorem 5.1. Some Useful Notation Given two functions f and g: • such that f (x) =1 x→∞ g(x) we say that f is asymptotic to g and we write f (x) ∼ g(x). From Prime Number Theorem lim x log x • and f (x) ≪ g(x) (less than less than) means f (x) 6 Ag(x) for all x in question, where A is a positive constant independent of x. • and f (x) ≫ g(x) (greater than greater than) means f (x) > Ag(x) for all x in question, where A is a positive constant independent of x. • and g(x) ≪ f (x) ≪ g(x), then we write f (x) ≍ g(x) and we say that f is comparable to g. i.e. there exists positive constants a, b such that: π(x) ∼ ag(x) 6 f (x) 6 bg(x) for all x in question. 14 PROF. SANJU VELANI Recall: π(n) denotes the number of primes p 6 n and pn denotes the nth prime: π(pn ) = n. Tchebychef’s Theorem. For n > 2, π(n) ≍ n log n 5.2. The Von Mangoldt function Λ For n ∈ N, let: Λ(n) = ( log p if n = pk , k > 1, p prime. 0 otherwise This is key in the theory of prime numbers. n 1 2 3 4 5 6 7 8 9 10 Λ(n) 0 log 2 log 3 log 2 log 5 0 log 7 log 2 log 3 0 Λ is an arithmetic function that is not multiplicative. For n > 1, then log n = P log 2 − log 5 = Λ(2)Λ(5) 6= Λ(10) =0 d|n Λ(d) 5.3. The functions θ and ψ θ(x) = X log p = log p6x ψ(x) = X X p p6x Λ(n) the Tchebychef ψ function n6x = X log p pn 6x p prime Example 5.1. ψ(10) = 3 log 2 + 2 log 3 + log 5 + log 7 | {z } | {z } |{z} |{z} 2,22 ,23 3,32 5 7 If pm is the highest power of p not exceeding x, then log p ocurs m times in ψ(x). Also, since pm 6 x, log x m= log p and so NUMBER THEORY ψ(x) = X log x log p p6x 15 log p 1 1 Next p2 6 x, p3 6 x, ... are equivalent to p 6 x 2 , p 6 x 3 , ... Thus, 1 3 1 2 1 k ψ(x) = θ(x) + θ(x ) + θ(x ) + · · · + θ(x ) since if k > log x , log 2 1 1 log x , where k = log 2 then x k < 2 and θ(x k ) = 0. Clearly, θ(x) = X log p 6 x log x for x > 2. p6x So, and 1 1 1 1 θ x m 6 x m log x m < x 2 log x if m > 2 k X m=2 1 1 θ x m 6 kx 2 log x 1 6 x 2 (log x)2 , since k < log x log 2 Now we have proved; Theorem 5.1. For x > 2, 1 θ(x) 6 ψ(x) 6 θ(x) + x 2 (log x)2 We now prove the key statement: Theorem 5.2. For x > 2 then θ(x) ≍ ψ(x) ≍ x i.e. this says that θ(x) and ψ(x) are both of ‘order’ x. In view of Theorem 5.1, it’s enough to prove that for x > 2 that θ(x) ≪ x and ψ(x) ≫ x. So we obtain (by Theorem 5.1), 1 ψ(x) 6 Ax + x 2 (log x)2 6 Bx Now using ψ(x) ≫ x and again using Theorem 5.1 we obtain, 1 Cx 6 ψ(x) 6 θ(x) + x 2 (log x)2 16 PROF. SANJU VELANI 1 ⇒ θ(x) > Cx − x 2 (log x)2 > Dx upshot: Theorem 2 follows from the next Lemmas. Lemma 5.1. For n ∈ N, θ(n) < 2n log 2 Remark. Given that x > 2, let n = [x] 6 x. Then θ(x) = θ(n) < 2n log 2 < 2x log 2 i.e. θ(x) ≪ x as required. Lemma 5.2. For x > 2 1 ψ(x) > x log 2 4 Before proving the Lemmas, we give the proof of Tchebychef’s Theorem. Tchebychef’s Theorem returned Proof. In view of Theorem 5.2, there exists constants A, B > 0 such that for all x > 2 (5.1) Ax 6 θ(x) 6 Bx Step 1: (5.2) θ(x) := X p6x X 1 log p 6 log x p6x | {z } π(x) By Equation (5.1) we achieve π(x) > θ(x) x >A log x log x Step 2: For 0 < δ < 1. Then, θ(x) > X log p > (1 − δ) log x x1−δ <p6x X 1 x1−δ <p6x = (1 − δ) log x π(x) − π(x1−δ ) | {z } 6x1−δ > (1 − δ) log x π(x) − x1−δ Now equation (5.1) gives us, NUMBER THEORY ⇒ π(x) 6 Putting δ = 21 , 17 Bx + x1−δ (1 − δ) log x x log x π(x) 6 2B + 1 log x x2 we notice that the last term is a decreasing function because log x x 1 2 6 log 2 1 22 so this gives us π(x) 6 B ′ x log x So Tchebychef is a simple consequence of Theorem 5.2, in particular (5.1) above. Another consequence is: Theorem 5.3. There is a constant K > 1 such that for every x > 1 there is a prime p such that x < p 6 Kx Proof. Exercise. Make use of equation (5.1). With little more work we can prove: Theorem 5.4 (Bertrand’s postulate). If x > 1 then there exists a prime p such that, x < p 6 2x (i.e. we can take K = 2 in Theorem 5.3) Remark. It follows, that - a vast improvement on pn+1 pn+1 6 2pn (Exercise) n 6 pn + 1 in Chapter 1 via Euclid’s proof! Return to proofs of Lemmas 5.1 and 5.2 First some useful facts; FACT 1: For m, n ∈ Z+ , the binomial coefficients m! m m(m − 1) . . . (m − (n − 1)) = = n n!(m − n)! n! is an integer. This however is a consequence of a more general fact: The product of n successive positive integers is divisible by n! (Exercise) 18 PROF. SANJU VELANI FACT 2: We have that n! = Y p j(n,p) p where j(n, p) = Proof. (Lemma 3) Let P m>1 S= h n pm i (2m + 1)! (2m + 1)(2m) . . . (m + 2) = m!(m + 1)! m! Now, 2m + 1 2m + 1 = S= m+1 m FACT 1 ⇒ S is an integer. Also it occurs twice in the binomial expansion of (1 + 1)2m+1 because 2m + 1 is odd. So 2S < 22m+1 ⇒ S < 22m . N.B. (a + b) 2m+1 = 2m+1 X n=0 2m + 1 (2m+1)−n n a b n If we have a prime p such that m + 1 < p < 2m + 1, then p divides the numerator but not the denominator of S. Hence, ! Y π= p S m+1<p<2m+1 Aside: To see this, we have that πY with Y ∈ N. m! = A ∈ N since m! doesn’t divide π, i.e. S = Aπ. S= Now S ∈ N, so Y m! Hence, θ(2m + 1) − θ(m + 1) = (∗) Since S = Aπ we get X log p m+1<p62m+1 6 log S < 2m log 2 NUMBER THEORY 19 log S = log π + log A X = log p + log A i.e. we obtain the equation X log p = log S − log A 6 log S m+1<p<2m+1 The Lemma is trivial for n = 1 and n = 2. This is because θ(1) = 0 < 2 log 2 θ(2) = log 2 < 4 log 2. Now suppose it’s true for all n 6 n0 − 1. If n0 is even then, θ(n0 ) = θ(n0 − 1) because 2 is the only even prime. < 2(n0 − 1) log 2 < 2n0 log 2 by induction hypothesis If n0 is odd, say n0 = 2m + 1. Then, θ(n0 ) = θ(2m + 1) = θ(2m + 1) − θ(m + 1) + θ(m + 1) | {z } (∗) note m + 1 6 n0 − 1 < 2m log 2 + 2(m + 1) log 2 i.e. we have, θ(n0 ) < 2m log 2 + 2(m + 1) log 2 = 2(2m + 1) log 2 = 2n0 log 2 statement true for n = n0 therefore for all n > 1 by induction. Lemma 4. Let, T = By FACT 2, Y (2n)! = pk p 2 (n!) p62n FACT 1 ⇒ (2n)! is an integer. 20 PROF. SANJU VELANI (1) kp = by definition α − 1 < [α] 6 α. So, ∞ X 2n pm m=1 | n −2 m p {z } EITHER 0 or 1 1 1 0 6 [α] − 2 α < α − 2 α−1 = 2 2 2 because [X] + [Y ] 6 [X + Y ] ⇒ 2 21 α 6 [α]. Moreover, 2n n −2 m =0 if pm > 2n. m p p 2n . Hence, i.e. if m > log log p kp 6 2n [ log log p ] X m=1 log 2n 6 log p (2) and log T = log Y n 2n −2 m m p p pk p = p62n 6 X log 2n p62n log p X kp log p p62n log p = ψ(2n) (2n)! n+1n+2 2n = ... > 2n 2 (n!) 1 2 n 1 and so ψ(2n) > log T > n log 2. For x > 2, put n = 2 x > 1, then T = ψ(x) > ψ(2n) using that ψ is a non-decreasing function n 6 12 x ⇒ ψ(x) > ψ(2n). 1 ψ(x) > ψ(2n) > n log 2 > x log 2. 4 We get the last set of inequalities because n > 21 x − 1 > 41 x for all x > 4. If 2 6 x < 4, then 1 1 16 x<2⇒n= x =1 2 2 NUMBER THEORY 21 From the inequality above, first dividing through by log 2 we obtain, 1 x<1=n 4 6. Cryptography It is the science of making communications unintelligible to all except authorized parties. In the language of cryptography where codes are called ciphers the basic process is: (1) You start with a message (plain text). (2) Now you want to code it to get a coded message (cipher text). You do this via encoding (enciphering). (3) You want to get back from the coded message to the message and you do this via the procedure of decoding (deciphering). Earliest cryptographic system dates back to Julius Caesar 50BC. 6.1. Caesar Cipher This is a basic substitution cipher in which each letter of the alphabet is replaced by the letter which occurs 3 places down the alphabet with the last 3 letters cycled back to the first three. A B C D . . . W X Y Z (Plain Text) D E F G . . . Z A B C (Cipher Text) For example C A E S A R (Message) (1) F D H V D U (Coded Message) (2) easily described using congruence theory. Any message is first expressed numerically by means of a digital alphabet, e.g. A=01, B=02, C=03, ..., X=24, Y=25, Z=26. If P is the digital equivalent of a message letter and C is the digital equivalent to the corresponding coded message letter, then (6.1) C ≡ P + 3 (mod 26) For example: The letters in (1) - CAESAR are converted to their digital equivalents; 03 01 05 19 01 18. Now using (6.1), this becomes the ‘digital’ ciphertext 06 04 08 22 04 21 To ‘recover’ the digital plain text the procedure is reversed by means of the congruence. P ≡C −3 (mod 26) extremely insecure! Before describing a ‘secure’ system we recall a few basic facts 22 PROF. SANJU VELANI 6.2. The Euler ϕ-function Definition: For any m ∈ N, ϕ(m) denotes the number of integers a with 1 6 a 6 m and hcf(a, m) = 1. FACT 1: ϕ(n) = n − 1 iff n is prime. FACT 2: Assume that hcf(m, n) = 1 then ϕ(mn) = ϕ(m) · ϕ(n). i.e. ϕ is multiplicative - it follows that if n = pk11 . . . pkr r > 1 then ϕ(n) = n r Y i=1 1 1− pi FACT 3: (Euler’s Theorem) If n ∈ N and hcf(a, n) = 1 then, aϕ(n) ≡ 1 (mod n) FACT 4: Given integers a, b and n, an equation of the form (6.2) ax ≡ b (mod n) is called a linear congruence. By a solution we mean an integer x0 for which ax0 ≡ b (mod n). Then (6.2) has a solution iff d|b where d = hcf(a.n)’ then (6.2) has d mutually incongruent solutions mod n: n n n , x0 + 2 , . . . , x0 + (d − 1) d d d k k FACT 5: If a ≡ b (mod n) then a ≡ b (mod n) for any k ∈ N FACT 6: If a ≡ b (mod p) and a ≡ b (mod q) with hcf(p, q) = 1 then we will have a ≡ b (mod pq). In conventional systems, the sender and receiver jointly have a secret key. The sender uses the key to encode the message to be sent, while the receiver uses the same key to decode the coded message to get back to the original message. x0 , x0 + public-key: Cryptography uses two keys, an encoding key and a decoding key and the process has the following properties (1) The method of encoding (i.e. the encoding key) can be published (i.e. made public). (2) The coded message can be published. (3) In spite of (1) and (2), ‘unauthorised persons’ cannot in practise decode the coded message. the only thing unpublished, except to the receiver, is the decoding key! The most famous public key cryptosystem is the so called RSA code( due to Rivest, Shamir and Adleman (1977)) which we shall now describe. NUMBER THEORY 23 6.3. The RSA code (i) Choose a pair (p, q) of large distinct primes (sat 100 digits in each) and let n = pq (roughly 200 digits), then n is called the “encoding modulus”. (ii) Choose a random positive integer k, the “encoding exponent” satisfying hcf k, ϕ(n) = 1. For example choose k to be another large prime. The pair (n, k) is the “encoding key” - also called the “public key”. (iii) The encoding process begins by transforming the message into an integer M by means of a digital alphabet. The standard procedure is to let, A=01, B=02, ..., Z=26 with 00 indicating a space between words (e.g. ‘The Cat’ becomes 20080500030120). M is called the “message number ” and we assume that M < n. If necessary, split M into blocks of digits M1 , M2 . . . , Mr all < n and encode each pair seperately as follows. (iv) Use the encoding key (n, k) to transform the message number M to a coded message (number) r satisfying Mk ≡ r (mod n). Now send the coded number r, notice to send a message the sender only needs to know the encoding key (n, k). (v) The authorized recipient (who knows the prime factors of n) decodes the coded number r by first determining the integer j for which (6.3) kj ≡ 1 (mod ϕ(n)) j is called the “recovery exponent” and is secret!! Since hcf k, ϕ(n) = 1, then (6.3) has a unique solution modulo ϕ(n). In fact j, may be obtained directly from, j ≡ k ϕ(ϕ(n))−1 (mod ϕ(n)). So the recovery exponent can be determined as long as both k and ϕ(n) = (p − 1)(q − 1) are known - in particular the prime factors, p and q, of n. (vi) Finally use the recovery exponent to retrieve M from r by calculating r j modulo n. From (6.3), kj = 1 + ϕ(n)t for some t ∈ N. Thus rj ≡ M k j ≡ M 1+ϕ(n)t (mod n) (mod n) t ≡ M M ϕ(n) (mod n) 24 PROF. SANJU VELANI using Euler’s Theorem we obtain, ≡ M.1t ≡M (mod n) (mod n) assuming hcf(M, n) = 1. So the authorised person can determine j, can decode r to obtain M from which the written message is easily obtained via the digital alphabet. The assumption hcf(M, n) = 1 can be dropped for in the case hcf(M, n) > 1, a similar argument establishes that r j ≡ M (mod p) and r j ≡ M (mod q) from which we deduce that r j ≡ M (mod n = pq). See the exercise sheet for this. The major advantage of the RSA code is that the encoding of the message does not require the prime factors p and q of n, which are critical to the decoding process. Question: Is the RSA code ‘safe’ ? The encoding key (n, k) is in ‘public domain’. The coded message / number r can be decoded if the prime factors p and q of n can be found. Our confidence is the RSA code rests on the ‘work factor’ - the expected amount of computer time needed to factor the product of 2 large primes. It has been estimated that the quickest factorising algorithm known can use approximately (1.2) × 1023 computer operations to find the prime factors of an integer with 200 digits; so assuming each operation takes 10−6 secs, then the process takes approximately (3.8) × 109 years - so the RSA code is quite safe. Notice, √ that one method of finding the factors of n = pq is to try all the numbers up to n and see which divide n. If p and q are 100 digits this involves testing 10100 numbers, which is not practical!! Question: Is the RSA system practical given a computer? (i) Given M can we calculate M k modulo n when k is large; i.e. can we convert the number M to the coded message number r? Yes! We use only, approximately, log K calculations!! For example, to find M 1000 calculate M 2 , M 4 , M 8 , . . . modulo n and combine. (ii) Given k can we find j (the recovery exponent) with kj ≡ 1 (mod N) where N = (p − 1)(q − 1) is enormous? The standard method to solve a linear congruence is to use Euclid’s Algorithm - this will use approximately log N steps - so the answer is again yes! Example 6.1 (RSA Code). • Select two ‘large’ primes p = 29 and q = 53, Then n = pq = 1537 (encoding modulus). Also ϕ(n) = (p − 1)(q − 1) = 28 × 52 = 1456. • Now hcf(47, 1456) = 1 (see below) so we can take k = 47 as our encoding exponent. (1537, 47) n k NUMBER THEORY 25 is the public key. Note: 1456 = ϕ(n) is not in the public key. • Any authorized recipient knows the prime factors of n = 1537 and hence knows ϕ(n) = 1456. They are therefore able to obtain the ‘recovery exponent’ - the unique integer j satisfying (6.4) 47j ≡ 1 (mod 1456) ϕ(n) k (6.4) is equivalent to solving the linear equation 47x − 1456y = 1 which we can solve using Euclid’s algorithm. So, 1456 = 30 × 47 + 46 47 = 1 × 46 + 1 N.B: 1 = hcf(1456, 47) so we get, Hence this gives us that, 46 = 46 × 1 1 = 47 − 1 × 46 = 47 − (1456 − 30 × 47) = 31 × 47 − 1456 Hence, with reference to (6.4), j = 31 - the recovery exponent. • Suppose we want to send the message, ‘No Way’. First obtain the message number M using the digital alphabet. This gives us, M = 14 15 00 23 01 25 N o space W a y We need M < n = 1537, so split up M into blocks of 3 digits - all blocks will certainly be < n, which has 4 digits. Consider the first block 141. To obtain the coded message number r - we need to calculate (141)47 (mod 1537); i.e. r satisfies (141)47 ≡ r Mk ≡ r (mod 1537) (mod n) . A tedious, but nevertheless straight forward calculation - in which we first calculate (141)2, (141)4, (141)8 , (141)16 , (141)32 (mod 1537) and then combine - this yields that, 26 PROF. SANJU VELANI (141)47 ≡ 658 (mod 1537). So 658 is the first part of the coded message. The total coded message becomes 658 1408 1250 1252 • The authorized recipient knowing the recover exponent j = 31 can now decode the coded message; for the first block 658, need to calculate (658)31 (mod 1537) - a calculation gives that, (658)31 ≡ 141 (mod 1537) and get the written message back via the digital alphabet. 7. Irrationality So far we’ve studied only integers (Z) and in particular natural numbers (N). We now examine various properties of real numbers (R). Definition: A real number is rational if it can be written in the form and b 6= 0. (Unless stated otherwise we assume b > 0) a b where a, b ∈ Z Definition: A real number which isn’t rational is said to be irrational. 7.1. Naturally occurring Irrationals It’s of interest to know whether or not naturally occurring real numbers are rational or √ not: e.g. 2, e, π, e + π, etc. √ Theorem 7.1. 2 is irrational. Proof. Assume √ a b where hcf(a, b) = 1. Since hcf(a, b) = 1, there exists x, y ∈ Z such that ⇒ impossible since 1 < √ √ 2= 1 = ax + by √ √ 2 = 2ax + 2by = 2bx + ay ∈ Z 2 < 2. Theorem 7.2 (Lambert 1761). e is irrational. NUMBER THEORY 27 Proof. We know, ex = 1 + So, this gives us x x2 xn + +···+ + ... 1! 2! n! ∞ X 1 e= r! r=0 = n ∞ X X 1 1 + r! r=n+1 r! r=0 | {z } Rn note the convention 0! = 1, 1! = 1 and we have n > 1. So examing Rn we get, 1 1 + + ... (n + 1)! (n + 2)! 1 1 1 = + + ... n! n + 1 (n + 1)(n + 2) 1 1 1 1 < + + + ... . n! n + 1 (n + 1)2 (n + 1)3 However the term in the brackets is a geometric series so we can use the fact, Rn = ∞ X m=1 Now putting x = 1 n+1 xm = x 1−x if |x| < 1. in the above formula and returning to Rn we obtain, Rn = 1 1 . n! n Thus, 1 61 n because n > 1. So, n!Rn ∈ 6 N. If e = ab , choose n > b then 0 < Rn n! < a n!e = n(n − 1) . . . 1 b because 1 6 b 6 n − 1. The Upshot of this is, ∈N n ∞ X X 1 1 . n!e = + |{z} r! r=n+1 r! r=0 ∈N | {z } | {z } ∈N 6∈N 28 PROF. SANJU VELANI However this is a contradiction! Lambert (1761) showed that π is irrational - see Hardy & Wright, page 47, Theorem 49. √ √ π 2 e e 2 Recently its been shown that e , eπ, 2 are irrational. Not known if 2 , π , π are irrational. 7.2. Big open problems Problem 1: that Euler’s constant γ is irrational. By integrating, easy to PnTo show 1 see that k−1 k behaves like log n. Infact, ! n X lim − log n = γ n→∞ k−1 Problem 2: Let n > 2 be an integer. To show that ζ(n) is irrtional for n odd. ζ(n) := ∞ X 1 kn k=1 the Riemann Zeta function at integer values Note: ζ(n) < ∞ for n > 2 What’s known: In the case n is even, it’s possible to obtain a precise expression for ζ(n) involving powers of π and ‘Bernoulli’ numbers ⇒ ζ(n) is irrational π2 ζ(2) = 6 In the case n is odd : • ζ(3) is irrational (Apry 1979). • Out of ζ(5), ζ(7), ζ(9) and ζ(11) one is at least irrational (Zudlin 2002) • ζ(n) is irrational for infinitely many off values of n (Rivoal, 2001) 7.3. Diophantine Approximation This is the study of approximation of irrationals by rationals, for example 22 333 or 7 106 The rationals Q are dense in R, thus given any x ∈ R, ǫ > 0 there exists a rational that p x − < ǫ. q But how simply or rapidly can we approximate to x?? i.e. (i) Given x ∈ R and q ∈ N, how small can the measure of accuracy ǫ be?? π∼ p q such NUMBER THEORY 29 (ii) How closely can a given x ∈ R be approximated by a rational no larger than some positive integer N?? These problems are related - namely by Dirichlet’s theorem. p q with denominator Recall: (The Pigeon Hole Principle) If n objects are placed in m boxes and if n > m then some box will contain at least two objects. Theorem 7.3 (Dirichlet, 1842). For any real number x and N ∈ N, there exists p, q ∈ Z with 1 6 q 6 N such that p x − < 1 q qN Notation: Given x ∈ R, let [x] denote the integer part of x and {x} = x − [x] denote the fractional part of x. For example, x=2 [2] = 2 x = 2.137 [x] = 2 {2} = 0 {x} = 0.137 Proof. Consider the N + 1 numbers (7.1) 0, {x}, {2x}, . . . , {Nx} these define N + 1 points in [0, 1). Divide [0, 1) into N equal pieces u+1 u 6x< (u = 0, . . . , N − 1). N N So the Pigeon hole principle implies that there exists one interval with at least two of the N + 1 numbers from (7.1); i.e. there exists n1 , n2 with 0 6 n1 < n2 6 N and (7.2) |{n2 x} − {n1 x}| < 1 N Now, • n1 x = m1 + {n1 x} where m1 = [n1 x] ∈ Z • n2 x = m2 + {n2 x} where m2 = [n2 x] ∈ Z Now, returning to (7.2) we get: |{n2 x} − {n1 x}| = |n2 x − m2 − (n1 x − m1 )| = |x(n2 − n1 ) − (m2 − m1 )| define q = n2 − n1 , where we have 0 < q 6 N, and p = m2 − m1 . The upshot of this is, 30 PROF. SANJU VELANI An important consequence of this. 1 |xq − p| < N p 1 i.e. x − < q qN Theorem 7.4. Let x ∈ R. Then there exists infinitely many positive integers q such that (7.3) x − p 1 < 2 q q for some integer p with hcf(p, q) = 1 iff x is irrational. Remark. Theorem 7.4 gives a criterion for determining whether x is rational or irrational. Corollary 7.1. Let x be irrational. Then there exists infinitely many reduced rationals (q > 0) such that (7.3) holds. p q Proof. (Theorem 7.4) Clearly Theorem 7.3 is invalid with hcf(p, q) = 1 (do it!!). • Suppose x = ab (6= pq ). Then a p |aq − bp| 1 p x − − − = > q b q bq bq the last inequality holds because aq 6= bp. Thus, q < b for 1 1 p 6 x − < 2 bq q q i.e. for (7.3) to hold. But there exists only a finite number of q < b, so there are only a finite number of relatively prime solutions to (7.3) if x is rational. • Suppose x is irrational and that there are only finitely many relatively prime rationals pn p1 p2 , ,..., q1 q2 qn satisfying (7.3). Since x is irrational, there exists N ∈ N such that p i x − > 1 for all 1 6 i 6 n. qi N Theorem 7.3 ⇒ there exists a reduced pq such that p x − < 1 6 1 (1 6 q 6 N) q qN N whence, pq 6= pqii for any i but satisfies (7.3) - a contradiction. NUMBER THEORY 31 Dirichlet’s Theorem, in particular Theorem 7.4, says that given any irrational x we can find an infinite sequence of ‘good’ rationals, say pqnn , which approximate x with a degree of accuracy of at least q12 !! n Question: Is there a ‘natural’ way to find these ‘good’ rational approximates? 7.4. The Continued Fraction Algorithm An infinite simple continued fraction is an expression of the following form (7.4) 1 a0 + 1 a1 + 1 a3 + . . . where a0 , a1 , a2 , . . . is an infinite sequence of integers, all positive except possibly a0 ; i.e. a0 ∈ Z, ai > 1 (i > 1) a2 + Remark. (1) We write [a0 ; a1 , a2 , a3 , . . . ] for (7.4) (2) We’ll only consider simple continued fractions and so we will omit the term simple. (3) If (7.4) terminates; i.e. we have an expression of the form 1 [a0 , a1 , . . . , an ] = a0 + 1 an then its said to be a finite (simple) continued fraction and is clearly a rational. a1 + · · · + Now let x0 be irrational. Then x0 has a unique representation as an infinite continued fraction; i.e. given x0 there exists a unique sequence of integers a0 , a1 , a2 , . . . (called the partial quotients of x0 ) such that x0 = [a0 ; a1 , a2 , . . . ]. To find the partial quotients of x0 we use the continued fraction algorithm: • We first let 1 1 1 x2 := x3 := ... x0 − [x0 ] x1 − [x1 ] x2 − [x2 ] and then take a0 = [x0 ], a1 = [x1 ], a2 = [x2 ], . . . In general the ak are given inductively by x1 := (7.5) ak = [xk ] xk+1 = 1 xk − ak k>0 32 PROF. SANJU VELANI Note. that xk+1 is irrational whenever xk is irrational and since x0 is irrational all xk are irrational. Thus 0 < xk − ak = xk − [xk ] < 1 1 >1 xk+1 = xk − ak ak+1 = [xk+1 ] > 1 for all k > 0 ⇒ ⇒ • On rewriting (7.5) in the form xk = ak + 1 (k > 0) xk+1 we obtain by successive substitution x0 = a0 + 1 x1 1 = a0 + 1 a1 + a2 + 1 a3 + . . . i.e. the infinite continued fraction expansion of irrational x0 . Example 7.1. x0 = √ 5+1 2 - the Golden ratio (≈ 1.618). √ √ 5+1 5−1 x0 = =1+ √2 √2 5+1 5−1 2 1 = =√ =1+ x1 = x0 − a0 2 2 5−1 a1 = [x1 ] = 1 Now notice that x1 = x0 (a1 = a0 ) so in general Example 7.2. x0 = xn+1 = xn (n > 0) i.e. an+1 = an (n > 0) √ 23 ≈ 4.8 NUMBER THEORY x0 = x1 = x2 = x3 = x4 = x5 = then we get √ √ 23 = 4 + ( 23 − 4) 1 1 =√ x0 − a0 23 − 4 7 1 =√ x1 − a1 23 − 3 1 2 =√ x2 − a2 23 − 3 7 1 =√ x3 − a3 23 − 4 1 1 =√ x4 − a4 23 − 4 = = √ √ √ 23 + 4 =1+ 7 23 + 3 =3+ 2 √ √ √ a0 = 4 23 − 3 7 a1 = 1 23 − 3 2 a2 = 3 23 − 4 7 √ √ = 23 + 4 = 8 + ( 23 − 4) = 23 + 3 =1+ 7 33 a3 = 1 a4 = 8 = x1 = x2 = x3 = x4 = x5 = x1 x6 x7 x8 x9 .. . and so on, i.e. the block of integers 1, 3, 1, 8 repeats indefinitely. √ √ 23 are quadratic irrationals, i.e. roots of an integer polyand Both the irrationals 5+1 2 nomial of degree 2 f (x) = ax2 + bx + c (a, b, c ∈ Z, a 6= 0) Note both these irrationals have ‘repeating’ or ‘periodic’ continued fraction expressions. Definition: If an infinite continued fraction contains a block b1 , b2 , . . . , bn which repeats indefinitely the continued fraction is called periodic. We write a periodic continued fraction [a0 , a1 , . . . , am , b1 , . . . , bn , b1 , . . . , bn , . . . ] more compactly as For example, √ 5+1 2 = [1̄] and √ a0 , a1 , . . . , am , b1 , . . . , bn 23 = 4; 1, 3, 1, 8 . A wonderful result: Theorem 7.5. The continued fraction of irrational x is periodic iff x is a quadratic irrational. 34 PROF. SANJU VELANI • Consider the infinite continued fraction of irrational x x = [a0 ; a1 , a2 , . . . ] • Lets consider the rational number obtained by ‘cutting’ or ‘terminating’ the continued fraction of x at an , i.e.; pn = [a0 ; a1 , . . . , an ] (n > 0). qn This is called the nth convergent of x and the numerator pn and denominator qn satisfy: p0 = a0 p1 = a1 a0 + 1 q0 = 1 q1 = a1 pn = an pn1 + pn−2 qn = an qn−1 + qn−2 • The convergents (7.6) pn qn (n > 2) (n = 0, 1, 2, . . . ) satisfy the crucial inequality x − pn 6 1 qn qn2 - they approximate x with a degree of accuracy given in Theorem 7.4 • For the sake of completeness, we mention that the convergents are ‘best’ approximates; i.e. if we consider any rational pq with q < qn then p p n x − > x − . q qn Example 7.3. Use the continued fraction algorithm on π = 3.141592653 . . . x0 = π = 3 + (π − 3) 1 1 x1 = = = 7.062 . . . x0 − [x0 ] 0.141 . . . 1 1 x2 = = = 15.996 . . . x1 − [x1 ] 0.0625 . . . 1 1 = = 1.003 . . . x3 = x2 − [x2 ] 0.99659 . . . 1 1 x4 = = = 292.63 . . . x3 − [x3 ] 0.00341 . . . a0 = 3 a1 = 7 a2 = 15 a3 = 1 a4 = 292 i.e. π = [3, 7, 15, 1, 292, . . . ]. There is no ‘obvious’ pattern which given the complete sequence of partial quotients an . NUMBER THEORY 35 • Given a0 , a1 , . . . , a4 it’s easy to determine the first 5 convergents of π; namely p0 , . . . , pq44 (simply use (7.5)) q0 3 22 333 355 103993 , , , , . 1 7 106 113 33102 In view of (7.6) we have that π − 22 6 1 = 1 7 72 49 - in particular 1 103993 < π − = 0.000000000912 . . . 33102 (33102)2