Fact-checked by Grok 2 weeks ago

Farey sequence

A Farey sequence of order n, denoted F_n, is the ordered sequence of all reduced fractions between 0 and 1 (inclusive) with denominators at most n, arranged in increasing order. For example, F_1 = \frac{0}{1}, \frac{1}{1}, F_2 = \frac{0}{1}, \frac{1}{2}, \frac{1}{1}, and F_3 = \frac{0}{1}, \frac{1}{3}, \frac{1}{2}, \frac{2}{3}, \frac{1}{1}. The concept was first systematically described by French mathematician Charles Haros in 1802, though it gained prominence through English geologist John Farey Sr., who published tables of such sequences in 1816 without crediting Haros. That same year, Augustin Cauchy provided a rigorous proof of key properties, including the mediant rule for generating higher-order sequences. Earlier roots trace to a 1747 problem in The Ladies' Diary, solved in 1751 by Thomas Flitcroft, who computed the number of fractions strictly between 0 and 1 with denominators at most 99 as 3003. Central properties include the adjacency condition: for two consecutive fractions \frac{a}{b} and \frac{c}{d} in F_n, bc - ad = 1, ensuring they are "Farey neighbors." The mediant \frac{a+c}{b+d} of such neighbors is the first new fraction to appear between them in F_{b+d}, and it is already in lowest terms. The number of terms in F_n is given by |F_n| = 1 + \sum_{k=1}^n \phi(k), where \phi is , with asymptotic growth |F_n| \sim \frac{3n^2}{\pi^2}. Sequences can be generated recursively by inserting mediants into F_{n-1} for denominators up to n. Farey sequences find applications in Diophantine approximation, where they identify best rational approximations to irrationals, such as Dirichlet's theorem that for any real \xi, there are infinitely many \frac{a}{b} with |\xi - \frac{a}{b}| < \frac{1}{b^2}. They connect to Ford circles, which visualize tangencies corresponding to adjacency, and to the Stern-Brocot tree for enumerating positives rationals. Advanced uses include links to the Riemann Hypothesis via the Franel-Landau theorem on discrepancies in Farey fractions, and practical roles in gear ratios for clock-making.

Definition and Examples

Definition

A Farey sequence of order n, denoted F_n, is the sequence of all completely reduced fractions between 0 and 1, inclusive, whose denominators are at most n, arranged in order of increasing value. A fraction a/b is completely reduced if \gcd(a, b) = 1, with $0 \leq a \leq b \leq n and b > 0. This includes the boundary fractions $0/1 and $1/1. Formally, F_n = \left\{ \frac{h}{k} \;\middle|\; 0 \leq h \leq k \leq n,\ \gcd(h,k)=1 \right\}, where the elements are sorted by their numerical value. Farey sequences arise in the study of , providing a systematic way to enumerate rational approximations to real numbers with bounded denominators.

Examples

The Farey sequence of order 1, denoted F_1, consists of the fractions \frac{0}{1} and \frac{1}{1}. For order 2, F_2 includes \frac{0}{1}, \frac{1}{2}, \frac{1}{1}. The sequence for order 3 is F_3 = \left\{ \frac{0}{1}, \frac{1}{3}, \frac{1}{2}, \frac{2}{3}, \frac{1}{1} \right\}. Order 4 yields F_4 = \left\{ \frac{0}{1}, \frac{1}{4}, \frac{1}{3}, \frac{1}{2}, \frac{2}{3}, \frac{3}{4}, \frac{1}{1} \right\}. Finally, for order 5, F_5 = \left\{ \frac{0}{1}, \frac{1}{5}, \frac{1}{4}, \frac{1}{3}, \frac{2}{5}, \frac{1}{2}, \frac{3}{5}, \frac{2}{3}, \frac{3}{4}, \frac{4}{5}, \frac{1}{1} \right\}. These examples illustrate that each Farey sequence F_n is a of F_{n+1}, with the higher-order sequence formed by inserting additional reduced whose denominators equal n+1 between existing terms of F_n. A radial known as the Farey represents in F_n as rays emanating from the origin in the plane, where each ray corresponds to the point (q, p) for a fraction \frac{p}{q} (with p a non-negative and q a positive , coprime, $0 \leq p \leq q \leq n), positioning the rays at angles \theta = \arctan\left( \frac{p}{q} \right). This arrangement highlights the nested structure across orders, as higher-order sunbursts incorporate all rays from lower orders while adding new ones that fill gaps angularly.

History

Early Discovery

