Farey Sequences: Duality and Maps Between Subsequences 9783110547665, 9783110546620

As a first comprehensive overview on Farey sequences and subsequences, this monograph is intended as a reference for any

192 100 2MB

English Pages 182 Year 2017

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Preface
Contents
List of Tables
Farey sequences and collective decision making
1. Basic properties of Farey sequences
2. Farey duality
3. Monotone maps between Farey subsequences
Bibliography
List of notation
Index
Recommend Papers

Farey Sequences: Duality and Maps Between Subsequences
 9783110547665, 9783110546620

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Andrey O. Matveev Farey Sequences

Also of interest

Pattern Recognition on Oriented Matroids Andrey O. Matveev, 2017 ISBN 978-3-11-053071-1, e-ISBN (PDF) 978-3-11-053114-5, e-ISBN (EPUB) 978-3-11-053084-1

Graphs for Pattern Recognition. Infeasible Systems of Linear Inequalities Damir Gainanov, 2016 ISBN 978-3-11-048013-9, e-ISBN (PDF) 978-3-11-048106-8, e-ISBN (EPUB) 978-3-11-048030-6

Compressive Sensing. Applications to Sensor Systems and Image Processing Joachim Ender, 2017 ISBN 978-3-11-033531-6, e-ISBN (PDF) 978-3-11-033539-2, e-ISBN (EBUB) 978-3-11-039027-8

Regular Graphs. A Spectral Approach Zoran Stanic, 2017 ISBN 978-3-11-035128-6, e-ISBN (PDF) 978-3-11-035134-7, e-ISBN (EBUB) 978-3-11-038336-2

Discrete Algebraic Methods. Arithmetic, Cryptography, Automata and Groups Volker Diekert, Manfred Kufleitner, Gerhard Rosenberger, Ulrich Hertrampf, 2016 ISBN 978-3-11-041332-8, e-ISBN (PDF) 978-3-11-041333-5, e-ISBN (EBUB) 978-3-11-041632-9

Andrey O. Matveev

Farey Sequences

| Duality and Maps Between Subsequences

Mathematics Subject Classification 2010 Primary: 11B57; secondary: 05-01, 11-01 Author Dr. Andrey O. Matveev Ekaterinburg Russia [email protected]

ISBN 978-3-11-054662-0 e-ISBN (PDF) 978-3-11-054766-5 e-ISBN (EPUB) 978-3-11-054665-1 Set-ISBN 978-3-11-054767-2 Library of Congress Cataloging-in-Publication Data A CIP catalog record for this book has been applied for at the Library of Congress. Bibliographic information published by the Deutsche Nationalbibliothek The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available on the Internet at http://dnb.dnb.de. © 2017 Walter de Gruyter GmbH, Berlin/Boston Cover image: A Perspective on Farey Duality, 2017, by Andrey L. Kopyrin, Ekaterinburg, Russia Typesetting: Dimler & Albroscheit, Müncheberg Printing and binding: CPI books GmbH, Leck ♾ Printed on acid-free paper Printed in Germany www.degruyter.com

| To the memory of my mother Irina M. Matveeva 1934–2014

To my father Oleg S. Matveev

Preface The Farey sequence Fn of order n is defined to be the increasing sequence of irreducible fractions hk such that 01 ≤ hk ≤ 11 and k ≤ n. It is one of the most attractive and popular constructs in number theory. This book is about the standard sequences Fn and their fundamental Farey subsequences of a number-theoretic and combinatorial nature. We discuss in detail basic components of these sequences and related topics such as pairs and triples of consecutive fractions, the number of fractions, and the position of a fraction in the sequences. A finite n-set with its distinguished proper m-subset is the source of a sequence of fractions, of a combinatorial nature, whose half sequences are in one-to-one correspondence, called Farey duality, with purely number-theoretic Farey (sub)sequences. We investigate Farey duality in the cases where n = 2m or n ≠ 2m, and we extend results on Farey (sub)sequences by presenting their useful dual formulations. The nice inner structure of the Farey sequences can be easily described in the language of monotone maps between subsequences. In order to characterize these maps, we use simple manipulations with 2 × 2 integer-valued matrices. In Chapter 1 we discuss various subsequences of the Farey sequence Fn that can be regarded as true Farey subsequences, since they are all characterized by identical number-theoretic and enumerative properties. 1 1 The Farey subsequences F(𝔹(n), m), F≤ 2 (𝔹(n), m) and F≥ 2 (𝔹(n), m), closely related to finite sets, Boolean lattices and finite-dimensional vector spaces, are defined in Chapter 1 by F(𝔹(n), m) := ( hk ∈ Fn : m + k − n ≤ h ≤ m), 1

h k

≤ 21 ),

1

h k

≥ 21 ),

F≤ 2 (𝔹(n), m) := ( hk ∈ F(𝔹(n), m) : F≥ 2 (𝔹(n), m) := ( hk ∈ F(𝔹(n), m) :

where n > 1 and 0 < m < n. We mention the significance of the order-reversing and bijective mapping hk 󳨃→ k−h k , describe pairs and triples of consecutive fractions in Farey (sub)sequences, count the number of fractions, determine their positions, discuss the rank problem, and conclude the chapter with a generating function of the sequence Fn . By Farey duality, discussed in Chapter 2, we mean the existence of monotone and bijective maps 1

m F≤ 2 (𝔹(n), m) ↔ Fn−m := ( hk ∈ Fn−m : h ≤ m)

F

≥ 21

(𝔹(n), m) ↔

n−m Fm

:=

( hk

∈ Fm : h ≤ n − m)

(order-preserving), (order-reversing)

and, in particular, the existence of monotone and bijective maps 1

1

F≤ 2 (𝔹(2m), m) ↔ Fm ↔ F≥ 2 (𝔹(2m), m). DOI 10.1515/9783110547665-202

VIII | Preface

In Chapter 2 we first discuss duality properties of Farey (sub)sequences, describe their connection with the Farey map, and then show that almost all results of Chapter 1 have useful dual formulations. In Chapter 3 Farey duality serves as an auxiliary technique for establishing monotone bijective maps C󸀠 ↔ C󸀠󸀠 between subsequences C󸀠 and C󸀠󸀠 of the same Farey sequence Fn of large order n. If Fm is a Farey sequence of small order m, then easily computed matrix products M 0 1 ], enable us to give concise and N, of equal length and with the factors [ 11 01 ] or [ −1 2 descriptions of the bijections Fn ⊃ M ⋅ Fm =: C󸀠 → C󸀠󸀠 := N ⋅ Fm ⊂ Fn , [ hk ] 󳨃→ NM−1 ⋅ [ hk ]

(order-preserving)

and Fn ⊃ C󸀠 → C󸀠󸀠 ⊂ Fn , −1 1 ⋅ [ hk ] (order-reversing), [ hk ] 󳨃→ N[ −1 0 1 ]M

between subsequences M ⋅ Fm := (M ⋅ [ hk ] : [ hk ] ∈ Fm ) and N ⋅ Fm of the sequence Fn , whose fractions are written in vector form. The book is intended as a detailed exposition of the basic properties of Farey (sub)sequences, and as a handbook of formulas. I hope that the text will be of interest to researchers and students, to engineers and software developers.

November 2017

Andrey O. Matveev Ekaterinburg

Contents Preface | VII List of Tables | XIII Farey sequences and collective decision making | 1 1 Basic properties of Farey sequences | 5 1.1 Sets, Boolean lattices, vector spaces, and Farey sequences Fn | 5 1.2 Farey subsequences | 7 1.2.1 The sequences Fnm , Gm n and F(𝔹(n), m) | 7 1.2.2 Well-structured Farey subsequences | 8 1 1 1.2.3 The sequences F≤ 2 (𝔹(n), m) and F≥ 2 (𝔹(n), m) | 8 1.2.4 The sequences F(𝔹(n), m)ℓ and G(𝔹(n), m)ℓ | 9 1.3 Order-reversing and bijective mapping hk 󳨃→ k−h k . I | 10 1.4 Pairs of neighboring fractions. I | 11 1.4.1 Neighboring fractions in Fn | 11 1.4.2 Neighboring fractions in Fnm | 17 1.4.3 Neighboring fractions in Gm n | 23 1.4.4 Neighboring fractions in F(𝔹(n), m) | 31 1.4.5 The det = −1 property | 43 1.5 Triples of consecutive fractions. I | 43 1.5.1 The mediant property | 44 1.5.2 Triples of consecutive fractions in Fn | 44 1.5.3 Triples of consecutive fractions in Fnm | 46 1.5.4 Triples of consecutive fractions in Gm n | 48 1.5.5 Triples of consecutive fractions in F(𝔹(n), m) | 50 1.6 The number of fractions in Farey (sub)sequences. I | 54 1.6.1 The number of fractions in Fnm , Fn and Gm n | 55 1.7 The position of a fraction in a Farey (sub)sequence. I | 56 1.7.1 The indices of fractions in Fnm and Fn | 56 1.7.2 The indices of fractions in Gm n | 58 1.8 The rank problem. I | 58 1.8.1 The rank problem for Fnm and Fn | 58 1.8.2 The rank problem for Gm n | 59 1.9 A generating function of the Farey sequence Fn | 59 Notes | 60 2 2.1

Farey duality | 69 Duality properties of Farey (sub)sequences | 69

DOI 10.1515/9783110547665-203

X | Contents 1

1

2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.6.1

The sequences F≤ 2 (𝔹(n), m), F≥ 2 (𝔹(n), m), and their duals | 69 The Farey duality and the Farey map | 71 1 1 The sequences F≤ 2 (𝔹(2m), m), F≥ 2 (𝔹(2m), m), and their dual Fm | 73 1 1 More on the sequences F≤ 2 (𝔹(n), m), F≥ 2 (𝔹(n), m) and their duals; n ≠ 2m | 74 Pairs of neighboring fractions. II | 75 Neighboring fractions in Fm | 76 Neighboring fractions in F(𝔹(2m), m) | 76 ℓ | 80 Neighboring fractions in Fm ℓ Neighboring fractions in Gm | 82 Neighboring fractions in F(𝔹(n), m), n ≠ 2m | 84 More on neighboring fractions in Fm | 91 The neighbors of 1j and j−1 j | 91

2.2.6.2 2.2.7 2.2.7.1

The neighbors of 2j and j−2 j | 93 More on neighboring fractions in F(𝔹(2m), m) | 94 j−1 j j 1 The neighbors of j+1 , 2j−1 , 2j−1 and j+1 | 94

2.2.7.2

The neighbors of

2.2.7.3 2.2.7.4 2.2.8 2.2.8.1

The neighbors of The neighbors of ℓ and Gℓ | 99 More on neighboring fractions in Fm m 1 The neighbors of j | 99

2.2.8.2

The neighbors of

2.2.8.3

The neighbors of

2.2.8.4 2.2.9 2.2.9.1

The neighbors of More on neighboring fractions in F(𝔹(n), m), n ≠ 2m | 106 1 1 The neighbors of j+1 in F≤ 2 (𝔹(n), m) | 106

2.2.9.2

The neighbors of

2.2.9.3

The neighbors of

2.2.9.4

The neighbors of

2.2.9.5

The neighbors of

2.2.9.6

The neighbors of

2.2.9.7

The neighbors of

2.2.9.8

The neighbors of

2.2.9.9 2.2.9.10 2.3 2.3.1

The neighbors of The neighbors of Triples of consecutive fractions. II | 124 1 Triples of consecutive fractions in F≤ 2 (𝔹(2m), m) and 1 F≥ 2 (𝔹(2m), m) | 124

2.1.1 2.1.2 2.1.3 2.1.4

j−2 j 2 j+2 , 2(j−1) , 2(j−1) 1 3 | 97 2 3 | 98

and

j j+2 |

95

j−1 j | 101 2 j | 102 j−2 j | 104

j ≥ 21 j+1 in F (𝔹(n), m) | 108 j−1 ≤ 12 2j−1 in F (𝔹(n), m) | 110 j ≥ 12 2j−1 in F (𝔹(n), m) | 111 2 ≤ 21 j+2 in F (𝔹(n), m) | 113 j ≥ 21 j+2 in F (𝔹(n), m) | 115 j−2 ≤ 12 2(j−1) in F (𝔹(n), m) | 117 j ≥ 12 2(j−1) in F (𝔹(n), m) | 120 1 3 | 121 2 3 | 123

Contents

1

| XI

1

Triples of consecutive fractions in F≤ 2 (𝔹(n), m) and F≥ 2 (𝔹(n), m), n ≠ 2m | 127 2.4 The number of fractions in Farey (sub)sequences. II | 129 2.4.1 The number of fractions in F(𝔹(n), m) | 129 2.4.2 More on the number of fractions | 130 2.5 The position of a fraction in a Farey (sub)sequence. II | 131 2.5.1 The index of 21 in F(𝔹(n), m) | 132 2.5.2 The indices of fractions in F(𝔹(2m), m) | 132 2.5.3 The indices of fractions in F(𝔹(n), m), n ≠ 2m | 133 2.6 The rank problem. II | 134 2.6.1 The rank problem for F(𝔹(2m), m) | 134 2.6.2 The rank problem for F(𝔹(n), m), n ≠ 2m | 135 2.7 Well-structured subsequences of consecutive fractions | 136 ℓ and Gℓ | 136 2.7.1 Well-structured subsequences within Fm , Fm m 2.7.2 Well-structured subsequences within F(𝔹(2m), m) | 136 2.7.3 Well-structured subsequences within F(𝔹(n), m), n ≠ 2m | 137 Notes | 138 2.3.2

3 3.1

Monotone maps between Farey subsequences | 143 1 Monotone bijective maps between the sequences F≤ 2 (𝔹(2m), m) and 1 F≥ 2 (𝔹(2m), m) | 143 1 3.2 Monotone maps between the sequences F≤ 2 (𝔹(n), m) and 1 F≥ 2 (𝔹(n), m), n ≠ 2m | 145 3.3 The sequences F2s m , F(𝔹(2s+1 m), 2s m), F(𝔹(2s+2 m), 2s+1 m), and monotone maps | 146 3.4 Monotone bijective maps between subsequences of the Farey sequence Fn | 152 3.5 Useful matrix products | 153 3.6 Order-reversing and bijective mapping hk 󳨃→ k−h k . II | 154 Notes | 154 Bibliography | 157 List of notation | 165 Index | 167

List of Tables Table 1.1 Table 1.2 Table 1.3 Table 1.4 Table 1.5 Table 1.6 Table 1.7 Table 2.1 Table 2.2 Table 2.3 Table 2.4 Table 2.5 Table 2.6 Table 2.7 Table 2.8 Table 2.9

Farey (sub)sequences. | 8 Order-reversing and bijective mapping hk 󳨃→ k−h . | 10 k The fractions that precede fractions hk in Farey (sub)sequences; see also Tables 2.1 and 2.2. | 12 The fractions that succeed fractions hk in Farey (sub)sequences; see also Tables 2.3 and 2.4. | 13 The neighbors of the fractions 11 and 01 in Farey (sub)sequences. | 14 Triples of consecutive fractions in Farey (sub)sequences; see also Table 2.9. | 45 The number of fractions in Farey (sub)sequences. | 54 The fractions that precede fractions hk in Farey (sub)sequences; see also Tables 1.3 and 2.2. | 77 The fractions that precede fractions hk in Farey (sub)sequences; see also Tables 1.3 and 2.1. | 79 The fractions that succeed fractions hk in Farey (sub)sequences; see also Tables 1.4 and 2.4. | 81 The fractions that succeed fractions hk in Farey (sub)sequences; see also Tables 1.4 and 2.3. | 83 The neighbors of the fraction 21 in Farey (sub)sequences. | 84 The neighbors of selected fractions in Farey (sub)sequences. | 92 The neighbors of the fraction 31 in Farey subsequences. | 98 The neighbors of the fraction 32 in Farey subsequences. | 99 Triples of consecutive fractions in Farey (sub)sequences; see also Table 1.6. | 125

DOI 10.1515/9783110547665-204

Farey sequences and collective decision making The Farey sequence Fm of order m, defined to be the increasing sequence of irreducible fractions hk such that 01 ≤ hk ≤ 11 and k ≤ m, has a wide area of applications in mathematics, computer science and physics [45]. The Farey sequences F2m of order 2m contain the subsequences F(𝔹(2m), m) := ( hk ∈ F2m : k − m ≤ h ≤ m), which can be useful for an analysis of collective decision-making procedures. One such procedure is pattern recognition by means of committee decision rules. The groundwork for the modern committee theory was laid by the short notes [1, 2]; see also, e.g., [62, 90, 112, 114, 115]. A finite collection H of pairwise distinct hyperplanes in the feature space ℝn is said to be a training set if it is partitioned into two nonempty subsets A and B; see Figure 1 (a). A codimension one subspace H := {x ∈ ℝn : ⟨p, x⟩ := ∑nj=1 p j xj = 0} of the hyperplane arrangement H is defined by its normal vector p ∈ ℝn , and this hyperplane is oriented: a vector v lies on the positive side of H if ⟨h, v⟩ > 0, where, by convention, h := −p if H ∈ A, and h := p if H ∈ B; see Figure 1 (b). In a similar manner, a region T of the hyperplane arrangement H, that is, a connected component of the complement T := ℝn − H, lies on the positive side of the hyperplane H if ⟨h, v⟩ > 0 for some vector v ∈ T. Let T +H denote the set of all regions lying on the positive side of H; see Figure 2. The oriented hyperplanes of the arrangement H are called the training patterns. The training samples A and B provide a partial description of two disjoint classes A and B, respectively; a priori, we have A ⊇ A and B ⊇ B. We call a subset K∗ ⊂ T a committee of regions for the arrangement H if |K∗ ∩T +H | > ∗ 1 2 |K | for each hyperplane H ∈ H; see Figure 3 (a). Consider a new pattern G := {x ∈ ℝn : ⟨g, x⟩ = 0} ∈ ̸ H determined by its normal vector g ∈ ℝn . If a system of distinct representatives W := {w ∈ K : K ∈ K∗ }, of cardinality |K∗ |, for the committee of regions K∗ is fixed, then the corresponding committee decision rule recognizes the pattern G as an element of the class A if |{w ∈ W : ⟨g, w⟩ > 0}| < 12 |W|; the pattern G is recognized as an element of the class B if |{w ∈ W : ⟨g, w⟩ > 0}| > 12 |W|; see Figure 3 (b). For any hyperplane H of the arrangement H, the increasing collection of irreducible fractions (

|R ∩ T +H |

gcd(|R ∩ T +H |, |R|)

/

|R| : R ⊆ T, |R| > 0) gcd(|R ∩ T +H |, |R|)

is the Farey subsequence F(𝔹(|T|), 21 |T|) whose half sequences are, in a sense, duals of the Farey sequence F|T|/2 . DOI 10.1515/9783110547665-001

2 | Farey sequences and collective decision making

H3 ∈ B ⊆ B

H3 H2 ∈ B ⊆ B

A ⊇ A ∋ H4

H4

H1 ∈ B ⊆ B

h4 := −p4

p3 =: h3 p4

(a)

(b)

Fig. 1. (a) A training set H := {H 1 , H 2 , H 3 , H 4 } in the feature space ℝ2 partitioned into training samples A := {H 4 } and B := {H 1 , H 2 , H 3 }, which provide a partial description A ⊇ A and B ⊇ B of classes A and B. (b) The training patterns H 3 and H 4 are defined by H 3 := {x ∈ ℝ2 : ⟨p3 , x⟩ = 0} and H 4 := {x ∈ ℝ2 : ⟨p4 , x⟩ = 0}, where p3 and p4 are their normal vectors. By convention, the positive sides (marked by triangles) of the oriented hyperplanes H 3 ∈ B and H 4 ∈ A are determined by the vectors h3 := p3 and h4 := −p4 .

Indeed, the left and right half sequences 1

h k

≤ 21 )

1

h k

≥ 21 )

