In mathematics, the Farey sequence of order n is the sequence of completely reduced fractions which have denominators less than or equal to n, arranged in order of increasing size. Some authors restrict the fractions to the interval between 0 and 1. A Farey sequence is sometimes called a Farey series, although the terms are not summed.
Examples The first eight Farey sequences are:
F1={01,11},F2={01,12,11},F3={01,13,12,23,11},F4={01,14,13,12,23,34,11},F5={01,15,14,13,25,12,35,23,34,45,11},F6={01,16,15,14,13,25,12,35,23,34,45,56,11},F7={01,17,16,15,14,27,13,25,37,12,47,35,23,57,34,45,56,67,11},F8={01,18,17,16,15,14,27,13,38,25,37,12,47,35,58,23,57,34,45,56,67,78,11}.
Farey sunburst
Plotting the numerators versus the denominators of a Farey sequence gives a shape like the one to the right, shown for F6. Reflecting this shape around the diagonal and main axes generates the Farey sunburst, shown below. The Farey sunburst of order n connects the visible integer grid points from the origin in the square of side 2n, centered at the origin. By Pick's theorem, the area of the sunburst is 4|Fn|−4, where |Fn| is the number of fractions in Fn.
History The history of 'Farey series' is very curious — Hardy & Wright (1979) ... once again the man whose name was given to a mathematical relation was not the original discoverer so far as the records go. — Beiler (1964) Farey sequences are named after the British geologist John Farey, Sr., whose letter about these sequences was published in the Philosophical Magazine in 1816. Farey conjectured, without offering proof, that each new term in a Farey sequence expansion is the mediant of its neighbours. Farey's letter was read by Cauchy, who provided a proof in his Exercices de mathématique, and attributed this result to Farey. In fact, another mathematician, Charles Haros, had published similar results in 1802 which were not known either to Farey or to Cauchy. Thus it was a historical accident that linked Farey's name with these sequences.
Properties
Sequence length and index of a fraction The Farey sequence of order n contains all of the members of the Farey sequences of lower orders. In particular, Fn contains all of the members of Fn−1 and also contains an additional fraction for each number that is less than n and coprime to n. For example, F6 consists of F5 together with the fractions 16 and 56. The middle term of a Farey sequence Fn is always 12 for n>1. From this, we can relate the lengths of Fn and Fn−1 using Euler's totient function φ: |Fn|=|Fn−1|+φ(n). Using the fact that |F1|=2, we can derive an expression for the length of Fn: |Fn|=1+∑m=1nφ(m)=1+Φ(n), where Φ is the summatory totient. We also have |Fn|=12(3+∑d=1nμ(d)⌊nd⌋2), where μ is the Möbius function. Hence, by a Möbius inversion formula, |Fn|=12(n+3)n−∑d=2n|F⌊n/d⌋|. The asymptotic behaviour of Fn is |Fn|∼3n2π2. The number of Farey fractions with denominators equal to k in Fn is given by φ(k) when k ≤ n and zero otherwise. Concerning the numerators one can define the function 𝒩n(h) that returns the number of Farey fractions with numerators equal to h in Fn. This function has some interesting properties as
𝒩n(1)=n, 𝒩n(pm)=⌈(n−pm)(1−1/p)⌉ for any prime number p, 𝒩n+mh(h)=𝒩n(h)+mφ(h) for any integer m ≥ 0, 𝒩n(4h)=𝒩n(2h)−φ(2h). In particular, the property in the third line above implies 𝒩mh(h)=(m−1)φ(h) and, further, 𝒩2h(h)=φ(h). The latter means that, for Farey sequences of even order n, the number of fractions with numerators equal to n/2 is the same as the number of fractions with denominators equal to n/2, that is 𝒩n(n/2)=φ(n/2). The index In(ak,n)=k of a fraction ak,n in the Farey sequence Fn={ak,n:k=0,1,…,mn} is simply the position that ak,n occupies in the sequence. This is of special relevance as it is used in an alternative formulation of the Riemann hypothesis, see below. Various useful properties follow: In(0/1)=0,In(1/n)=1,In(1/2)=|Fn|−12,In(1/1)=|Fn|−1,In(h/k)=|Fn|−1−In(k−hk). The index of 1/k where n/i+1 < k ≤ n/i and n is the least common multiple of the first i numbers, n = lcm([2, i]), is given by: In(1/k)=1+n∑j=1iφ(j)j−kΦ(i). A similar expression was used as an approximation of In(x) for low values of x in the classical paper by F. Dress. A general expression for In(h/k) for any Farey fraction h/k is given in.
Farey neighbours Fractions which are neighbouring terms in any Farey sequence are known as a Farey pair and have the following properties. If a/b and c/d are neighbours in a Farey sequence, with a/b < c/d, then their difference c/d − a/b is equal to 1/bd. Since cd−ab=bc−adbd, this is equivalent to saying that bc−ad=1. Thus 1/3 and 2/5 are neighbours in F5, and their difference is 1/15. The converse is also true. If bc−ad=1 for positive integers a, b, c, d with a < b and c < d, then a/b and c/d will be neighbours in the Farey sequence of order max(b,d). If p/q has neighbours a/b and c/d in some Farey sequence, with a/b < p/q < c/d, then p/q is the mediant of a/b and c/d – in other words, pq=a+cb+d. This follows easily from the previous property, since if bp−aq=qc−pd=1,⟹bp+pd=qc+aq,⟹p(b+d)=q(a+c),⟹pq=a+cb+d. It follows that if a/b and c/d are neighbours in a Farey sequence then the first term that appears between them as the order of the Farey sequence is incremented is a+cb+d, which first appears in the Farey sequence of order b + d. Thus the first term to appear between 1/3 and 2/5 is 3/8, which appears in F8. The total number of Farey neighbour pairs in Fn is 2|Fn| − 3. The Stern–Brocot tree is a data structure showing how the sequence is built up from 0 (= 0/1) and 1 (= 1/1), by taking successive mediants. Note, however, that at the nth step of the construction of the Stern–Brocot tree all mediants are included, not only the ones with denominator equal to n.
Equivalent-area interpretation Every consecutive pair of Farey rationals have an equivalent area of 1. See this by interpreting consecutive rationals r1=pqr2=p′q′ as vectors (p, q) in the xy-plane. The area is given by A(pq,p′q′)=qp′−q′p. As any added fraction in between two previous consecutive Farey sequence fractions is calculated as the mediant (⊕), then A(r1,r1⊕r2)=A(r1,r1)+A(r1,r2)=A(r1,r2)=1 (since r1 = 1/0 and r2 = 0/1, its area must be 1).
… excerpt ends here. Continue reading the full article.