The Farey sequence was first discovered by the French geometer Charles Haros in 1802. In his publication "Tables pour évaluer une ordinaire avec autant de décimales qu'on voudra ; et pour trouver la ordinaire la plus simple, et qui approche le plus d'une décimale," Haros described a systematic arrangement of irreducible fractions between 0 and 1, ordered by increasing magnitude and limited to denominators up to 99, as a means to identify optimal rational approximations to values. This construction provided a practical tool for converting and simplifying fractions in computational settings. Haros developed these sequences in the context of his work at the Bureau du Cadastre de , where he contributed to the creation of comprehensive logarithmic and trigonometric tables essential for the land registry project. These tables required precise decimal representations of fractions to support accurate calculations in , , and the emerging , highlighting the applied focus of Haros's approach. This discovery occurred amid a vibrant era in early 19th-century French mathematics, characterized by rapid progress in number theory and approximation theory, driven by the need for reliable numerical methods in scientific and administrative reforms following the Revolution. Haros's sequences exemplified how theoretical insights into rational numbers could address practical challenges in approximation, laying groundwork for later advancements in the field. These ideas were independently rediscovered and further disseminated by John Farey in 1816.

Naming and Development

John Farey Sr., a British geologist and land surveyor, popularized the sequences now bearing his name in a 1816 letter published in the under the title "On a curious property of vulgar fractions." In this note, Farey described arrangements of reduced fractions between 0 and 1 with denominators up to a fixed maximum, arranged in increasing order of their values, highlighting their systematic properties without asserting originality and instead soliciting proofs from the mathematical community. In August 1816, Augustin Cauchy provided a rigorous proof of the key properties, including the mediant rule for consecutive terms. Farey's engagement with these sequences stemmed from his practical pursuits in and , where rational approximations facilitated precise calculations in engineering contexts such as land measurement and mineralogical tabulations. Subsequent developments saw increased mathematical scrutiny, with the connection between the sequences' cardinality and dating back to at least 1751, when Thomas Flitcroft used it to compute the number of terms in F_{99} as 3003, formalizing their role in enumerative . By the mid-20th century, Farey sequences had evolved into a foundational tool in , notably contributing to approximations in the distribution of primes and equivalents to the via the Franel-Landau theorem.

Fundamental Properties

Sequence Length and Fraction Index

The length of the Farey sequence of order n, denoted |F_n|, counts the total number of distinct irreducible fractions between 0 and 1 (inclusive) with denominators at most n. This cardinality is given by the exact formula |F_n| = 1 + \sum_{k=1}^n \phi(k), where \phi(k) denotes , which counts the number of positive integers up to k that are coprime to k. The derivation follows from partitioning the fractions by their denominator. The sequence F_n consists of the fraction $0/1 together with all irreducible fractions a/b where $1 \leq b \leq n, $1 \leq a \leq b, and \gcd(a, b) = 1. For each fixed denominator b, the number of such numerators a is precisely \phi(b), since there are \phi(b) integers from 1 to b coprime to b. The term $1/1 is included in the sum for b=1 (where \phi(1) = 1), while the additional 1 accounts for $0/1. Thus, the total length is the stated sum. As n \to \infty, the length admits the asymptotic approximation |F_n| \sim \frac{3n^2}{\pi^2}, with an error term of O(n \log n). This follows directly from the corresponding asymptotic for the partial sum of the totient function, \sum_{k=1}^n \phi(k) \sim \frac{3n^2}{\pi^2}, which arises from the Dirichlet series representation \sum_{k=1}^\infty \phi(k)/k^s = 1/\zeta(s-1) for \Re(s) > 2 and analytic continuation techniques. The index of an irreducible fraction a/b in F_n (with \gcd(a, b) = 1, $0 < a < b \leq n) is defined as its position in the sequence, starting with index 1 for $0/1. Equivalently, the index is $1 plus the number of irreducible fractions p/q \in F_n (with q \leq n) satisfying p/q < a/b. To derive this index, count the qualifying fractions by denominator: for each q = 1 to n, determine the number of numerators p with $0 \leq p \leq q, \gcd(p, q) = 1, and p/q < a/b (i.e., p < q \cdot (a/b)). This count for fixed q is the partial totient sum up to \lfloor q a / b - \epsilon \rfloor, where \epsilon > 0 ensures the strict inequality. Using inversion to detect coprimality, \sum_{p=1}^m [\gcd(p, q) = 1] = \sum_{d \mid q} \mu(d) \lfloor m / d \rfloor, where \mu is the , the index can be expressed as a double sum over denominators and divisors involving floor functions and \mu. Explicit analytical formulas for this index, reducing the computational order through rearrangements of these sums, have been derived using properties of the totient summatory function \Phi(x) = \sum_{j=1}^{\lfloor x \rfloor} \phi(j) and local discrepancy terms. For example, in F_3 = \{0/1, 1/3, 1/2, 2/3, 1/1\}, the fraction $1/2 has index 3, as there are two fractions less than $1/2 ($0/1 and $1/3). Such positions enable efficient indexing without generating the full sequence.

Farey Neighbors and Mediants