F≤ 2 (𝔹(2m), m) := ( hk ∈ F(𝔹(2m), m) : and F≥ 2 (𝔹(2m), m) := ( hk ∈ F(𝔹(2m), m) :

of the sequence F(𝔹(2m), m) and the Farey sequence Fm all have the same number of fractions; for example, F4 := ( 01 1, then the fraction 2⌈m/2⌉ − 1 2⌊(m − 1)/2⌋ + 1 = 3⌈m/2⌉ − 1 3⌊(m − 1)/2⌋ + 2 precedes 32 in F(𝔹(2m), m), and the fraction 2⌊(m − 1)/2⌋ + 1 2⌈m/2⌉ − 1 = 3⌊(m − 1)/2⌋ + 1 3⌈m/2⌉ − 2 succeeds 23 in F(𝔹(2m), m).

2.2 Pairs of neighboring fractions. II | 99

Table 2.8. The neighbors of the fraction

2 3

in Farey subsequences; see also Table 2.6.

Sequence

The predecessor of

F(𝔹(2m), m), m > 1

2⌈m/2⌉−1 3⌈m/2⌉−1

F(𝔹(n), m), n < 2m, (n − m) > 1

2⌈m/2⌉−1 3⌈m/2⌉−1 n−m−1 2(n−m)−1

F(𝔹(n), m), n > 2m, m > 1

2⌈m/2⌉−1 3⌈m/2⌉−1

Sequence

The successor of

F(𝔹(2m), m), m > 1

2⌊(m−1)/2⌋+1 3⌊(m−1)/2⌋+1

F(𝔹(n), m), n < 2m, (n − m) > 1

2(n−m)+1 3(n−m)+1 2⌊(m−1)/2⌋+1 3⌊(m−1)/2⌋+1

F(𝔹(n), m), n > 2m, m > 1

2⌊(m−1)/2⌋+1 3⌊(m−1)/2⌋+1

2 3

See Remark 2.25

if 2n − 3m ≥ 1 if 2n − 3m ≤ 1

Remark 2.43 (i) Remark 2.43 (ii)

2 3

See Remark 2.25

if 3m − 2n ≥ 1 if 3m − 2n ≤ 1

Remark 2.43 (i) Remark 2.43 (ii)

Thus, if m is even, then the fractions 2 m−1 m−1 < < (3m − 2)/2 3 (3m − 4)/2 are consecutive in F(𝔹(2m), m). If m is odd, then the fractions m 2 m < < (3m + 1)/2 3 (3m − 1)/2 are consecutive in F(𝔹(2m), m).

2.2.8 More on neighboring fractions in Fℓm and Gℓm In this subsection we will describe explicitly the neighbors of fractions of the form 1j , j−1 2 j−2 ℓ ℓ j , j and j in the Farey subsequences Fm and Gm , with the help of the formulas provided by Lemmas 2.13 and 2.15. Recall that we have already found in Section 2.2.6 the neighbors of these fractions in the Farey sequences Fm . See Table 2.6 on the selected pairs of neighboring fractions that are considered in this book. 2.2.8.1 The neighbors of

1 j

Let us find the neighbors of a fraction

1 j

Corollary 2.26. (i) Consider a fraction (a) If m − jℓ ≥ 1, then the fraction

precedes the fraction

1 j

ℓ . in Fm

ℓ and Gℓ . in the Farey subsequences Fm m 1 j

ℓ , where 0 < ℓ < m. ∈ Fm

ℓ jℓ + 1

(2.51)

100 | 2 Farey duality

(b) If m − jℓ ≤ 1, then the fraction ⌈ mj ⌉ − 1

(2.52)

j(⌈ mj ⌉ − 1) + 1 ℓ . precedes the fraction 1j in Fm ℓ , j > 1, where 0 < ℓ < m. (ii) Consider a fraction 1j ∈ Fm (a) If jℓ − m ≥ 1, then the fraction

⌈ m+2 j ⌉−1 j(⌈ m+2 j ⌉ − 1) − 1 ℓ . succeeds the fraction 1j in Fm (b) If jℓ − m ≤ 1, then the fraction

ℓ jℓ−1

succeeds the fraction

1 j

ℓ . in Fm

Proof. The assertions of the corollary follow directly from the respective assertions of Lemma 2.13. Indeed, the search intervals for the integers a in that lemma turn, for fractions hk of the form 1j , into singleton sets. Corollary 2.27. (i) Consider a fraction (a) If m − jℓ ≥ 1, then the fraction

1 j

∈ Gℓm , where 0 < ℓ < m. ⌈ mj ⌉ − 1

j(⌈ mj ⌉ − 1) + 1 precedes the fraction 1j in Gℓm . (b) If m − jℓ ≤ 1, then the fraction ⌈ m−ℓ j−1 ⌉ − 1 j(⌈ m−ℓ j−1 ⌉ − 1) + 1 precedes the fraction 1j in Gℓm . (ii) Consider a fraction 1j ∈ Gℓm , j > 1, where 0 < ℓ < m. (a) If jℓ − m ≥ 1, then the fraction ⌈ m−ℓ+2 j−1 ⌉ − 1 j(⌈ m−ℓ+2 j−1 ⌉ − 1) − 1 succeeds the fraction 1j in Gℓm . (b) If jℓ − m ≤ 1, then the fraction ⌈ m+2 j ⌉−1 j(⌈ m+2 j ⌉ − 1) − 1 succeeds the fraction

1 j

in Gℓm .

Proof. The corollary follows directly from Lemma 2.15, since the search intervals for the integers a in that lemma turn, for fractions hk of the form 1j , into singleton sets.

2.2 Pairs of neighboring fractions. II | 101

2.2.8.2 The neighbors of

j−1 j

ℓ ℓ To find the neighbors of a fraction j−1 j in the Farey subsequences Gm and Fm , we will ℓ m−ℓ ℓ m−ℓ now apply the order-reversing bijections Gm ← Fm and Fm ← Gm , defined in (1.8), to the observations made in Corollaries 2.26 and 2.27. ℓ Corollary 2.28. (i) Consider a fraction j−1 j ∈ Gm , j > 1, where 0 < ℓ < m. (a) If j(m − ℓ) − m ≥ 1, then the fraction

(j − 1)(⌈ m+2 j ⌉ − 1) − 1 j(⌈ m+2 j ⌉ − 1) − 1

(2.53)

ℓ precedes the fraction j−1 j in Gm . (b) If j(m − ℓ) − m ≤ 1, then the fraction

(j − 1)(m − ℓ) − 1 j(m − ℓ) − 1 ℓ precedes the fraction j−1 j in Gm . j−1 ℓ (ii) Consider a fraction j ∈ Gm , where 0 < ℓ < m. (a) If m − j(m − ℓ) ≥ 1, then the fraction

(j − 1)(m − ℓ) + 1 j(m − ℓ) + 1 ℓ succeeds the fraction j−1 j in Gm . (b) If m − j(m − ℓ) ≤ 1, then the fraction

(j − 1)(⌈ mj ⌉ − 1) + 1 j(⌈ mj ⌉ − 1) + 1 succeeds the fraction

j−1 j

in Gℓm .

Proof. Assertions (i) and (ii) can be derived from Corollary 2.26 (ii) and Corollary 2.26 (i), respectively. m−ℓ is the image For instance, to verify assertion (i) (a), note that the fraction 1j ∈ Fm j−1 ℓ of the fraction j ∈ Gm under the order-reversing bijection (1.8). According to Corol⌈(m+2)/j⌉−1 m−ℓ . As a consequence, its lary 2.26 (ii) (a), the fraction j(⌈(m+2)/j⌉−1)−1 succeeds 1j in Fm ℓ image (2.53) under the order-reversing bijection (1.8) precedes j−1 j in Gm . ℓ Corollary 2.29. (i) Consider a fraction j−1 j ∈ Fm , j > 1, where 0 < ℓ < m. (a) If j(m − ℓ) − m ≥ 1, then the fraction

(j − 1)(⌈ ℓ+2 j−1 ⌉ − 1) − 1 j(⌈ ℓ+2 j−1 ⌉ − 1) − 1 precedes the fraction

j−1 j

ℓ . in Fm

(2.54)

102 | 2 Farey duality

(b) If j(m − ℓ) − m ≤ 1, then the fraction (j − 1)(⌈ m+2 j ⌉ − 1) − 1 j(⌈ m+2 j ⌉ − 1) − 1 ℓ precedes the fraction j−1 j in Fm . j−1 ℓ (ii) Consider a fraction j ∈ Fm , where 0 < ℓ < m. (a) If m − j(m − ℓ) ≥ 1, then the fraction

(j − 1)(⌈ mj ⌉ − 1) + 1 j(⌈ mj ⌉ − 1) + 1 ℓ succeeds the fraction j−1 j in Fm . (b) If m − j(m − ℓ) ≤ 1, then the fraction ℓ (j − 1)(⌈ j−1 ⌉ − 1) + 1 ℓ j(⌈ j−1 ⌉ − 1) + 1

succeeds the fraction

j−1 j

ℓ . in Fm

Proof. Assertions (i) and (ii) can be derived from Corollary 2.27 (ii) and Corollary 2.27 (i), respectively. For instance, to verify assertion (i) (a), note that the fraction 1j ∈ Gm−ℓ m is the image ℓ under the order-reversing bijection (1.8). According to Corolof the fraction j−1 ∈ F m j ⌈(ℓ+2)/(j−1)⌉−1 lary 2.27 (ii) (a), the fraction j(⌈(ℓ+2)/(j−1)⌉−1)−1 succeeds 1j in Gm−ℓ m . As a consequence, ℓ its image (2.54) under the order-reversing bijection (1.8) precedes j−1 j in Fm . 2.2.8.3 The neighbors of

2 j

To find the neighbors of a fraction turn to Lemmas 2.13 and 2.15.

2 j

ℓ and Gℓ , we again in the Farey subsequences Fm m

ℓ for some odd j, where 0 < ℓ < m. Corollary 2.30. Consider the fraction 2j ∈ Fm (i) (a) If 2m − jℓ ≥ 1, then the fraction

jℓ + 1 { { {ℓ/ 2 { { {(ℓ − 1)/ j(ℓ − 1) + 1 2 {

if ℓ is odd, if ℓ is even

ℓ . precedes 2j in Fm (b) If 2m − jℓ ≤ 1, then the fraction

j(⌈ 2m { j ⌉ − 1) + 1 2m { { − 1)/ (⌈ ⌉ { { j 2 { 2m { { j(⌈ − 2) + 1 ⌉ { j {(⌈ 2m ⌉ − 2)/ j 2 { precedes

2 j

ℓ . in Fm

if ⌈ 2m j ⌉ is even, if ⌈ 2m j ⌉ is odd

2.2 Pairs of neighboring fractions. II | 103

(ii) (a) If jℓ − 2m ≥ 1, then the fraction j(⌈ 2(m+1) ⌉ − 1) − 1 { j 2(m+1) { { { {(⌈ j ⌉ − 1)/ 2 { 2(m+1) { { { {(⌈ 2(m+1) ⌉ − 2)/ j(⌈ j ⌉ − 2) − 1 j { 2

if ⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

ℓ . succeeds 2j in Fm (b) If jℓ − 2m ≤ 1, then the fraction

jℓ − 1 { { {ℓ/ 2 { { j(ℓ − 1) − 1 { (ℓ − 1)/ 2 { succeeds

2 j

if ℓ is odd, if ℓ is even

ℓ . in Fm

Proof. The assertions of this corollary follow directly from the respective assertions of Lemma 2.13. For instance, under the hypothesis of assertion (i) (a), Lemma 2.13 (i) (a) implies that the fraction 2j succeeds the fraction a/ ja+1 2 , where ja ≡ −1 (mod 2),

ℓ − 1 ≤ a ≤ ℓ.

Corollary 2.31. Consider the fraction 2j ∈ Gℓm for some odd j, where 0 < ℓ < m. (i) (a) If 2m − jℓ ≥ 1, then the fraction j(⌈ 2m { j ⌉ − 1) + 1 2m { { − 1)/ (⌈ ⌉ { { j 2 { 2m { { j(⌈ j ⌉ − 2) + 1 { {(⌈ 2m ⌉ − 2)/ j 2 {

if ⌈ 2m j ⌉ is even, if ⌈ 2m j ⌉ is odd

precedes 2j in Gℓm . (b) If 2m − jℓ ≤ 1, then the fraction j(⌈ 2(m−ℓ) { j−2 ⌉ − 1) + 1 2(m−ℓ) { { − 1)/ (⌈ ⌉ { j−2 { 2 { 2(m−ℓ) { { { {(⌈ 2(m−ℓ) ⌉ − 2)/ j(⌈ j−2 ⌉ − 2) + 1 , j−2 { 2

if ⌈ 2(m−ℓ) j−2 ⌉ is even, if ⌈ 2(m−ℓ) j−2 ⌉ is odd

precedes 2j in Gℓm . (ii) (a) If jℓ − 2m ≥ 1, then the fraction j(⌈ 2(m−ℓ+1) ⌉ − 1) − 1 { j−2 2(m−ℓ+1) { { − 1)/ (⌈ ⌉ { j−2 { 2 { 2(m−ℓ+1) { { { {(⌈ 2(m−ℓ+1) ⌉ − 2)/ j(⌈ j−2 ⌉ − 2) − 1 j−2 { 2 succeeds

2 j

in Gℓm .

if ⌈ 2(m−ℓ+1) ⌉ is even, j−2 if ⌈ 2(m−ℓ+1) ⌉ is odd j−2

104 | 2 Farey duality

(b) If jℓ − 2m ≤ 1, then the fraction j(⌈ 2(m+1) ⌉ − 1) − 1 { j 2(m+1) { { − 1)/ (⌈ ⌉ { j { 2 { 2(m+1) { { { {(⌈ 2(m+1) ⌉ − 2)/ j(⌈ j ⌉ − 2) − 1 j { 2 succeeds

2 j

if ⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

in Gℓm .

Proof. The assertions of this corollary follow directly from the respective assertions of Lemma 2.15. For instance, under the hypothesis of assertion (i) (a), Lemma 2.15 (i) (a) implies that the fraction 2j succeeds the fraction a/ ja+1 2 , where ja ≡ −1 (mod 2),

2.2.8.4 The neighbors of



2m 2m ⌉−2≤ a ≤⌈ ⌉ − 1. j j

j−2 j

ℓ ℓ To find the neighbors of a fraction j−2 j in the Farey subsequences Gm and Fm , we will ℓ m−ℓ ℓ m−ℓ now apply the order-reversing bijections Gm ← Fm and Fm ← Gm , defined in (1.8), to the observations in Corollaries 2.30 and 2.31. ℓ Corollary 2.32. Consider the fraction j−2 j ∈ Gm for some odd j, where 0 < ℓ < m. (i) (a) If j(m − ℓ) − 2m ≥ 1, then the fraction

(j − 2)(⌈ 2(m+1) ⌉ − 1) − 1 j(⌈ 2(m+1) ⌉ − 1) − 1 { j j { { / { { 2 2 { 2(m+1) 2(m+1) { { { { (j − 2)(⌈ j ⌉ − 2) − 1 / j(⌈ j ⌉ − 2) − 1 { 2 2

if ⌈ 2(m+1) ⌉ is even, j (2.55) if ⌈ 2(m+1) ⌉ is odd j

ℓ precedes j−2 j in Gm . (b) If j(m − ℓ) − 2m ≤ 1, then the fraction

(j − 2)(m − ℓ) − 1 j(m − ℓ) − 1 { / { { 2 2 { { { (j − 2)(m − ℓ − 1) − 1 / j(m − ℓ − 1) − 1 2 2 {

if (m − ℓ) is odd, if (m − ℓ) is even

ℓ precedes j−2 j in Gm . (ii) (a) If 2m − j(m − ℓ) ≥ 1, then the fraction

(j − 2)(m − ℓ) + 1 j(m − ℓ) + 1 { / { { 2 2 { { (j − 2)(m − ℓ − 1) + 1 j(m − ℓ − 1) + 1 { / 2 2 { succeeds

j−2 j

in Gℓm .

if (m − ℓ) is odd, if (m − ℓ) is even

2.2 Pairs of neighboring fractions. II | 105

(b) If 2m − j(m − ℓ) ≤ 1, then the fraction 2m (j − 2)(⌈ 2m { j ⌉ − 1) + 1 j(⌈ j ⌉ − 1) + 1 { { / { { 2 2 { 2m 2m { { (j − 2)(⌈ j ⌉ − 2) + 1 j(⌈ j ⌉ − 2) + 1 { { / 2 2 {

succeeds

j−2 j

if ⌈ 2m j ⌉ is even, if ⌈ 2m j ⌉ is odd

in Gℓm .

Proof. Assertions (i) and (ii) follow from Corollary 2.30 (ii) and Corollary 2.30 (i), respectively. m−ℓ is the image of the fraction j−2 ∈ Gℓ under the Note that the fraction 2j ∈ Fm m j order-reversing bijection (1.8). For instance, to prove assertion (i) (a), note that if j(m − ℓ) − 2m ≥ 1, then, according to Corollary 2.30 (ii) (a), the fraction j(⌈ 2(m+1) ⌉ − 1) − 1 { j 2(m+1) { { − 1) ⌉ / (⌈ { j { 2 { 2(m+1) { { { {(⌈ 2(m+1) ⌉ − 2)/ j(⌈ j ⌉ − 2) − 1 j { 2

if⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

m−ℓ . As a consequence, its image (2.55) under the order-reversing succeeds 2j in Fm ℓ bijection (1.8) precedes the fraction j−2 j in Gm . ℓ Corollary 2.33. Consider the fraction j−2 j ∈ Fm for some odd j, where 0 < ℓ < m. (i) (a) If j(m − ℓ) − 2m ≥ 1, then the fraction 2(ℓ+1) (j − 2)(⌈ 2(ℓ+1) { j−2 ⌉ − 1) − 1 j(⌈ j−2 ⌉ − 1) − 1 { { / { { 2 2 { 2(ℓ+1) 2(ℓ+1) { { (j − 2)(⌈ j−2 ⌉ − 2) − 1 j(⌈ j−2 ⌉ − 2) − 1 { { / { 2 2

if ⌈ 2(ℓ+1) j−2 ⌉ is even, (2.56) if ⌈ 2(ℓ+1) j−2 ⌉ is odd

ℓ precedes j−2 j in Fm . (b) If j(m − ℓ) − 2m ≤ 1, then the fraction

(j − 2)(⌈ 2(m+1) ⌉ − 1) − 1 j(⌈ 2(m+1) ⌉ − 1) − 1 { j j { { / { { 2 2 { 2(m+1) 2(m+1) { { { { (j − 2)(⌈ j ⌉ − 2) − 1 / j(⌈ j ⌉ − 2) − 1 { 2 2 precedes

j−2 j

ℓ . in Fm

if ⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

106 | 2 Farey duality

(ii) (a) If 2m − j(m − ℓ) ≥ 1, then the fraction 2m (j − 2)(⌈ 2m { j ⌉ − 1) + 1 j(⌈ j ⌉ − 1) + 1 { { / { { 2 2 { 2m 2m { { (j − 2)(⌈ j ⌉ − 2) + 1 j(⌈ j ⌉ − 2) + 1 { { / 2 2 {

if ⌈ 2m j ⌉ is even, if ⌈ 2m j ⌉ is odd

ℓ succeeds j−2 j in Fm . (b) If 2m − j(m − ℓ) ≤ 1, then the fraction 2ℓ 2ℓ (j − 2)(⌈ j−2 ⌉ − 1) + 1 j(⌈ j−2 ⌉ − 1) + 1 { { / { { 2 2 { 2ℓ 2ℓ { (j − 2)(⌈ j−2 j(⌈ − 2) + 1 ⌉ ⌉ { j−2 − 2) + 1 { / { 2 2

succeeds

j−2 j

2ℓ if ⌈ j−2 ⌉ is even, 2ℓ if ⌈ j−2 ⌉ is odd

ℓ . in Fm

Proof. Assertions (i) and (ii) follow from Corollary 2.31 (ii) and Corollary 2.31 (i), respectively. m−ℓ is the image of the fraction j−2 ∈ F ℓ under the Note that the fraction 2j ∈ Gm m j order-reversing bijection (1.8). For instance, to prove assertion (i) (a), note that if j(m − ℓ) − 2m ≥ 1, then, according to Corollary 2.31 (ii) (a), the fraction j(⌈ 2(ℓ+1) { j−2 ⌉ − 1) − 1 2(ℓ+1) { { − 1)/ ⌉ (⌈ { j−2 { 2 { 2(ℓ+1) { { { {(⌈ 2(ℓ+1) ⌉ − 2)/ j(⌈ j−2 ⌉ − 2) − 1 { j−2 2

if ⌈ 2(ℓ+1) j−2 ⌉ is even, if ⌈ 2(ℓ+1) j−2 ⌉ is odd

succeeds 2j in Gm−ℓ m . As a consequence, its image (2.56) under the order-reversing ℓ bijection (1.8) precedes the fraction j−2 j in Fm .

2.2.9 More on neighboring fractions in F(𝔹(n), m), n ≠ 2m In this subsection, on the one hand, we use the characterization of Farey duality given j−1 j−2 1 2 in Section 2.1.4 to find the neighbors of fractions of the form j+1 , 2j−1 , j+2 and 2(j−1) in 1 the left half sequence F≤ 2 (𝔹(n), m) of the sequence F(𝔹(n), m), with n ≠ 2m. On the 1 1 other hand, we apply the order-reversing bijections F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m), defined in (1.8), to the obtained results, in order to make similar observations on 1 j j j j fractions of the form j+1 , 2j−1 , j+2 and 2(j−1) in the right half sequence F≥ 2 (𝔹(n), m). 2.2.9.1 The neighbors of

1 j+1

1

in F≤ 2 (𝔹(n), m) 1

1 Let us find the neighbors of a fraction j+1 in the left half sequences F≤ 2 (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m.

2.2 Pairs of neighboring fractions. II | 107

1

1 ∈ F≤ 2 (𝔹(n), m) − { 21 } for some j, where Corollary 2.34. Consider the fraction j+1 n ≠ 2m. (i) (a) Suppose that n < 2m. Then the fraction

⌈ n−m j ⌉−1 (j + 1)(⌈ n−m j ⌉ − 1) + 1

(2.57)

1 precedes j+1 in F(𝔹(n), m). (b) Suppose that n > 2m. If n − (j + 1)m ≥ 1, then the fraction

m (j + 1)m + 1 precedes

1 j+1

(2.58)

in F(𝔹(n), m). If n − (j + 1)m ≤ 1, then the fraction ⌈ n−m j ⌉−1 (j + 1)(⌈ n−m j ⌉ − 1) + 1

(2.59)

1 precedes j+1 in F(𝔹(n), m). (ii) (a) Suppose that n < 2m. Then the fraction

⌈ n−m+2 ⌉−1 j (j + 1)(⌈ n−m+2 ⌉ − 1) − 1 j

(2.60)

1 succeeds j+1 in F(𝔹(n), m). (b) Suppose that n > 2m. If (j + 1)m − n ≥ 1, then the fraction

⌉−1 ⌈ n−m+2 j (j + 1)(⌈ n−m+2 ⌉ − 1) − 1 j succeeds

1 j+1

in F(𝔹(n), m). If (j + 1)m − n ≤ 1, then the fraction m (j + 1)m − 1

succeeds

1 j+1

(2.61)

(2.62)

in F(𝔹(n), m).

Proof. Let us verify assertions (i) (a) and (ii) (a). According to Corollary 2.8 (i), the 1 1 fraction 1j ∈ Fn−m is the image of the fraction j+1 ∈ F≤ 2 (𝔹(n), m) under the orderpreserving bijection (2.20). According to Corollary 2.20 (i), the fraction ⌈ n−m j ⌉−1 j(⌈ n−m j ⌉ − 1) + 1 precedes 1j in Fn−m ; as a consequence, its image (2.57) under the order-preserving 1 1 bijection (2.21) precedes j+1 in F≤ 2 (𝔹(n), m). According to Corollary 2.20 (i), the fraction ⌈ n−m+2 ⌉−1 j j(⌈ n−m+2 ⌉ − 1) − 1 j

108 | 2 Farey duality succeeds 1j in Fn−m . As a consequence, its image (2.60) under the order-preserving 1 1 bijection (2.21) succeeds j+1 in F≤ 2 (𝔹(n), m). m Let us verify assertion (i) (b). According to Corollary 2.8 (ii), the fraction 1j ∈ Fn−m 1 1 is the image of the fraction j+1 ∈ F≤ 2 (𝔹(n), m) under the order-preserving bijection (2.25). If (n − m) − jm = n − (j + 1)m ≥ 1, then Corollary 2.26 (i) (a) states that the fraction m m 1 its image (2.58) under the order-preserving jm+1 precedes j in Fn−m . As a consequence, 1 ≤ 12 bijection (2.26) precedes j+1 in F (𝔹(n), m). If n − (j + 1)m ≤ 1, then Corollary 2.26 (i) (b) states that the fraction ⌈ n−m j ⌉−1 j(⌈ n−m j ⌉ − 1) + 1 m precedes 1j in Fn−m . As a consequence, its image (2.59) under the order-preserving 1 1 bijection (2.26) precedes j+1 in F≤ 2 (𝔹(n), m). Let us verify assertion (ii) (b). If jm − (n − m) = (j + 1)m − n ≥ 1, then Corollary 2.26 (ii) (a) states that the fraction

⌈ n−m+2 ⌉−1 j j(⌈ n−m+2 ⌉ − 1) − 1 j m succeeds 1j in Fn−m . As a consequence, its image (2.61) under the order-preserving 1 1 bijection (2.26) succeeds j+1 in F≤ 2 (𝔹(n), m). m If (j + 1)m − n ≤ 1, then Corollary 2.26 (ii) (b) states that the fraction jm−1 sucm 1 ceeds j in Fn−m . As a consequence, its image (2.62) under the order-preserving bijec1 1 tion (2.26) succeeds j+1 in F≤ 2 (𝔹(n), m). j

1

2.2.9.2 The neighbors of j+1 in F≥ 2 (𝔹(n), m) j In order to describe the neighbors of a fraction j+1 in the right half sequences ≥ 12 F (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m, we will apply the order1 1 reversing bijections F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m), defined in (1.8), to the observa1 1 tions, made in Corollary 2.34, on the neighbors of the fraction j+1 in F≤ 2 (𝔹(n), n − m). 1

j Corollary 2.35. Consider the fraction j+1 ∈ F≥ 2 (𝔹(n), m) − { 21 } for some j, where n ≠ 2m. (i) (a) Suppose that n < 2m. If jn − (j + 1)m ≥ 1, then the fraction

j(⌈ m+2 j ⌉ − 1) − 1 (j + 1)(⌈ m+2 j ⌉ − 1) − 1 precedes

j j+1

in F(𝔹(n), m). If jn − (j + 1)m ≤ 1, then the fraction j(n − m) − 1 (j + 1)(n − m) − 1

precedes

j j+1

(2.63)

in F(𝔹(n), m).

(2.64)

2.2 Pairs of neighboring fractions. II | 109

(b) Suppose that n > 2m. Then the fraction j(⌈ m+2 j ⌉ − 1) − 1 (j + 1)(⌈ m+2 j ⌉ − 1) − 1 j precedes j+1 in F(𝔹(n), m). (ii) (a) Suppose that n < 2m. If (j + 1)m − jn ≥ 1, then the fraction

j(n − m) + 1 (j + 1)(n − m) + 1 succeeds

j j+1

in F(𝔹(n), m). If (j + 1)m − jn ≤ 1, then the fraction j(⌈ mj ⌉ − 1) + 1 (j + 1)(⌈ mj ⌉ − 1) + 1

j succeeds j+1 in F(𝔹(n), m). (b) Suppose that n > 2m. Then the fraction

j(⌈ mj ⌉ − 1) + 1 (j + 1)(⌈ mj ⌉ − 1) + 1 succeeds

j j+1

in F(𝔹(n), m). 1

1 Proof. Note that the fraction j+1 ∈ F≤ 2 (𝔹(n), n − m) is the image of the fraction j ≥ 12 j+1 ∈ F (𝔹(n), m) under the order-reversing bijection (1.8). Thus, Corollary 2.35 is derived directly from Corollary 2.34 with the help of the order-reversing bijections 1 1 F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m) defined in (1.8). For instance, suppose that n < 2m. Let us verify assertion (i) (a). Note that n − 2(n − m) = 2m − n > 0, that is, n > 2(n − m). If (j + 1)(n − m) − n = jn − (j + 1)m ≥ 1, then, according to Corollary 2.34 (ii) (b), the fraction ⌈ m+2 j ⌉−1

(j + 1)(⌈ m+2 j ⌉ − 1) − 1 1

1 succeeds j+1 in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.63) under the order1 j reversing bijection (1.8) precedes j+1 in F≥ 2 (𝔹(n), m). If jn − (j + 1)m ≤ 1, then, according to Corollary 2.34 (ii) (b), the fraction

n−m (j + 1)(n − m) − 1 1

1 succeeds j+1 in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.64) under the order1 j reversing bijection (1.8) precedes j+1 in F≥ 2 (𝔹(n), m).

110 | 2 Farey duality j−1

1

2.2.9.3 The neighbors of 2j−1 in F≤ 2 (𝔹(n), m) j−1 Here we will describe the neighbors of a fraction 2j−1 in the left half sequences 1 F≤ 2 (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m. 1

j−1 Corollary 2.36. Consider the fraction 2j−1 ∈ F≤ 2 (𝔹(n), m) for some j, where n ≠ 2m. (i) (a) Suppose that n < 2m. If j > 1, then the fraction

(j − 1)(⌈ n−m+2 ⌉ − 1) − 1 j (2j − 1)(⌈ n−m+2 ⌉ − 1) − 2 j

(2.65)

j−1 precedes 2j−1 in F(𝔹(n), m). (b) Suppose that n > 2m. If j > 1 and (j − 1)n − (2j − 1)m ≥ 1, then the fraction

(j − 1)(⌈ m+2 j−1 ⌉ − 1) − 1 (2j − 1)(⌈ m+2 j−1 ⌉ − 1) − 2 precedes fraction

j−1 2j−1

(2.66)

in F(𝔹(n), m). If j > 1 and (j − 1)n − (2j − 1)m ≤ 1, then the (j − 1)(⌈ n−m+2 ⌉ − 1) − 1 j (2j − 1)(⌈ n−m+2 ⌉ − 1) − 2 j

(2.67)

j−1 precedes 2j−1 in F(𝔹(n), m). (ii) (a) Suppose that n < 2m. Then the fraction

(j − 1)(⌈ n−m j ⌉ − 1) + 1 (2j − 1)(⌈ n−m j ⌉ − 1) + 2

(2.68)

j−1 succeeds 2j−1 in F(𝔹(n), m). (b) Suppose that n > 2m. If (2j − 1)m − (j − 1)n ≥ 1, then the fraction

(j − 1)(⌈ n−m j ⌉ − 1) + 1 (2j − 1)(⌈ n−m j ⌉ − 1) + 2 succeeds

j−1 2j−1

in F(𝔹(n), m). If (2j − 1)m − (j − 1)n ≤ 1, then the fraction m (j − 1)(⌈ j−1 ⌉ − 1) + 1 m (2j − 1)(⌈ j−1 ⌉ − 1) + 2

succeeds

j−1 2j−1

(2.69)

(2.70)

in F(𝔹(n), m).

Proof. Let us verify assertions (i) (a) and (ii) (a). According to Corollary 2.8 (i), the j−1 ≤ 12 fraction j−1 j ∈ Fn−m is the image of the fraction 2j−1 ∈ F (𝔹(n), m) under the orderpreserving bijection (2.20). According to Corollary 2.20 (ii), the fraction (j − 1)(⌈ n−m+2 ⌉ − 1) − 1 j j(⌈ n−m+2 ⌉ − 1) − 1 j precedes j−1 its image (2.65) under the order-preserving j in Fn−m . As a consequence, 1 j−1 bijection (2.21) precedes 2j−1 in F≤ 2 (𝔹(n), m).

2.2 Pairs of neighboring fractions. II | 111

According to Corollary 2.20 (ii), the fraction (j − 1)(⌈ n−m j ⌉ − 1) + 1 j(⌈ n−m j ⌉ − 1) + 1 succeeds j−1 its image (2.68) under the order-preserving j in Fn−m . As a consequence, 1 j−1 bijection (2.21) succeeds 2j−1 in F≤ 2 (𝔹(n), m). m Let us verify assertion (i) (b). According to Corollary 2.8 (ii), the fraction j−1 j ∈ Fn−m j−1 ≤ 21 is the image of the fraction 2j−1 ∈ F (𝔹(n), m) under the order-preserving bijection (2.25). If j((n − m) − m) − (n − m) = (j − 1)n − (2j − 1)m ≥ 1, then Corollary 2.29 (i) (a) states that the fraction (j − 1)(⌈ m+2 j−1 ⌉ − 1) − 1 j(⌈ m+2 j−1 ⌉ − 1) − 1 m precedes j−1 its image (2.66) under the order-preserving j in Fn−m . As a consequence, 1 j−1 bijection (2.26) precedes 2j−1 in F≤ 2 (𝔹(n), m). If (j − 1)n − (2j − 1)m ≤ 1, then Corollary 2.29 (i) (b) states that the fraction

(j − 1)(⌈ n−m+2 ⌉ − 1) − 1 j j(⌈ n−m+2 ⌉ − 1) − 1 j m precedes j−1 its image (2.67) under the order-preserving j in Fn−m . As a consequence, 1 j−1 bijection (2.26) precedes 2j−1 in F≤ 2 (𝔹(n), m). Let us verify assertion (ii) (b). If (n − m) − j((n − m) − m) = (2j − 1)m − (j − 1)n ≥ 1, then Corollary 2.29 (ii) (a) states that the fraction (j − 1)(⌈ n−m j ⌉ − 1) + 1

j(⌈ n−m j ⌉ − 1) + 1 m succeeds j−1 its image (2.69) under the order-preserving j in Fn−m . As a consequence, j−1 ≤ 12 bijection (2.26) succeeds 2j−1 in F (𝔹(n), m). If (2j − 1)m − (j − 1)n ≤ 1, then Corollary 2.29 (ii) (b) states that the fraction m (j − 1)(⌈ j−1 ⌉ − 1) + 1 m j(⌈ j−1 ⌉ − 1) + 1 m succeeds j−1 its image (2.70) under the order-preserving j in Fn−m . As a consequence, 1 j−1 bijection (2.26) succeeds 2j−1 in F≤ 2 (𝔹(n), m). j

1

2.2.9.4 The neighbors of 2j−1 in F≥ 2 (𝔹(n), m) j In order to describe the neighbors of a fraction 2j−1 in the right half sequences 1 ≥2 F (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m, we will apply the order1 1 reversing bijections F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m), defined in (1.8), to the observa1 j−1 tions, made in Corollary 2.36, on the neighbors of the fraction 2j−1 in F≤ 2 (𝔹(n), n − m).

112 | 2 Farey duality 1

j ∈ F≥ 2 (𝔹(n), m) − { 11 } for some j, where Corollary 2.37. Consider the fraction 2j−1 n ≠ 2m. (i) (a) Suppose that n < 2m. If jn − (2j − 1)m ≥ 1, then the fraction

j(⌈ mj ⌉ − 1) + 1 (2j − 1)(⌈ mj ⌉ − 1) + 2 precedes

j 2j−1

(2.71)

in F(𝔹(n), m). If jn − (2j − 1)m ≤ 1, then the fraction j(⌈ n−m j−1 ⌉ − 1) + 1 (2j − 1)(⌈ n−m j−1 ⌉ − 1) + 2

(2.72)

j precedes 2j−1 in F(𝔹(n), m). (b) Suppose that n > 2m. Then the fraction

j(⌈ mj ⌉ − 1) + 1 (2j − 1)(⌈ mj ⌉ − 1) + 2 j precedes 2j−1 in F(𝔹(n), m). (ii) (a) Suppose that n < 2m. If (2j − 1)m − jn ≥ 1, then the fraction

j(⌈ n−m+2 j−1 ⌉ − 1) − 1 (2j − 1)(⌈ n−m+2 j−1 ⌉ − 1) − 2 succeeds

j 2j−1

in F(𝔹(n), m). If (2j − 1)m − jn ≤ 1, then the fraction j(⌈ m+2 j ⌉ − 1) − 1 (2j − 1)(⌈ m+2 j ⌉ − 1) − 2

j succeeds 2j−1 in F(𝔹(n), m). (b) Suppose that n > 2m. Then the fraction

j(⌈ m+2 j ⌉ − 1) − 1 (2j − 1)(⌈ m+2 j ⌉ − 1) − 2 succeeds

j 2j−1

in F(𝔹(n), m). 1

j−1 Proof. Note that the fraction 2j−1 ∈ F≤ 2 (𝔹(n), n − m) is the image of the fraction 1 j ≥2 2j−1 ∈ F (𝔹(n), m) under the order-reversing bijection (1.8). Thus, Corollary 2.37 is derived directly from Corollary 2.36, with the help of the order-reversing bijections 1 1 F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m) defined in (1.8). For instance, suppose that n < 2m; let us verify assertion (i) (a). Note that n − 2(n − m) = 2m − n > 0, that is, n > 2(n − m). If (2j−1)(n−m)−(j−1)n = jn−(2j−1)m ≥ 1, then, according to Corollary 2.36 (ii) (b), the fraction (j − 1)(⌈ mj ⌉ − 1) + 1

(2j − 1)(⌈ mj ⌉ − 1) + 2

2.2 Pairs of neighboring fractions. II | 113

1

j−1 succeeds 2j−1 in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.71) under the order1 j reversing bijection (1.8) precedes 2j−1 in F≥ 2 (𝔹(n), m). If jn − (j + 1)m ≤ 1, then, according to Corollary 2.36 (ii) (b), the fraction

(j − 1)(⌈ n−m j−1 ⌉ − 1) + 1 (2j − 1)(⌈ n−m j−1 ⌉ − 1) + 2 1

j−1 succeeds 2j−1 in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.72) under the order1 j reversing bijection (1.8) precedes 2j−1 in F≥ 2 (𝔹(n), m).

2.2.9.5 The neighbors of

2 j+2

1

in F≤ 2 (𝔹(n), m) 1

2 Let us describe the neighbors of a fraction j+2 in the left half sequences F≤ 2 (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m. 1

2 Corollary 2.38. Consider the fraction j+2 ∈ F≤ 2 (𝔹(n), m) for some odd j, where n ≠ 2m. (i) (a) Suppose that n < 2m. Then the fraction

(j + 2)(⌈ 2(n−m) ⌉ − 1) + 1 { j 2(n−m) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m) { { { {(⌈ 2(n−m) ⌉ − 2)/ (j + 2)(⌈ j ⌉ − 2) + 1 j { 2

if ⌈ 2(n−m) ⌉ is even, j if

⌈ 2(n−m) ⌉ j

(2.73)

is odd

2 in F(𝔹(n), m). precedes j+2 (b) Suppose that n > 2m. If 2n − (j + 2)m ≥ 1, then the fraction

(j + 2)m + 1 { { {m/ 2 { { {(m − 1)/ (j + 2)(m − 1) + 1 2 { precedes

2 j+2

if m is odd, (2.74) if m is even

in F(𝔹(n), m). If 2n − (j + 2)m ≤ 1, then the fraction

(j + 2)(⌈ 2(n−m) ⌉ − 1) + 1 { j 2(n−m) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m) { { { {(⌈ 2(n−m) ⌉ − 2)/ (j + 2)(⌈ j ⌉ − 2) + 1 j { 2

if ⌈ 2(n−m) ⌉ is even, j

(2.75)

if ⌈ 2(n−m) ⌉ is odd j

2 precedes j+2 in F(𝔹(n), m). (ii) (a) Suppose that n < 2m. Then the fraction

(j + 2)(⌈ 2(n−m+1) ⌉ − 1) − 1 { j 2(n−m+1) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m+1) { { ⌉ − 2) − 1 { j {(⌈ 2(n−m+1) ⌉ − 2)/ (j + 2)(⌈ j { 2 succeeds

2 j+2

in F(𝔹(n), m).

if ⌈ 2(n−m+1) ⌉ is even, j if

⌈ 2(n−m+1) ⌉ j

is odd

(2.76)

114 | 2 Farey duality

(b) Suppose that n > 2m. If (j + 2)m − 2n ≥ 1, then the fraction (j + 2)(⌈ 2(n−m+1) ⌉ − 1) − 1 { j 2(n−m+1) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m+1) { { ⌉ − 2) − 1 { j {(⌈ 2(n−m+1) ⌉ − 2)/ (j + 2)(⌈ j { 2 succeeds

2 j+2

2 j+2

(2.77)

if ⌈ 2(n−m+1) ⌉ is odd j

in F(𝔹(n), m). If (j + 2)m − 2n ≤ 1, then the fraction (j + 2)m − 1 { { {m/ 2 { { {(m − 1)/ (j + 2)(m − 1) − 1 2 {

succeeds

if ⌈ 2(n−m+1) ⌉ is even, j

if m is odd, (2.78) if m is even

in F(𝔹(n), m).

Proof. Let us verify assertions (i) (a) and (ii) (a). According to Corollary 2.8 (i), the 1 2 ∈ F≤ 2 (𝔹(n), m) under the orderfraction 2j ∈ Fn−m is the image of the fraction j+2 preserving bijection (2.20). According to Corollary 2.21 (i), the fraction j(⌈ 2(n−m) ⌉ − 1) + 1 { j 2(n−m) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m) { { { {(⌈ 2(n−m) ⌉ − 2)/ j(⌈ j ⌉ − 2) + 1 j { 2

if ⌈ 2(n−m) ⌉ is even, j if ⌈ 2(n−m) ⌉ is odd j

precedes 2j in Fn−m . As a consequence, its image (2.73) under the order-preserving 1 2 in F≤ 2 (𝔹(n), m). bijection (2.21) precedes j+2 According to Corollary 2.21 (i), the fraction j(⌈ 2(n−m+1) ⌉ − 1) − 1 { j 2(n−m+1) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m+1) { { ⌉ − 2) − 1 { j {(⌈ 2(n−m+1) ⌉ − 2)/ j(⌈ j { 2

if ⌈ 2(n−m+1) ⌉ is even, j if ⌈ 2(n−m+1) ⌉ is odd j

succeeds 2j in Fn−m . As a consequence, its image (2.76) under the order-preserving 1 2 bijection (2.21) succeeds j+2 in F≤ 2 (𝔹(n), m). m Let us verify assertion (i) (b). According to Corollary 2.8 (ii), the fraction 2j ∈ Fn−m 1 2 is the image of the fraction j+2 ∈ F≤ 2 (𝔹(n), m) under the order-preserving bijection (2.25). If 2(n − m) − jm = 2n − (j + 2)m ≥ 1, then Corollary 2.30 (i) (a) states that the fraction jm + 1 { if m is odd, { {m/ 2 { { {(m − 1)/ j(m − 1) + 1 if m is even 2 { m 2 precedes j in Fn−m . As a consequence, its image (2.74) under the order-preserving 1 2 bijection (2.26) precedes j+2 in F≤ 2 (𝔹(n), m).

2.2 Pairs of neighboring fractions. II | 115

If 2n − (j + 2)m ≤ 1, then Corollary 2.30 (i) (b) states that the fraction j(⌈ 2(n−m) ⌉ − 1) + 1 { j 2(n−m) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m) { { { {(⌈ 2(n−m) ⌉ − 2)/ j(⌈ j ⌉ − 2) + 1 j { 2

if ⌈ 2(n−m) ⌉ is even, j if ⌈ 2(n−m) ⌉ is odd j

m precedes 2j in Fn−m . As a consequence, its image (2.75) under the order-preserving 1 2 in F≤ 2 (𝔹(n), m). bijection (2.26) precedes j+2 Let us verify assertion (ii) (b). If jm − 2(n − m) = (j + 2)m − 2n ≥ 1, then Corollary 2.30 (ii) (a) states that the fraction

j(⌈ 2(n−m+1) ⌉ − 1) − 1 { j 2(n−m+1) { { − 1)/ (⌈ ⌉ { j { 2 { 2(n−m+1) { { ⌉ − 2) − 1 { j {(⌈ 2(n−m+1) ⌉ − 2)/ j(⌈ j { 2

if ⌈ 2(n−m+1) ⌉ is even, j if ⌈ 2(n−m+1) ⌉ is odd j

m succeeds 2j in Fn−m . As a consequence, its image (2.77) under the order-preserving 1 2 bijection (2.26) succeeds j+2 in F≤ 2 (𝔹(n), m). If (j + 2)m − 2n ≤ 1, then Corollary 2.30 (ii) (b) states that the fraction

jm − 1 { { {m/ 2 { { j(m − 1) − 1 { (m − 1)/ 2 {

if m is odd, if m is even

m succeeds 2j in Fn−m . As a consequence, its image (2.78) under the order-preserving 1 2 bijection (2.26) succeeds j+2 in F≤ 2 (𝔹(n), m). j

1

2.2.9.6 The neighbors of j+2 in F≥ 2 (𝔹(n), m) j In order to describe the neighbors of a fraction j+2 in the right half sequences ≥ 12 F (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m, we will apply the order1 1 reversing bijections F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m), defined in (1.8), to the observa1 2 tions, made in Corollary 2.38, on the neighbors of the fraction j+2 in F≤ 2 (𝔹(n), n − m). 1

j Corollary 2.39. Consider the fraction j+2 ∈ F≥ 2 (𝔹(n), m) for some odd j, where n ≠ 2m. (i) (a) Suppose that n < 2m. If jn − (j + 2)m ≥ 1, then the fraction

j(⌈ 2(m+1) ⌉ − 1) − 1 (j + 2)(⌈ 2(m+1) ⌉ − 1) − 1 { j j { { / { { 2 2 { 2(m+1) 2(m+1) { { j(⌈ j ⌉ − 2) − 1 (j + 2)(⌈ j ⌉ − 2) − 1 { { / { 2 2 precedes

j j+2

in F(𝔹(n), m).

if ⌈ 2(m+1) ⌉ is even, j (2.79) if ⌈ 2(m+1) ⌉ is odd j

116 | 2 Farey duality

If jn − (j + 2)m ≤ 1, then the fraction j(n − m) − 1 (j + 2)(n − m) − 1 { / { { 2 2 { { { j(n − m − 1) − 1 (j + 2)(n − m − 1) − 1 / { 2 2

if (n − m) is odd,

(2.80)

if (n − m) is even

j precedes j+2 in F(𝔹(n), m). (b) Suppose that n > 2m. Then the fraction

j(⌈ 2(m+1) ⌉ − 1) − 1 (j + 2)(⌈ 2(m+1) ⌉ − 1) − 1 { j j { { / { { 2 2 { 2(m+1) 2(m+1) { { { { j(⌈ j ⌉ − 2) − 1 / (j + 2)(⌈ j ⌉ − 2) − 1 { 2 2

if ⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

j in F(𝔹(n), m). precedes j+2 (ii) (a) Suppose that n < 2m. If (j + 2)m − jn ≥ 1, then the fraction

j(n − m) + 1 (j + 2)(n − m) + 1 { / { { 2 2 { { j(n − m − 1) + 1 (j + 2)(n − m − 1) + 1 { / { 2 2 succeeds

j j+2

if (n − m) is odd, if (n − m) is even

in F(𝔹(n), m). If (j + 2)m − jn ≤ 1, then the fraction

2m j(⌈ 2m { j ⌉ − 1) + 1 (j + 2)(⌈ j ⌉ − 1) + 1 { { / { { 2 2 { 2m 2m { { j(⌈ j ⌉ − 2) + 1 (j + 2)(⌈ j ⌉ − 2) + 1 { { / 2 2 {

if ⌈ 2m j ⌉ is even, if ⌈ 2m j ⌉ is odd

j succeeds j+2 in F(𝔹(n), m). (b) Suppose that n > 2m. Then the fraction 2m j(⌈ 2m { j ⌉ − 1) + 1 (j + 2)(⌈ j ⌉ − 1) + 1 { { / { { 2 2 { 2m 2m { j(⌈ j ⌉ − 2) + 1 (j + 2)(⌈ j ⌉ − 2) + 1 { { { / 2 2 {

succeeds

j j+2

if ⌈ 2m j ⌉ is even, if ⌈ 2m j ⌉ is odd

in F(𝔹(n), m). 1

2 Proof. Note that the fraction j+2 ∈ F≤ 2 (𝔹(n), n − m) is the image of the fraction j ≥ 12 j+2 ∈ F (𝔹(n), m) under the order-reversing bijection (1.8). Thus, Corollary 2.39 is derived directly from Corollary 2.38, with the help of the order-reversing bijections 1 1 F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m) defined in (1.8). For instance, suppose that n < 2m. Let us verify assertion (i) (a). Note that n − 2(n − m) = 2m − n > 0, that is, n > 2(n − m).

2.2 Pairs of neighboring fractions. II | 117

If (j + 2)(n − m) − 2n = jn − (j + 2)m ≥ 1, then, according to Corollary 2.38 (ii) (b), the fraction (j + 2)(⌈ 2(m+1) ⌉ − 1) − 1 { j 2(m+1) { { − 1)/ (⌈ ⌉ { j { 2 { 2(m+1) { { { {(⌈ 2(m+1) ⌉ − 2)/ (j + 2)(⌈ j ⌉ − 2) − 1 j { 2

if ⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

1

2 succeeds j+2 in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.79) under the order1 j reversing bijection (1.8) precedes j+2 in F≥ 2 (𝔹(n), m). If jn − (j + 2)m ≤ 1, then, according to Corollary 2.38 (ii) (b), the fraction

(j + 2)(n − m) − 1 { { {(n − m)/ 2 { { (j + 2)(n − m − 1) − 1 { (n − m − 1)/ { 2

if (n − m) is odd, if (n − m) is even

1

2 succeeds j+2 in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.80) under the order1 j reversing bijection (1.8) precedes j+2 in F≥ 2 (𝔹(n), m).

2.2.9.7 The neighbors of

j−2 2(j−1)

1

in F≤ 2 (𝔹(n), m) 1

j−2 Let us find the neighbors of a fraction 2(j−1) in the left half sequences F≤ 2 (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m. 1

j−2 Corollary 2.40. Consider the fraction 2(j−1) ∈ F≤ 2 (𝔹(n), m) for some odd j, where n ≠ 2m. (i) (a) Suppose that n < 2m. Then the fraction

(j − 2)(⌈ 2(n−m+1) ⌉ − 1) − 1 j { { /((j − 1)(⌈ 2(n−m+1) ⌉ − 1) − 1) { { j { 2 { { 2(n−m+1) { ⌉ is even, { { if ⌈ j { { { (j − 2)(⌈ 2(n−m+1) ⌉ − 2) − 1 { j { { /((j − 1)(⌈ 2(n−m+1) ⌉ − 2) − 1) { j { { 2 { 2(n−m+1) ⌉ is odd { if ⌈ j

(2.81)

(j − 2)(⌈ 2(m+1) j−2 ⌉ − 1) − 1 { { /((j − 1)(⌈ 2(m+1) { { j−2 ⌉ − 1) − 1) { 2 { { 2(m+1) { { { if ⌈ j−2 ⌉ is even, { { { (j − 2)(⌈ 2(m+1) { j−2 ⌉ − 2) − 1 { { /((j − 1)(⌈ 2(m+1) { j−2 ⌉ − 2) − 1) { { 2 { 2(m+1) { if ⌈ j−2 ⌉ is odd

(2.82)

j−2 precedes 2(j−1) in F(𝔹(n), m). (b) Suppose that n > 2m. If (j − 2)n − 2(j − 1)m ≥ 1, then the fraction

precedes

j−2 2(j−1)

in F(𝔹(n), m).

118 | 2 Farey duality

If (j − 2)n − 2(j − 1)m ≤ 1, then the fraction (j − 2)(⌈ 2(n−m+1) ⌉ − 1) − 1 j { { /((j − 1)(⌈ 2(n−m+1) ⌉ − 1) − 1) { { j { 2 { { 2(n−m+1) { ⌉ is even, { { if ⌈ j { { (j − 2)(⌈ 2(n−m+1) ⌉ − 2) − 1 { { j { { /((j − 1)(⌈ 2(n−m+1) ⌉ − 2) − 1) { j { { 2 { 2(n−m+1) ⌉ is odd { if ⌈ j

(2.83)

j−2 precedes 2(j−1) in F(𝔹(n), m). (ii) (a) Suppose that n < 2m. Then the fraction

(j − 2)(⌈ 2(n−m) ⌉ − 1) + 1 j { { /((j − 1)(⌈ 2(n−m) ⌉ − 1) + 1) { { j { 2 { { 2(n−m) { { { if ⌈ j ⌉ is even, { { { (j − 2)(⌈ 2(n−m) ⌉ − 2) + 1 { j { { ⌉ − 2) + 1) /((j − 1)(⌈ 2(n−m) { j { { 2 { 2(n−m) { if ⌈ j ⌉ is odd

(2.84)

j−2 succeeds 2(j−1) in F(𝔹(n), m). (b) Suppose that n > 2m. If 2(j − 1)m − (j − 2)n ≥ 1, then the fraction

(j − 2)(⌈ 2(n−m) ⌉ − 1) + 1 j { { ⌉ − 1) + 1) /((j − 1)(⌈ 2(n−m) { { j { 2 { { 2(n−m) { { { if ⌈ j ⌉ is even, { { { (j − 2)(⌈ 2(n−m) ⌉ − 2) + 1 { j { { /((j − 1)(⌈ 2(n−m) ⌉ − 2) + 1) { j { { 2 { 2(n−m) { if ⌈ j ⌉ is odd succeeds

j−2 2(j−1) in F(𝔹(n), m). 2m 2)(⌈ j−2 ⌉ − 1) + 1

(2.85)

If 2(j − 1)m − (j − 2)n ≤ 1, then the fraction

(j − { 2m { { ⌉ − 1) + 1) /((j − 1)(⌈ j−2 { { 2 { 2m { { (j − 2)(⌈ j−2 ⌉ − 2) + 1 { { 2m /((j − 1)(⌈ j−2 ⌉ − 2) + 1) 2 { j−2 in F(𝔹(n), m). succeeds 2(j−1)

2m if ⌈ j−2 ⌉ is even,

(2.86)

2m if ⌈ j−2 ⌉ is odd

Proof. Let us verify assertions (i) (a) and (ii) (a). According to Corollary 2.8 (i), the j−2 ≤ 12 fraction j−2 j ∈ Fn−m is the image of the fraction 2(j−1) ∈ F (𝔹(n), m) under the orderpreserving bijection (2.20). According to Corollary 2.21 (ii), the fraction (j − 2)(⌈ 2(n−m+1) ⌉ − 1) − 1 j(⌈ 2(n−m+1) ⌉ − 1) − 1 { j j { { / { { 2 2 { 2(n−m+1) 2(n−m+1) { { ⌉ − 2) − 1 j(⌈ ⌉ − 2) − 1 { j j { (j − 2)(⌈ / { 2 2

if ⌈ 2(n−m+1) ⌉ is even, j if ⌈ 2(n−m+1) ⌉ is odd j

2.2 Pairs of neighboring fractions. II | 119

precedes j−2 its image (2.81) under the order-preserving j in Fn−m . As a consequence, 1 j−2 bijection (2.21) precedes 2(j−1) in F≤ 2 (𝔹(n), m). According to Corollary 2.21 (ii), the fraction (j − 2)(⌈ 2(n−m) ⌉ − 1) + 1 j(⌈ 2(n−m) ⌉ − 1) + 1 { j j { { / { { 2 2 { 2(n−m) 2(n−m) { { { { (j − 2)(⌈ j ⌉ − 2) + 1 / j(⌈ j ⌉ − 2) + 1 { 2 2

if ⌈ 2(n−m) ⌉ is even, j if ⌈ 2(n−m) ⌉ is odd j

succeeds j−2 its image (2.84) under the order-preserving j in Fn−m . As a consequence, 1 j−2 bijection (2.21) succeeds 2(j−1) in F≤ 2 (𝔹(n), m). m Let us verify assertion (i) (b). According to Corollary 2.8 (ii), the fraction j−2 j ∈ Fn−m j−2 ≤ 12 is the image of the fraction 2(j−1) ∈ F (𝔹(n), m) under the order-preserving bijection (2.25). If j((n − m) − m) − 2(n − m) = (j − 2)n − 2(j − 1)m ≥ 1, then Corollary 2.33 (i) (a) states that the fraction 2(m+1) (j − 2)(⌈ 2(m+1) { j−2 ⌉ − 1) − 1 j(⌈ j−2 ⌉ − 1) − 1 { { / { { 2 2 { 2(m+1) 2(m+1) { { { { (j − 2)(⌈ j−2 ⌉ − 2) − 1 / j(⌈ j−2 ⌉ − 2) − 1 { 2 2

if ⌈ 2(m+1) j−2 ⌉ is even, if ⌈ 2(m+1) j−2 ⌉ is odd

m precedes j−2 its image (2.82) under the order-preserving j in Fn−m . As a consequence, 1 j−2 bijection (2.26) precedes 2(j−1) in F≤ 2 (𝔹(n), m). If (j − 2)n − 2(j − 1)m ≤ 1, then Corollary 2.33 (i) (b) states that the fraction

(j − 2)(⌈ 2(n−m+1) ⌉ − 1) − 1 j(⌈ 2(n−m+1) ⌉ − 1) − 1 { j j { { / { { 2 2 { { (j − 2)(⌈ 2(n−m+1) ⌉ − 2) − 1 j(⌈ 2(n−m+1) ⌉ − 2) − 1 { { j j { / { 2 2

if ⌈ 2(n−m+1) ⌉ is even, j if ⌈ 2(n−m+1) ⌉ is odd j

m precedes j−2 its image (2.83) under the order-preserving j in Fn−m . As a consequence, 1 j−2 bijection (2.26) precedes 2(j−1) in F≤ 2 (𝔹(n), m). Let us verify assertion (ii) (b). If 2(n − m) − j((n − m) − m) = 2(j − 1)m − (j − 2)n ≥ 1, then Corollary 2.33 (ii) (a) states that the fraction

(j − 2)(⌈ 2(n−m) ⌉ − 1) + 1 j(⌈ 2(n−m) ⌉ − 1) + 1 { j j { { / { { 2 2 { { (j − 2)(⌈ 2(n−m) ⌉ − 2) + 1 j(⌈ 2(n−m) ⌉ − 2) + 1 { { j j { / { 2 2

if ⌈ 2(n−m) ⌉ is even, j if ⌈ 2(n−m) ⌉ is odd j

m succeeds j−2 its image (2.85) under the order-preserving j in Fn−m . As a consequence, 1 j−2 bijection (2.26) succeeds 2(j−1) in F≤ 2 (𝔹(n), m).

120 | 2 Farey duality

If 2(j − 1)m − (j − 2)n ≤ 1, then Corollary 2.33 (ii) (b) states that the fraction 2m 2m (j − 2)(⌈ j−2 ⌉ − 1) + 1 j(⌈ j−2 ⌉ − 1) + 1 { { / { { 2 2 { 2m 2m { − 2) + 1 j(⌈ (j − 2)(⌈ ⌉ ⌉ { j−2 j−2 − 2) + 1 { / { 2 2

2m if ⌈ j−2 ⌉ is even, 2m if ⌈ j−2 ⌉ is odd

m succeeds j−2 its image (2.86) under the order-preserving j in Fn−m . As a consequence, 1 j−2 bijection (2.26) succeeds 2(j−1) in F≤ 2 (𝔹(n), m). j

1

2.2.9.8 The neighbors of 2(j−1) in F≥ 2 (𝔹(n), m) j In order to describe the neighbors of a fraction 2(j−1) in the right half sequences ≥ 12 F (𝔹(n), m) of the sequences F(𝔹(n), m), with n ≠ 2m, we will apply the order1 1 reversing bijections F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m) defined in (1.8) to the observa1 j−2 tions, made in Corollary 2.40, on the neighbors of the fraction 2(j−1) in F≤ 2(𝔹(n),n − m). 1

j Corollary 2.41. Consider the fraction 2(j−1) ∈ F≥ 2 (𝔹(n), m) − { 12 } for some odd j, where n ≠ 2m. (i) (a) Suppose that n < 2m. If jn − 2(j − 1)m ≥ 1, then the fraction

j(⌈ 2m j ⌉ − 1) + 1 { 2m { /((j − 1)(⌈ 2m { { j ⌉ − 1) + 1) if ⌈ j ⌉ is even, 2 { { { j(⌈ 2m j ⌉ − 2) + 1 { 2m /((j − 1)(⌈ 2m j ⌉ − 2) + 1) if ⌈ j ⌉ is odd { 2 j precedes 2(j−1) in F(𝔹(n), m). If jn − 2(j − 1)m ≤ 1, then the fraction j(⌈ 2(n−m) { j−2 ⌉ − 1) + 1 { { /((j − 1)(⌈ 2(n−m) { j−2 ⌉ − 1) + 1) { 2 { { { j(⌈ 2(n−m) { j−2 ⌉ − 2) + 1 { /((j − 1)(⌈ 2(n−m) j−2 ⌉ − 2) + 1) 2 { j precedes 2(j−1) in F(𝔹(n), m). (b) Suppose that n > 2m. Then the fraction

if ⌈ 2(n−m) j−2 ⌉ is even, if

⌈ 2(n−m) j−2 ⌉

(2.87)

(2.88)

is odd

j(⌈ 2m j ⌉ − 1) + 1 { 2m { /((j − 1)(⌈ 2m { { j ⌉ − 1) + 1) if ⌈ j ⌉ is even, 2 { 2m { { { j(⌈ j ⌉ − 2) + 1 2m /((j − 1)(⌈ 2m j ⌉ − 2) + 1) if ⌈ j ⌉ is odd { 2 j precedes 2(j−1) in F(𝔹(n), m). (ii) (a) Suppose that n < 2m. If 2(j − 1)m − jn ≥ 1, then the fraction j(⌈ 2(n−m+1) ⌉ − 1) − 1 { j−2 { { /((j − 1)(⌈ 2(n−m+1) ⌉ − 1) − 1) { j−2 { 2 { { { j(⌈ 2(n−m+1) ⌉ − 2) − 1 { j−2 { /((j − 1)(⌈ 2(n−m+1) ⌉ − 2) − 1) j−2 2 { j succeeds 2(j−1) in F(𝔹(n), m).

if ⌈ 2(n−m+1) ⌉ is even, j−2 if ⌈ 2(n−m+1) ⌉ is odd j−2

2.2 Pairs of neighboring fractions. II | 121

If 2(j − 1)m − jn ≤ 1, then the fraction j(⌈ 2(m+1) ⌉ − 1) − 1 { j { { /((j − 1)(⌈ 2(m+1) ⌉ − 1) − 1) { j { 2 { { { j(⌈ 2(m+1) ⌉ − 2) − 1 { j { /((j − 1)(⌈ 2(m+1) ⌉ − 2) − 1) j { 2 j succeeds 2(j−1) in F(𝔹(n), m). (b) Suppose that n > 2m. Then the fraction j(⌈ 2(m+1) ⌉ − 1) − 1 { j { { ⌉ − 1) − 1) /((j − 1)(⌈ 2(m+1) { j { 2 { 2(m+1) { { { { j(⌈ j ⌉ − 2) − 1 /((j − 1)(⌈ 2(m+1) ⌉ − 2) − 1) j { 2 j succeeds 2(j−1) in F(𝔹(n), m).

if ⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

if ⌈ 2(m+1) ⌉ is even, j if ⌈ 2(m+1) ⌉ is odd j

1

j−2 Proof. Note that the fraction 2(j−1) ∈ F≤ 2 (𝔹(n), n − m) is the image of the fraction 1 j ≥2 2(j−1) ∈ F (𝔹(n), m) under the order-reversing bijection (1.8). Thus, Corollary 2.41 is derived directly from Corollary 2.40, with the help of the order-reversing bijections 1 1 F≥ 2 (𝔹(n), m) ↔ F≤ 2 (𝔹(n), n − m) defined in (1.8). For instance, suppose that n < 2m. Let us verify assertion (i) (a). Note that n − 2(n − m) = 2m − n > 0, that is, n > 2(n − m). If 2(j−1)(n−m)−(j−2)n = jn−2(j−1)m ≥ 1, then, according to Corollary 2.40 (ii) (b), the fraction

(j − 2)(⌈ 2m { j ⌉ − 1) + 1 { { /((j − 1)(⌈ 2m { j ⌉ − 1) + 1) { 2 { { { (j − 2)(⌈ 2m { j ⌉ − 2) + 1 { /((j − 1)(⌈ 2m j ⌉ − 2) + 1) 2 {

if ⌈ 2m j ⌉ is even, if ⌈ 2m j ⌉ is odd

1

j−2 succeeds 2(j−1) in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.87) under the 1 j in F≥ 2 (𝔹(n), m). order-reversing bijection (1.8) precedes 2(j−1) If jn − 2(j − 1)m ≤ 1, then, according to Corollary 2.40 (ii) (b), the fraction

(j − 2)(⌈ 2(n−m) { j−2 ⌉ − 1) + 1 { { /((j − 1)(⌈ 2(n−m) { j−2 ⌉ − 1) + 1) { 2 { { { (j − 2)(⌈ 2(n−m) { j−2 ⌉ − 2) + 1 { /((j − 1)(⌈ 2(n−m) j−2 ⌉ − 2) + 1) { 2

if ⌈ 2(n−m) j−2 ⌉ is even, if ⌈ 2(n−m) j−2 ⌉ is odd

1

j−2 succeeds 2(j−1) in F≤ 2 (𝔹(n), n − m). As a consequence, its image (2.88) under the 1 j order-reversing bijection (1.8) precedes 2(j−1) in F≥ 2 (𝔹(n), m).

2.2.9.9 The neighbors of 13 1 We will now find the neighbors of the fraction 13 in the Farey subsequences F≤ 2 (𝔹(n), m), with n ≠ 2m.

122 | 2 Farey duality Remark 2.42 (see also Table 2.7). (i) Consider a Farey subsequence F(𝔹(n), m) such that n < 2m and n − m > 1. 1 From Remark 2.10 and the order-preserving bijection Fn−m → F≤ 2 (𝔹(n), m) given in (2.21), it follows that the fraction ⌊(n − m − 1)/2⌋ ⌈(n − m)/2⌉ − 1 = 3⌊(n − m − 1)/2⌋ + 1 3⌈(n − m)/2⌉ − 2 precedes

1 3

1

in F≤ 2 (𝔹(n), m), and the fraction ⌈(n − m)/2⌉ ⌊(n − m − 1)/2⌋ + 1 = 3⌈(n − m)/2⌉ − 1 3⌊(n − m − 1)/2⌋ + 2 1

succeeds 31 in F≤ 2 (𝔹(n), m). Thus, if (n − m) is even, then the fractions (n − m − 2)/2 1 (n − m)/2 < < (3(n − m) − 4)/2 3 (3(n − m) − 2)/2 1

are consecutive in F≤ 2 (𝔹(n), m). If (n − m) is odd, then the fractions (n − m − 1)/2 1 (n − m + 1)/2 < < (3(n − m) − 1)/2 3 (3(n − m) + 1)/2 1

are consecutive in F≤ 2 (𝔹(n), m). (ii) Consider a Farey subsequence F(𝔹(n), m) such that n > 2m and m > 1. 1 m Let us apply the order-preserving bijection Fn−m → F≤ 2 (𝔹(n), m) given in (2.26) to Remark 2.14. 1 m If (n − m) − 2m = n − 3m ≥ 1, then 3m+1 precedes 13 in F≤ 2 (𝔹(n), m). If n − 3m ≤ 1, then ⌈(n − m)/2⌉ − 1 ⌊(n − m − 1)/2⌋ = 3⌊(n − m − 1)/2⌋ + 1 3⌈(n − m)/2⌉ − 2 1

precedes 13 in F≤ 2 (𝔹(n), m). Thus, if n − 3m ≤ 1 and (n − m) is even, then (n − m − 2)/2 (3(n − m) − 4)/2 precedes

1 3

1

in F≤ 2 (𝔹(n), m). If n − 3m ≤ 1 and (n − m) is odd, then (n − m − 1)/2 (3(n − m) − 1)/2 1

precedes 31 in F≤ 2 (𝔹(n), m). If 2m − (n − m) = 3m − n ≥ 1, then ⌈(n − m)/2⌉ ⌊(n − m − 1)/2⌋ + 1 = 3⌈(n − m)/2⌉ − 1 3⌊(n − m − 1)/2⌋ + 2 succeeds

1 3

1

in F≤ 2 (𝔹(n), m).

2.2 Pairs of neighboring fractions. II | 123

Thus, if 3m − n ≥ 1 and (n − m) is even, then (n − m)/2 (3(n − m) − 2)/2 succeeds

1 3

1

in F≤ 2 (𝔹(n), m). If 3m − n ≥ 1 and (n − m) is odd, then (n − m + 1)/2 (3(n − m) − 1)/2 1

succeeds 31 in F≤ 2 (𝔹(n), m). m succeeds If 3m − n ≤ 1, then 2m−1

1 3

1

in F≤ 2 (𝔹(n), m).

2.2.9.10 The neighbors of 32 In order to find the neighbors of the fraction 23 in the Farey subsequences F(𝔹(n), m), with n ≠ 2m, let us apply the order-reversing bijections F(𝔹(n), m) ↔ F(𝔹(n), n − m) defined in (1.8) to the observations, made in Remark 2.42, on the neighbors of the fraction 13 . Remark 2.43 (see also Table 2.8). (i) Consider a Farey subsequence F(𝔹(n), m) such that n < 2m and n − m > 1. If 2n − 3m ≥ 1, then 2⌈m/2⌉ − 1 2⌊(m − 1)/2⌋ + 1 = 3⌈m/2⌉ − 1 3⌊(m − 1)/2⌋ + 2 1

precedes 23 in F≥ 2 (𝔹(n), m). Thus, if 2n − 3m ≥ 1 and m is even, then m−1 (3m − 2)/2 precedes

2 3

1

in F≥ 2 (𝔹(n), m). If 2n − 3m ≥ 1 and m is odd, then m−1 (3m − 1)/2 1

precedes 23 in F≥ 2 (𝔹(n), m). If 2n − 3m ≤ 1, then

n−m−1 2(n − m) − 1

1

precedes 23 in F≥ 2 (𝔹(n), m). If 3m − 2n ≥ 1, then

succeeds

2 3

2(n − m) + 1 3(n − m) + 1

1

in F≥ 2 (𝔹(n), m). If 3m − 2n ≤ 1, then 2⌊(m − 1)/2⌋ + 1 2⌈m/2⌉ − 1 = 3⌊(m − 1)/2⌋ + 1 3⌈m/2⌉ − 2

succeeds

2 3

1

in F≥ 2 (𝔹(n), m).

124 | 2 Farey duality

Thus, if 3m − 2n ≤ 1 and m is even, then m−1 (3m − 4)/2 succeeds

2 3

1

in F≥ 2 (𝔹(n), m). If 3m − 2n ≤ 1 and m is odd, then m (3m − 1)/2

succeeds

2 3

1

in F≥ 2 (𝔹(n), m).

(ii) Consider a Farey subsequence F(𝔹(n), m) such that n > 2m and m > 1. The fraction 2⌈m/2⌉ − 1 2⌊(m − 1)/2⌋ + 1 = 3⌈m/2⌉ − 1 3⌊(m − 1)/2⌋ + 2 precedes

2 3

1

in F≥ 2 (𝔹(n), m), and the fraction 2⌊(m − 1)/2⌋ + 1 2⌈m/2⌉ − 1 = 3⌊(m − 1)/2⌋ + 1 3⌈m/2⌉ − 2 1

succeeds 23 in F≥ 2 (𝔹(n), m). Thus, if m is even, then the fractions 2 m−1 m−1 < < (3m − 2)/2 3 (3m − 4)/2 1

are consecutive in F≥ 2 (𝔹(n), m). If m is odd, then the fractions 2 m m < < (3m + 1)/2 3 (3m − 1)/2 1

are consecutive in F≥ 2 (𝔹(n), m).

2.3 Triples of consecutive fractions. II In this section we pursue the investigation, initiated in Section 1.5.5, of recurrent relations that describe, by means of duality, triples of consecutive fractions in the Farey subsequences F(𝔹(n), m); see Table 2.9. Recall that the triples of consecutive fractions whose central fraction is 12 are presented in Table 2.5.

1

1

2.3.1 Triples of consecutive fractions in F≤ 2 (𝔹(2m), m) and F≥ 2 (𝔹(2m), m) Let us find recurrent relations that describe triples of consecutive fractions in the left and right half sequences of the sequences F(𝔹(2m), m); cf. Proposition 1.28.

2.3 Triples of consecutive fractions. II | 125

Table 2.9. Triples of consecutive fractions also Table 1.6.

hj kj


2m m+h j+2 m+h ⌋h j+1 − h j+2 , k j = ⌊ h j+2 ⌋k j+1 − k j+2 , h j+1 j+1 m+h m+h h j+2 = ⌊ h j ⌋h j+1 − h j , k j+2 = ⌊ h j ⌋k j+1 − k j

hj = ⌊

j+1

j+1

Corollary 2.46 (ii)

126 | 2 Farey duality h

Corollary 2.44. (i) If k jj < 1 F≤ 2 (𝔹(2m), m), then

h j+1 k j+1


2m, then the bijections given in (2.25) and m (2.26) of Corollary 2.8 (ii) guarantee that t = |Fn−m | − 1, that is, according to Proposition 1.29, we have t=

1 1 m m n−m + ∑ μ(d)⌊ ⌋(⌊ ⌋ − ⌊ ⌋). 2 d≥1 d d 2 d

2.5.2 The indices of fractions in F(𝔹(2m), m) In order to find the indices t of fractions hk =: f t in the Farey subsequences F(𝔹(2m), m), in this subsection we will revisit, via duality, the results of Section 1.7.1. Proposition 2.50. Consider a Farey subsequence F(𝔹(2m), m). 1 (i) If f t := hk ∈ F≤ 2 (𝔹(2m), m) − { 10 , 12 }, then m

⌊m/d⌋

t = ∑ μ(d) ∑ ⌊ j=1

d=1

(ii) If f t :=

h k

∈F

≥ 12

m hj hj m ⌋ = ∑ M( )⌊ ⌋. k−h j k −h j=2

(𝔹(2m), m) − { 21 , 11 }, then t = 1 + ∑ μ(d)(⌊ d≥1

= 1 + ∑ μ(d)⌊ d≥1

m 2 ⌊m/d⌋ (k − h)j ⌋ − ∑ ⌊ ⌋) d h j=1

m 2 m m (k − h)j ⌋ − ∑ M( )⌊ ⌋. d j h j=2

h Proof. (i) According to Corollary 2.5, the fraction e s := k−h ∈ Fm is the image of f t under the order-preserving bijection (2.12); we have t = s. Since 01 < f t < 12 , we have m > 1. Hence, the assertion follows from Corollary 1.33.

2.5 The position of a fraction in a Farey (sub)sequence. II | 133

(ii) According to Corollary 2.5, the fraction e s := k−h h ∈ Fm is the image of f t under the order-reversing bijection (2.18); note that t = |F(𝔹(2m), m)| − s − 1. Since 1 1 2 < f t < 1 , we have m > 1. Hence, the assertion follows from Proposition 2.47 and Corollary 1.33.

2.5.3 The indices of fractions in F(𝔹(n), m), n ≠ 2m In this subsection we will find the indices t of fractions hk =: f t in the Farey subsequences F(𝔹(n), m), with n ≠ 2m. The results of Section 1.7.1 will be applied, via the Farey duality, to the left and right half sequences of the sequences F(𝔹(n), m). Proposition 2.51. Consider a Farey subsequence F(𝔹(n), m), where n ≠ 2m. (i) Suppose that n < 2m. 1 (a) If f t := hk ∈ F≤ 2 (𝔹(n), m) − { 01 , 12 }, then n−m

⌊(n−m)/d⌋

t = ∑ μ(d)

j=1

d=1

(b) If f t :=

h k





n−m n−m hj hj ⌋ = ∑ M( )⌊ ⌋. k−h j k−h j=2

1

∈ F≥ 2 (𝔹(n), m) − { 12 , 11 }, then

t = 1 + ∑ μ(d)(⌊ d≥1

⌊m/d⌋ n − m (k − h)j m n−m , ⌋⌊ ⌋ − ∑ ⌊min{ }⌋). d d d h j=1

(ii) Suppose that n > 2m. 1 (a) If f t := hk ∈ F≤ 2 (𝔹(n), m) − { 01 , 12 }, then ⌊(n−m)/d⌋

t = ∑ μ(d)

j=1

d≥1

(b) If f t :=

h k



⌊min{

m hj , }⌋. d k−h

1

∈ F≥ 2 (𝔹(n), m) − { 12 , 11 }, then t = 1 + ∑ μ(d)(⌊ d≥1

= 1 + ∑ μ(d)⌊ d≥1

⌊m/d⌋ m n−m (k − h)j ⌋⌊ ⌋− ∑ ⌊ ⌋) d d h j=1

m m n−m m (k − h)j ⌋⌊ ⌋ − ∑ M( )⌊ ⌋. d d j h j=2

h Proof. (i) (a) According to Corollary 2.8 (i), the fraction e s := k−h ∈ Fn−m is the image of f t under the order-preserving bijection (2.20); we have t = s. Since 01 < f t < 12 , we have n − m > 1. Hence, the assertion follows from Corollary 1.33. n−m is the image of f (i) (b) According to Corollary 2.8 (i), the fraction e s := k−h t h ∈ Fm under the order-reversing bijection (2.23); note that t = |F(𝔹(n), m)| − s − 1. Hence, the assertion follows from Propositions 2.47 and 1.32.

134 | 2 Farey duality m h (ii) (a) According to Corollary 2.8 (ii), the fraction e s := k−h is the image ∈ Fn−m of f t under the order-preserving bijection (2.25); we have t = s. The assertion follows from Proposition 1.32. (ii) (b) According to Corollary 2.8 (ii), the fraction e s := k−h h ∈ Fm is the image of f t under the order-reversing bijection (2.29); note that t = |F(𝔹(n), m)| − s − 1. Since 12 < f t < 11 , we have m > 1. Hence, the assertion follows from Proposition 2.47 and Corollary 1.33.

2.6 The rank problem. II Recall that the rank problem is the search in a Farey (sub)sequence for the index of a fraction that is nearest to a given real number r, 0 ≤ r ≤ 1; see Section 1.8. This section is concerned with the rank problem for the Farey subsequences F(𝔹(n), m).

2.6.1 The rank problem for F(𝔹(2m), m) When we deal with the rank problem for the Farey subsequences F(𝔹(2m), m), we use the Farey map T(x) considered in Section 2.1.2, and the observation made in Remark 1.35 (ii). Remark 2.52 (cf. Proposition 2.50). (i) Let r ∈ ℝ, 0 < r < 12 . If f t = max{ hk ∈ F(𝔹(2m), m) :

h k

≤ r},

then ⌊m/d⌋

t=

∑ d∈[1,m]

μ(d) ∑ ⌊ j=1

m jr m jr ⌋ = ∑ M( )⌊ ⌋. 1−r j 1 −r j=2

r 1−r

The real number is the image T0 (r) of r under the Farey map, and here we have actually found, with the help of the order-preserving bijection (2.12) and Remark 1.35 (ii), h h r ∈ Fm : k−h ≤ 1−r the index s of the fraction e s ∈ Fm such that e s = max{ k−h } and t = s. (ii) Let r ∈ ℝ,

1 2

< r < 1. If f t = min{ hk ∈ F(𝔹(2m), m) : r ≤ hk },

then t = 1 + ∑ μ(d)(⌊ d≥1

m 2 ⌊m/d⌋ j(1 − r) m 2 m m j(1 − r) ⌋ − ∑ ⌊ ⌋) = 1 + ∑ μ(d)⌊ ⌋ − ∑ M( )⌊ ⌋. d r d j r j=1 j=2 d≥1

Indeed, the real number 1−r r is the image T 1 (r) of r under the Farey map. The order-reversing bijection (2.18) and Remark 1.35 (ii) allow us to find the index s k−h 1−r of the fraction e s ∈ Fm such that e s = max{ k−h h ∈ Fm : h ≤ r }. It suffices to note that t = |F(𝔹(2m), m)| − s − 1, and use Proposition 2.47.

2.6 The rank problem. II | 135

2.6.2 The rank problem for F(𝔹(n), m), n ≠ 2m In this subsection we will use the Farey duality and the Farey map for solving the rank problem for the sequences F(𝔹(n), m), with n ≠ 2m. Remark 2.53 (cf. Proposition 2.51). Consider a Farey subsequence F(𝔹(n), m), where n ≠ 2m. (i) Suppose that n < 2m. (a) Let r ∈ ℝ, 0 < r < 12 . If f t = max{ hk ∈ F(𝔹(n), m) : n−m

⌊(n−m)/d⌋

t = ∑ μ(d)



∑ j=1

d=1

h k

≤ r}, then

n−m jr n−m jr ⌋ = ∑ M( )⌊ ⌋. 1−r j 1 −r j=2

r Indeed, the real number 1−r is the image T0 (r) of r under the Farey map, and here we have found, with the help of the order-preserving bijection (2.20) and Remark 1.35 (ii), h h r }, the index s of the fraction e s ∈ Fn−m such that e s = max{ k−h ∈ Fn−m : k−h ≤ 1−r and t = s. (b) Let r ∈ ℝ, 12 < r < 1. If f t = min{ hk ∈ F(𝔹(n), m) : r ≤ hk }, then

t = 1 + ∑ μ(d)(⌊ d≥1

⌊m/d⌋ m n−m n − m j(1 − r) , ⌋⌊ ⌋ − ∑ ⌊min { }⌋). d d d r j=1

Indeed, the real number 1−r r is the image T 1 (r) of r under the Farey map. The orderreversing bijection (2.23) and Remark 1.35 (i) allow us to find the index s of the n−m such that e = max{ k−h ∈ F n−m : k−h ≤ 1−r }. It suffices to note that fraction e s ∈ Fm s m r h h t = |F(𝔹(n), m)| − s − 1, and use Proposition 2.47 in order to determine the cardinality |F(𝔹(n), m)|. (ii) Suppose that n > 2m. (a) Let r ∈ ℝ, 0 < r < 12 . If f t = max{ hk ∈ F(𝔹(n), m) : ⌊(n−m)/d⌋

t = ∑ μ(d)

∑ j=1

d≥1

⌊min{

h k

≤ r}, then

m jr , }⌋. d 1−r

r The real number 1−r is the image T0 (r) of r under the Farey map, and we have found, with the help of the order-preserving bijection (2.25) and Remark 1.35 (i), the index s m m h h r ∈ Fn−m : k−h ≤ 1−r } and t = s. of the fraction e s ∈ Fn−m such that e s = max{ k−h 1 h h (b) Let r ∈ ℝ, 2 < r < 1. If f t = min{ k ∈ F(𝔹(n), m) : r ≤ k }, then

t = 1 + ∑ μ(d)(⌊ d≥1

= 1 + ∑ μ(d)⌊ d≥1

⌊m/d⌋ m n−m j(1 − r) ⌋⌊ ⌋− ∑ ⌊ ⌋) d d r j=1

m m n−m m j(1 − r) ⌋⌊ ⌋ − ∑ M( )⌊ ⌋. d d j r j=2

136 | 2 Farey duality The real number 1−r r is the image T 1 (r) of r under the Farey map. The order-reversing bijection (2.29) and Remark 1.35 (ii) allow us to find the index s of the fraction e s ∈ Fm k−h 1−r such that e s = max{ k−h h ∈ Fm : h ≤ r }. It suffices to note that t = |F(𝔹(n), m)|−s−1, and use Proposition 2.47 for finding the quantity |F(𝔹(n), m)|.

2.7 Well-structured subsequences of consecutive fractions A few well-structured Farey subsequences were presented in Section 1.2.2. We will now give further instances of this kind by describing subsequences, with simple structure, of consecutive fractions in the Farey sequences, among which, perhaps the most interesting well-structured subsequences are neighborhoods of the fraction 12 in the sequences F(𝔹(2m), m).

2.7.1 Well-structured subsequences within Fm , Fℓm and Gℓm Let us mention some subsequences, with simple structure, of consecutive fractions in ℓ and Gℓ . the Farey (sub)sequences Fm , Fm m Remark 2.54. (i) The expression (2.38) in Corollary 2.20 (i) implies that the fractions 0 1