Farey Fractions
Total Page:16
File Type:pdf, Size:1020Kb
U.U.D.M. Project Report 2017:24 Farey Fractions Rickard Fernström Examensarbete i matematik, 15 hp Handledare: Andreas Strömbergsson Examinator: Jörgen Östensson Juni 2017 Department of Mathematics Uppsala University Farey Fractions Uppsala University Rickard Fernstr¨om June 22, 2017 1 1 Introduction The Farey sequence of order n is the sequence of all reduced fractions be- tween 0 and 1 with denominator less than or equal to n, arranged in order of increasing size. The properties of this sequence have been thoroughly in- vestigated over the years, out of intrinsic interest. The Farey sequences also play an important role in various more advanced parts of number theory. In the present treatise we give a detailed development of the theory of Farey fractions, following the presentation in Chapter 6.1-2 of the book MNZ = I. Niven, H. S. Zuckerman, H. L. Montgomery, "An Introduction to the Theory of Numbers", fifth edition, John Wiley & Sons, Inc., 1991, but filling in many more details of the proofs. Note that the definition of "Farey sequence" and "Farey fraction" which we give below is apriori different from the one given above; however in Corollary 7 we will see that the two definitions are in fact equivalent. 2 Farey Fractions and Farey Sequences We will assume that a fraction is the quotient of two integers, where the denominator is positive (every rational number can be written in this way). A reduced fraction is a fraction where the greatest common divisor of the 3:5 7 numerator and denominator is 1. E.g. is not a fraction, but is both 4 8 a fraction and a reduced fraction (even though we would normally say that 3:5 7 −1 0 = ). Also and are not fractions, since their denominators are 4 8 −2 −1 negative. We will construct a table in the following way, where the fractions in each row of the table are in the specified order. The 1st row only contains the 0 1 fractions and . If the nth row has been constructed, then the (n + 1)st 1 1 row is constructed by copying the nth row and then for each pair of consec- a a0 utive fractions and that exist in the nth row that satisfy b + b0 ≤ n + 1, b b0 2 a + a0 a a0 the fraction is inserted in the (n + 1)st row between and . For ex- b + b0 b b0 ample, the 2nd row is constructed by copying the 1st row and then inserting 0 + 1 1 0 1 0 1 1 = between and , so that the 2nd row is , , . When con- 1 + 1 2 1 1 1 2 1 0 + 1 1 0 1 1 + 1 2 structing the 3rd row, = is inserted between and and = 1 + 2 3 1 2 2 + 1 3 1 1 0 1 1 2 1 is inserted between and , so that the 3rd row becomes , , , , . 2 1 1 3 2 3 1 0 + 1 1 0 1 When constructing the 4th row, = is inserted between and 1 + 3 4 1 3 2 + 1 3 2 1 1 + 1 2 and = is inserted between and , but = is not inserted 3 + 1 4 3 1 3 + 2 5 1 1 1 + 2 3 1 between and because 5 6≤ 4 and = is not inserted between 3 2 2 + 3 5 2 2 0 1 1 1 2 3 1 and because 5 6≤ 4. So the 4th row is , , , , , , . The first six 3 1 4 3 2 3 4 1 rows in the table are: 0 1 1 1 0 1 1 1 2 1 0 1 1 2 1 1 3 2 3 1 0 1 1 1 2 3 1 . 1 4 3 2 3 4 1 0 1 1 1 2 1 3 2 3 4 1 1 5 4 3 5 2 5 3 4 5 1 0 1 1 1 1 2 1 3 2 3 4 5 1 1 6 5 4 3 5 2 5 3 4 5 6 1 Definition 1 (Farey sequence). The sequence of fractions in the nth row in the above table is called the Farey sequence of order n. Definition 2 (Farey fraction of order n). A Farey fraction of order n is a fraction in the Farey sequence of order n. 3 Definition 3 (Farey fraction). A Farey fraction is a Farey fraction of some order, i.e. a fraction in the Farey table. a a0 Theorem 1 (Theorem 6.1 and Corollary 6.3 in MNZ). If and are b b0 a a0 consecutive fractions in the nth row with to the left of , then a0b−ab0 = 1. b b0 The fractions in the nth row are also listed in order of their size (in strictly ascending order). Proof. Base case (n = 1): 1 · 1 − 0 · 1 = 1 and the fractions in the first row are clearly listed in order of their size (in strictly ascending order). a a0 Induction hypothesis: Assume for some n 2 that if and are fractions N>0 b b0 a a0 in the nth row with to the left of , then a0b − ab0 = 1. Also assume the b b0 fractions in the nth row are listed in order of their size (in strictly ascending order). Induction step: We want to show that the fractions in the (n + 1)st row are listed in order of their size (in strictly ascending order). We know that the (n + 1)st row is constructed by copying the nth row and then for each pair of consecutive fractions in the nth row, insert 1 or 0 fractions between those fractions and we also know by the induction hypothesis that the fractions in the nth row are listed in order of their size (in strictly ascending order). So p r it's sufficient to show that for each pair of consecutive fractions , in the q s p p p + r r p r nth row with to the left, < < . So let and be consecutive q q q + s s q s p fractions in the nth row with to the left. Then q p p + r p(q + s) q(p + r) < () < q q + s q(q + s) q(q + s) () p(q + s) < q(p + r) () rq − ps > 0: But the last inequality holds because it follows from the induction hypoth- p p + r esis that rq − ps = 1. Hence < . Similarly it can be shown that q q + s 4 p + r r < . So the fractions in the (n + 1)st row are listed in order of their q + s s size (in strictly ascending order) and from that it follows that no fraction can appear twice in the (n + 1)st row. a a0 a Let and be 2 consecutive fractions in the (n + 1)st row with to b b0 b a0 the left of . We want to show that a0b − ab0 = 1. If they are also con- b0 a secutive fractions in the nth row with to the left, then it follows from the b induction hypothesis that a0b − ab0 = 1. So assume they are not consecutive a fractions in the nth row with to the left. b a a0 We want to show it can't be the case that both and exist in the nth b b0 a a0 row. Assume for contradiction that both and exist in the nth row. If b b0 they are not consecutive fractions in the nth row, then there is some frac- p tion in the nth row somewhere between them, say . But because of how q p a a0 rows are constructed, must be between and in the (n + 1)st row, q b b0 a a0 which contradicts and being consecutive fractions in the (n + 1)st row. b b0 a a0 Assume instead for contradiction that and are consecutive fractions in b b0 a0 the nth row, but with to the left. Either no fraction was added between b0 a a0 them when constructing the (n + 1)st row, in which case and will be b b0 a0 consecutive fractions in the (n + 1)st row, but with to the left. This leads b0 a a0 to a contradiction. If instead a fraction was added between and when b b0 a a0 constructing the (n + 1)st row, then and are not even consecutive frac- b b0 tions in the (n + 1)st row, which is a contradiction. So it can't be the case a a0 that both and exist in the nth row when they are consecutive fractions b b0 a in the (n + 1)st row with to the left and they are not consecutive fractions b 5 a in the nth row with to the left. b a We want to show that it can't be the case that neither of the fractions and b a0 exist in the nth row. Assume or contradiction that neither of the fractions b0 a a0 and exist in the nth row. Since they exist in the (n + 1)st row, it must b b0 be the case that they were both inserted between fractions in the nth row. But because at most 1 fraction is inserted between each pair of consecutive fractions, they must have been inserted between distinct pairs of fractions in a the nth row. But then it's clear that some fraction must exist between and b a0 in the (n + 1)st row, which contradicts them being consecutive fractions b0 a in the (n + 1)st row.