In a Farey sequence F_n, two consecutive fractions \frac{a}{b} and \frac{c}{d} (with a/b < c/d, both in lowest terms, and denominators at most n) are termed Farey neighbors if they satisfy the condition bc - ad = 1. This determinant condition ensures that no other reduced fraction with denominator at most n lies between them. A key property of Farey neighbors is their persistence across higher-order sequences: if \frac{a}{b} and \frac{c}{d} are neighbors in F_n, they remain consecutive (and thus neighbors) in all F_m for m \geq n until the order reaches b + d, at which point they are separated. This stability arises because the condition bc - ad = 1 prevents intermediate fractions from appearing until the mediant is introduced. The mediant of two fractions \frac{a}{b} and \frac{c}{d} is defined as \frac{a+c}{b+d}, which always lies strictly between them: \frac{a}{b} < \frac{a+c}{b+d} < \frac{c}{d}. For Farey neighbors satisfying bc - ad = 1, this mediant is the first fraction to appear between them in a higher-order sequence, specifically in F_{b+d}, and it inherits the neighbor relation with each parent: b(a+c) - a(b+d) = 1 and d(a+c) - c(b+d) = 1. This neighbor condition is unique to consecutive pairs in any Farey sequence: every pair of adjacent terms in F_n satisfies bc - ad = 1, and conversely, any two reduced fractions with bc - ad = 1 are adjacent in the Farey sequence of order \max(b, d). Moreover, the mediant operation provides a recursive method to generate Farey sequences: starting from F_1 = \{ 0/1, 1/1 \}, higher orders are obtained by inserting the mediant between each pair of neighbors in the previous sequence whenever the sum of their denominators does not exceed the new order.

Arithmetic Connections

Relation to Continued Fractions

A fundamental link between Farey sequences and continued fractions is encapsulated in the theorem that two reduced fractions \frac{a}{b} and \frac{c}{d} (with a, b, c, d > 0) are Farey neighbors if and only if they appear as consecutive convergents in the continued fraction expansion of some . This equivalence highlights how the structure of Farey sequences captures the hierarchical approximations inherent in s, where convergents provide optimal rational approximations to real numbers. The connection emerges naturally from the algorithm, which generates convergents by iteratively applying the to the numerator and denominator. In this process, successive convergents trace a path through the Farey diagram, with each pair of consecutive convergents (or a convergent and an adjacent semi-convergent) satisfying the condition |ad - bc| = 1. Semi-convergents, formed as weighted mediants of consecutive convergents (e.g., k \cdot \frac{p_n}{q_n} + \frac{p_{n+1}}{q_{n+1}} for integer k \geq 1), fill intermediate positions and also align with Farey relations, ensuring that the algorithm's approximations respect the of the Farey . An important property follows for the mediant of Farey neighbors: the continued fraction expansion of the mediant \frac{a+c}{b+d} alternates between the expansions of \frac{a}{b} and \frac{c}{d} after their shared initial partial quotients. This interleaving reflects the dual approximation roles of the neighbors, with the mediant's expansion combining their tails in an alternating fashion. For example, consider the Farey neighbors \frac{1}{2} = [0; 2] and \frac{1}{1} = [0; 1]. Their mediant is \frac{2}{3} = [0; 1, 2], where the expansion begins with the common prefix [0; ] and then alternates the remaining quotients 1 from \frac{1}{1} and 2 from \frac{1}{2}. This pattern underscores how mediants bridge the approximations provided by continued fractions of neighboring fractions. In Farey sequences, the adjacency of two fractions \frac{a}{b} and \frac{c}{d} (with a/b < c/d, both in lowest terms, and denominators at most n) in F_n is characterized by the condition bc - ad = 1 and b + d > n. This implies that the denominators b and d are coprime, i.e., \gcd(b, d) = 1, because any common of b and d would divide bc - ad = 1. The mediant of such adjacent fractions, \frac{a+c}{b+d}, has denominator b + d, which satisfies b + d \geq n + 1, with equality holding precisely when this is the next fraction inserted between them in F_{n+1}. For non-adjacent fractions \frac{a}{b} and \frac{c}{d} in F_n, the quantity k = |bc - ad| > 1 defines the Farey distance, and the number of fractions between them is k - 1; moreover, \gcd(b, d) divides k, generalizing the coprimality condition for neighbors. The least common multiple of the denominators b and d for adjacent pairs follows directly from the coprimality: \operatorname{lcm}(b, d) = bd / \gcd(b, d) = bd. This relation underscores the maximal separation in the arithmetic structure of neighbors. A key identity arises from the differences between adjacent fractions: \frac{c}{d} - \frac{a}{b} = \frac{1}{bd}, so the sum over all adjacent pairs in F_n of $1/(bd) equals 1, as these differences telescope to cover the interval [0, 1].

Geometric Interpretations

Ford Circles

Ford circles provide a geometric representation of rational numbers and Farey sequences in the upper half-plane. For a reduced \frac{p}{q} where p and q are coprime positive integers, the corresponding Ford circle is defined as the circle tangent to the x-axis at \left( \frac{p}{q}, 0 \right), with center at \left( \frac{p}{q}, \frac{1}{2q^2} \right) and radius \frac{1}{2q^2}. This construction was introduced by in to visualize the actions of the on families of circles tangent to the real axis at rational points. A key property is that two distinct Ford circles for fractions \frac{a}{b} and \frac{c}{d} (in lowest terms) are tangent if and only if |ad - bc| = 1, which is precisely the condition for \frac{a}{b} and \frac{c}{d} to be neighbors in some Farey sequence; the tangency is internal when they appear consecutively in the same sequence. Moreover, any two Ford circles are either or disjoint, ensuring no overlaps. The Ford circles associated with the fractions in the Farey sequence F_n form a packing in the region above the x-axis up to height \frac{1}{2n^2}, where they touch the x-axis and each other according to the neighbor relations, offering a visual illustration of the sequence's structure.

Equivalent-Area Interpretation

In the equivalent-area interpretation of Farey sequences, each reduced fraction \frac{a}{b} between 0 and 1 is associated with the line segment from the origin (0,0) to the lattice point (b, a) in the plane, where the slope of this segment is precisely \frac{a}{b}. Similarly, another fraction \frac{c}{d} corresponds to the segment from (0,0) to (d, c). Two such fractions are neighbors in a Farey sequence if and only if the triangle formed by the points (0,0), (b, a), and (d, c) has an area of exactly \frac{1}{2}. This area condition reflects the primitive nature of the parallelogram spanned by the vectors \overrightarrow{(0,0)(b,a)} = (b, a) and \overrightarrow{(0,0)(d,c)} = (d, c), which has area 1 and contains no other lattice points inside or on its boundary except the vertices. The area of this is given by the \frac{1}{2} | b c - a d |, derived from the of the matrix formed by the vectors (b, a) and (d, c). For neighboring fractions, the condition |b c - a d| = [1](/page/1) holds, yielding a triangle area of \frac{1}{2}. This value implies that the vectors (b, a) and (d, c) form a basis for the \mathbb{Z}^2, as their is the fundamental domain with minimal area, ensuring no intermediate lattice points lie strictly inside the . Geometrically, this basis property guarantees that \frac{a}{b} and \frac{c}{d} are adjacent without any other reduced fraction between them in the relevant Farey sequence. For non-neighboring fractions, the |b c - a d| > 1, resulting in a triangle area greater than \frac{1}{2}. This larger area corresponds to the presence of intermediate points within the , each of which represents a reduced that lies between \frac{a}{b} and \frac{c}{d} in the Farey sequence. The number of such intermediate fractions is directly related to the value of |b c - a d| - 1, providing a measure of their separation. This interpretation is visualized through the , where the triangle's boundary consists of three lattice points (the vertices), and the absence of interior points for neighbors is confirmed via : the area A = I + \frac{B}{2} - 1, with interior points I = 0 and boundary points B = 3, yielding A = \frac{1}{2}. For larger areas, I > 0, accounting for the enclosed lattice points that correspond to intervening fractions, thus offering a lattice-based geometric proof of Farey neighbor properties.

Algorithms and Computations

Generating the Next Term

The Farey sequence of order n, denoted F_n, can be constructed recursively by starting with the initial sequence F_1 = \left\{ \frac{0}{1}, \frac{1}{1} \right\} and iteratively inserting mediants between adjacent fractions. For two neighboring fractions \frac{a}{b} and \frac{c}{d} in F_k (with k \leq n), the mediant \frac{a+c}{b+d} is the next fraction to appear between them, specifically in F_{b+d}, provided b+d \leq n. This property ensures that all irreducible fractions with denominators up to n are generated in increasing order without duplicates, as the mediant of two adjacent Farey fractions is always in lowest terms. To generate the full F_n, begin with the list containing \frac{0}{1} and \frac{1}{1}. Then, traverse the current list of adjacent pairs and insert the between each pair \frac{a}{b}, \frac{c}{d} if b + d \leq n. Newly inserted fractions create additional pairs for further insertions in subsequent iterations. This process continues until no more can be added (i.e., for all adjacent pairs, b + d > n). The mediant operation itself requires time, as it involves simple addition of numerators and denominators followed by if necessary (though is typically not needed due to the adjacency property). Here is a step-by-step outline of the algorithm:
  1. Initialize a list L with \left[ \frac{0}{1}, \frac{1}{1} \right].
  2. While changes occur:
  3. The final L is F_n.
This approach can be implemented efficiently using a doubly-linked list or deque to achieve amortized O(1) time per insertion, resulting in O(1) work per fraction generated. Since |F_n| is asymptotically \frac{3n^2}{\pi^2}, the total is O(n^2). The iterative mediant insertions mirror the structure of the Stern-Brocot tree, where Farey sequences correspond to horizontal levels (or subtrees) pruned at depth related to n, generated by repeatedly taking s from the root pair \frac{0}{1} and \frac{1}{1}. In the tree, every rational appears exactly once, and the Farey construction selects those with denominator sums not exceeding n.

Efficient Construction Methods

One straightforward method to construct the Farey sequence of order n, denoted F_n, is to enumerate all pairs (a, b) satisfying $1 \leq b \leq n, $0 \leq a \leq b, and \gcd(a, b) = 1, collect the corresponding reduced fractions a/b, and sort them in increasing order. This generates all irreducible fractions between and with denominators at most n, ensuring the sequence is complete and ordered. To optimize coprimality checks in this enumeration, one can employ modular inverses: for each pair (a, b), attempt to compute the modular inverse of a modulo b using the ; success confirms \gcd(a, b) = 1. Alternatively, the Farey neighbor test—leveraging the property that consecutive fractions p/q and r/s in a Farey sequence satisfy ps - qr = 1—can verify irreducibility during generation, though it is more typically used post-enumeration. These approaches maintain efficiency for the \gcd computations, which are logarithmic in b. The overall of this direct method is O(n^2 \log n), arising from O(n^2) pairs and the resulting \Theta(n^2) fractions. A more efficient recursive method builds F_n incrementally from F_{n-1} using mediants. Start with the known sequence F_{n-1} and traverse consecutive pairs of fractions h/k and h'/k' (where k h' - k' h = 1). For each such pair, compute the mediant (h + h') / (k + k'); if the denominator k + k' \leq n, insert this new between them, as the neighbor property guarantees \gcd(h + h', k + k') = 1. This adds exactly \phi(n) new terms, where \phi is . Implementing the traversal and insertions via a allows constant-time modifications per operation, yielding a total of O(|F_n|), or O(n^2) asymptotically. Advanced variants incorporate sieve-like techniques to precompute totient values \phi(d) for d \leq n in O(n \log \log n) time, aiding in allocating space for new fractions per denominator during recursive builds or direct . This enables overall generation in O(n^2) time for large n, though practical implementations often achieve near-O(n^2) performance with optimized gcd checks. Such methods are particularly useful for applications requiring repeated sequence computations up to varying orders.

Applications and Advanced Topics

Number Theory Applications

Farey sequences play a central role in , providing the optimal rational approximations to s under denominator constraints. Specifically, for an x, the best rational approximation p/q with q \leq n minimizes |x - p/q|, and such approximations are found among consecutive terms in the Farey sequence of order n. If a/b and c/d are consecutive in the Farey sequence F_n, then for any x between them, |x - a/b| < 1/(2b^2) or |x - c/d| < 1/(2d^2), establishing a bound on the approximation quality. This property stems from the mediant construction, where the mediant (a+c)/(b+d) of consecutive fractions is the next best approximation. The connection extends to Hurwitz's theorem, which states that for any irrational x, there are infinitely many rationals p/q satisfying |x - p/q| < 1/(\sqrt{5} q^2), with equality achieved for the , and Farey sequences help enumerate these via successive approximations. These tools are foundational in metric Diophantine approximation, quantifying how well irrationals can be approximated on average. Farey sequences are intimately linked to the modular group \mathrm{SL}(2, \mathbb{Z}), whose action on the upper half-plane generates the , a complete tiling of the hyperbolic plane by ideal triangles. The tessellation consists of triangles with vertices at rational points on the real line (including infinity), where adjacent rationals p/q and r/s satisfy |ps - rq| = 1, and the edges are hyperbolic geodesics (semicircles orthogonal to the real axis). This structure serves as a fundamental domain for \mathrm{SL}(2, \mathbb{Z}), meaning the group's translates cover the hyperbolic plane without interior overlaps, facilitating the study of modular forms and automorphic representations. The Farey tessellation arises from the action of \mathrm{SL}(2, \mathbb{Z}) on the basic ideal triangle with vertices 0, 1, and \infty, producing a triangulation whose symmetries encode continued fraction expansions and quadratic irrationals. This geometric framework visualizes the modular group's orbits and is essential for understanding cusp forms and the topology of the modular surface. In cryptography, particularly lattice-based schemes, Farey fractions facilitate rational reconstruction algorithms that recover exact rational solutions from approximate or modular data. These algorithms, often integrated with lattice reduction techniques like , use the Farey map to uniquely reconstruct a rational p/q from its modular image modulo a bound N, provided |p/q| < 1/2 and q < \sqrt{N}. This process is crucial in attacking or implementing protocols reliant on short vectors, such as in or learning with errors () variants, where distinguishing lattice points from noise involves approximating small ratios. The Farey-based method ensures bijectivity under suitable bounds, enhancing efficiency in post-quantum cryptographic primitives. Farey sequences also aid in counting lattice points visible from the origin, corresponding to primitive vectors (p, q) with \gcd(p, q) = 1 and q \leq n, whose slopes p/q form the Farey sequence F_n. The rank function, counting fractions in F_n less than a given x, equates to enumerating such visible points in the triangle with vertices (0,0), (n,0), and (n, xn), solving visibility problems in integer lattices. Algorithms exploiting this equivalence achieve sublinear time complexity, such as O(n^{2/3} \log^{1/3} n), with applications to and .

Connection to Riemann Hypothesis

The connection between Farey sequences and the Riemann hypothesis arises primarily through the distribution and spacing statistics of Farey fractions, which provide a deterministic analog to the behavior of the non-trivial zeros of the Riemann zeta function on the critical line. In 1973, Hugh Montgomery formulated the pair correlation conjecture, positing that the normalized spacings between consecutive non-trivial zeros of the zeta function exhibit the same pair correlation function as the eigenvalues of large random Hermitian matrices from the (GUE) in . Specifically, for zeros \gamma_n ordered by increasing imaginary part, the pair correlation measure for spacings (\gamma_{n+\ell} - \gamma_n)/(\gamma_{n+1} - \gamma_n) (normalized to mean spacing 1) is conjectured to approach \int_0^\infty (1 - \left(\frac{\sin \pi x}{\pi x}\right)^2 + \frac{\min(2\pi x, 1)}{\pi x}) \rho(dx), where \rho is the GUE density. This conjecture assumes the Riemann hypothesis and links the "level repulsion" observed in zeta zero spacings to universal random matrix statistics. A striking aspect of this conjecture is its relation to Farey sequences, where the fractional parts of Farey fractions modulo 1 serve as a classical, deterministic model mimicking the GUE pair correlation for zeta zero spacings. The spacings between consecutive terms in the Farey sequence of order Q, given by |\alpha - \beta| = 1/(q q') for adjacent fractions a/q, b/q', when suitably normalized by the local density \approx 3Q/\pi^2, yield a pair correlation function that converges to the same GUE form as Q \to \infty. Boca et al. explicitly computed this limiting pair correlation for the full Farey sequence, confirming the measure g_2(\lambda) = \delta_0(\lambda) + 1 - \left(\frac{\sin \pi \lambda}{\pi \lambda}\right)^2 + \int_0^1 K(t) dt, where K captures the diagonal contribution, aligning precisely with Montgomery's predicted form for zeta zeros. Historical context for this equivalence dates to the 1990s, when Rudnick and Sarnak established GUE correlations for low-lying zeros under RH, with the leading constant in the pair correlation (determined by the quadratic growth \Phi(Q) \sim 3Q^2 / \pi^2 of the sequence length) matching the Farey statistics and supporting the conjectured universality. An explicit formula further ties the distribution of Farey points to the argument of the zeta function on the critical line, via the classical Franel-Landau theorem. This theorem states that the Riemann hypothesis is equivalent to the bound \sum_{\nu=1}^{\Phi(x)} \left| \{\nu / \Phi(x)\} - \alpha_\nu \right| = O(x^{1/2 + \epsilon}) for any \epsilon > 0, where \alpha_\nu are the ordered Farey fractions of order x and \{\cdot\} denotes the distance to the nearest integer. This discrepancy measures how closely the Farey points approximate uniform distribution in [0,1]; under RH, the error reflects the oscillation of \arg \zeta(1/2 + it), whose growth is controlled by the zero-free regions. The underlying explicit relation arises from the Franel identity, expressing sums over Farey points (e.g., \sum (\alpha_\nu - 1/2)^2 \approx (1/12) \log x / \pi^2 + C) in terms of Dirichlet series linked to \zeta(s), with the error term directly incorporating contributions from zeta zeros via the explicit formula for the argument S(T) = \frac{1}{\pi} \arg \zeta(1/2 + iT) = O(\log T / \log \log T). Numerical evidence strongly supports these connections, with simulations demonstrating that zeta zero spacings follow the GUE (and thus Farey-like) model to high precision. Odlyzko's computations of the first $10^5 to $10^{20} zeros show pair correlations deviating from the conjecture by less than 1% at heights up to T = 10^{22}, with small spacings exhibiting the characteristic (\sin \pi x / \pi x)^2 repulsion predicted by both GUE and Farey statistics. Similar simulations for Farey sequences of order up to Q = 10^7 confirm the matching distribution, providing empirical validation for the conjectured universality under the .

Sums and Identities Involving Farey Fractions

One notable identity for Farey sequences involves the sum of the reciprocals of the denominators. For the Farey sequence F_n, this sum is \sum_{\frac{a}{b} \in F_n} \frac{1}{b} = \sum_{k=1}^n \frac{\phi(k)}{k}, where \phi is . This equality holds because, for each fixed denominator k \le n, there are exactly \phi(k) fractions in F_n with that denominator, each contributing \frac{1}{k} to the sum. The asymptotic behavior of this is \sum_{k=1}^n \frac{\phi(k)}{k} = \frac{6n}{\pi^2} + O(\log n), reflecting the average value of \phi(k)/k \approx 6/\pi^2. Another important concerns the of the reciprocals of the squares of the denominators in F_n: \sum_{\frac{a}{b} \in F_n} \frac{1}{b^2} = \sum_{k=1}^n \frac{\phi(k)}{k^2}. This admits the \sum_{k=1}^n \frac{\phi(k)}{k^2} = \frac{6}{\pi^2} \log n + c + O\left(\frac{1}{n}\right), where the constant c = 2\gamma - \frac{\zeta'(2)}{\zeta(2)} - \sum_p \frac{\log p}{p(p-1)} links to the via \zeta(2) = \pi^2/6, with \gamma the Euler-Mascheroni constant. The divergent nature of the infinite sum as n \to \infty underscores the harmonic-like growth, but the leading term connects directly to the . Generating functions for sums over Farey fractions often take the form of . For example, consider sums of the type \sum_{a/q \in F_Q} f(a/q) w(q), where f is a on and w(q) is a weight on denominators. Using properties of Dedekind sums, such sums can be expressed in closed form; when w(q) = \chi(q) for a \chi, the result extends to values of Dirichlet L-functions L(s, \chi). This connection arises from the structure of the Farey sequence as an enumeration of reduced and the convolution properties of arithmetic functions. Advanced identities include moments of differences between neighboring fractions. For consecutive fractions \frac{a}{b}, \frac{c}{d} \in F_n, the difference satisfies \left| \frac{a}{b} - \frac{c}{d} \right| = \frac{1}{bd}, so the second moment is \sum \left( \frac{a}{b} - \frac{c}{d} \right)^2 = \sum \frac{1}{(bd)^2}, taken over all neighboring pairs in F_n. This Franel-type sum has the asymptotic \sum \frac{1}{(bd)^2} = \frac{12 \log n}{\pi^2 n^2} + O\left( \frac{\log n}{n^2} \right), derived from properties of functions and evaluations. The leading term highlights the small contribution from large spacings in the distribution of Farey neighbors.

References

  1. [1]
    [PDF] The Farey Sequence and Its Niche(s)
    May 12, 2016 · Abstract: Discovered by Haros in 1802, but named after a geologist 14 years later the properties of the Farey sequence remain a useful tool ...
  2. [2]
    [PDF] Farey Sequences, Ford Circles and Pick's Theorem
    Jul 10, 2006 · Farey was not able to prove this but prolific. French mathematician Augustin Cauchy (1789-1857) was able to provide a proof in 1816 published in ...Missing: definition | Show results with:definition
  3. [3]
    [PDF] The Farey Sequence - School of Mathematics
    Mar 15, 2012 · The Farey sequence (of counting fractions) has been of interest to modern math- ematicians since the 18th century.
  4. [4]
    [PDF] arXiv:2005.04429v2 [math.NT] 19 Dec 2020
    Dec 19, 2020 · Given a positive integer n, the Farey sequence Fn is the set of rational numbers a/b with 0 ≤ a ≤ b ≤ n and (a, b) = 1. Throughout this paper, ...
  5. [5]
    [PDF] Order Statistics in the Farey Sequences in Sublinear Time and ...
    Aug 3, 2008 · The Farey sequence of order n (denoted Fn) is the increasing ... | 0 ≤ a ≤ b ≤ n}. Farey sequences have numerous interesting ...
  6. [6]
    [PDF] The Farey Sequence, Stern-Brocot Tree and Euclid's Theorem - arXiv
    Nov 12, 2020 · b∈ Q, 0 ≤ a ≤ b ≤ n}. Example 1.1. F1 = 0. 1 ... 3 and show that we can proof the gcd theorem using the Farey's sequence in section 4.
  7. [7]
    A note on Farey fractions with odd denominators - ScienceDirect
    Farey fractions have been studied in the past mainly for two reasons. First, they are important in the field of diophantine approximation.Missing: sequence | Show results with:sequence
  8. [8]
    FareySunburst | Wolfram Function Repository
    A Farey sunburst is constructed by using the numerators and denominators of the Farey sequence and interpreting those pairs as coordinates.
  9. [9]
    [PDF] arXiv:0909.4006v5 [math.NT] 23 Mar 2011
    Mar 23, 2011 · generating the sequence of Farey sequences may be used to describe properties of. Farey sequences as a function of the order of the sequence.
  10. [10]
    [PDF] Farey - School of Mathematics
    Sep 6, 2010 · Webb shows that many of the familiar Farey sequence properties hold and he ... history of the Farey sequence that has become the canonical ...<|separator|>
  11. [11]
    [PDF] The great logarithmic and trigonometric tables of the French Cadastre
    Jan 11, 2011 · d'une fraction décimale,” Journal de l'Ecole Polytechnique 4(11) ... Charles Haros). Fi- nally, this division had a second section made ...
  12. [12]
    John Farey (1766 - 1826) - Biography - MacTutor
    John Farey was an Engish geologist, noted as a mathematician for the Farey ... John Farey Jnr (1791-1851) went on to become a civil engineer and also ...Missing: Sr. | Show results with:Sr.
  13. [13]
    Farey Series. A story - Interactive Mathematics Miscellany and Puzzles
    Farey sequence (of order n) (C.Haros, 1802; J.Farey, 1816) The finite ... John Farey was a somewhat versatile man who lived in the Napoleonic era. He ...
  14. [14]
  15. [15]
  16. [16]
  17. [17]
    Farey Sequence -- from Wolfram MathWorld
    The Farey sequence for any positive integer is the set of irreducible rational numbers with and arranged in increasing order. The first few are. (1)
  18. [18]
    Geodesic Continued Fractions - Project Euclid
    Then C1, ..., Cn, with Cn = x, are the consecutive convergents of some ICF expansion of x if and only if ... and since ∞ and bk+1 are Farey neighbors, so are Ck ...
  19. [19]
    [PDF] Topology of Numbers - Cornell Mathematics
    Farey Series. Chapter 2. Continued Fractions ... Theorem. Our goal will be a formula that gives them all. The ancient Greeks knew such a formula, and even ...
  20. [20]
    [PDF] Lecture 3 - Math 4527 (Number Theory 2)
    Definition. The Farey sequence of level n is the set of rational numbers between 0 and 1 whose denominators (in lowest terms) are ≤ n, arranged in increasing ...
  21. [21]
    [PDF] Fractions Author(s): L. R. Ford Source - School of Mathematics
    Farey's series. Let a curve be drawn across the set of circles that we have just defined. We start with a point Ao of the upper half-plane ...Missing: Lester | Show results with:Lester
  22. [22]
    k-Moments of distances between centers of Ford circles
    Any two Ford circles are either disjoint or tangent to each other. In the present paper, we study a question concerning the distribution of Ford circles.
  23. [23]
    [PDF] Farey series and Pick's area theorem - School of Mathematics
    increasing order, is called the Farey sequence of order n, In ... 11 And presumably did not do so either in the "lecture" referred to by. Hardy and Wright.
  24. [24]
    The Stern-Brocot Tree and Farey Sequences - CP-Algorithms
    Apr 15, 2025 · The sequences are named after English geologist John Farey, who in 1816 conjectured that any fraction in a Farey sequence is the mediant of its ...<|control11|><|separator|>
  25. [25]
    Stern-Brocot Tree -- from Wolfram MathWorld
    The result can be arranged in tree form as illustrated above. The Farey sequence F_n defines a subtree of the Stern-Brocot tree obtained by pruning off ...Missing: connection | Show results with:connection
  26. [26]
    On the Farey sequence and its augmentation for applications to ...
    Sep 25, 2017 · PDF | We introduce a novel concept of the augmented Farey table (AFT). Its purpose is to store the ranks of fractions of a Farey sequence in ...
  27. [27]
    Formulas and algorithms for the length of a Farey sequence - Nature
    Nov 15, 2021 · Increasing the value of n only adds new elements to the Farey sequence without removing any of them. That is, F_{n-1} is a subsequence of F_n.
  28. [28]
    [PDF] Diophantine Approximation Using Farey Sequences | NHSJS
    Sep 9, 2024 · In this paper, we investigate the ties between Farey Sequences and Diophantine Approximation. ... satisfying the Markov Diophantine Equation.Missing: motivation | Show results with:motivation
  29. [29]
    [PDF] Introduction to the Theory of Numbers
    Nov 21, 2014 · The title is the same as that of a very well-known book by Professor L. E. Dickson (with which ours has little in common).
  30. [30]
    [PDF] Continued Fractions and Hyperbolic Geometry - University of Warwick
    Fractions p/q, r/s ∈ Q are called neighbours if |ps − rq| = 1. Their Farey sum, denoted p/q ⊕F r/s, is defined to be (p + r)/(q + s).
  31. [31]
    [PDF] The LLL Algorithm | Ionica Smeets
    ... Farey disk Fa.a;c;t/ is a disk of center .a=c; 0/ and radius t=c. Finally ... rational reconstruction.” Theorem 11. Let Q be a positive integer and x ...
  32. [32]
    [PDF] Farey Statistics in Time n2/3 and Counting Primitive Lattice Points in ...
    Nov 2, 2007 · We observe that computing Rank(x, n) in the Farey sequence is equivalent to couting primitive lattice points inside the right triangle defined ...Missing: interpretation | Show results with:interpretation
  33. [33]
  34. [34]
    Totient summatory function - Wikipedia
    It is the number of ordered pairs of coprime integers (p,q), where 1 ≤ p ≤ q ≤ n. The first few values are 0, 1, 2, 4, 6, 10, 12, 18, 22, 28, 32, ..
  35. [35]
    Some sums involving Farey fractions I - Project Euclid
    Introduction. It is our aim in this paper to give some refinements of theorems proved by. Hall [6] and the first author [9] on some sums involving Farey ...
  36. [36]
    Identities involving Farey fractions | Proceedings of the Steklov ...
    Apr 26, 2012 · We give a proof using Dedekind sums that allows weights w(q). Taking w(q) = χ(q) we find an extension to Dirichlet L-functions. Article PDF ...
  37. [37]
    Some sums involving Farey fractions II - Project Euclid
    Franel's sum s2,0 has been considered by several authors, the initiator being Franel, whose theorem (see Formula (14) above) is based on the Franel identity, ...