Farey sequence

Farey sequence Farey diagram to F9 represented with circular arcs. In the SVG image, hover over a curve to highlight it and its terms. Farey diagram to F9. Symmetrical pattern made by the denominators of the Farey sequence, F9. Symmetrical pattern made by the denominators of the Farey sequence, F25.

In mathematics, the Farey sequence of order n is the sequence of completely reduced fractions, either between 0 and 1, or without this restriction,[a] which when in lowest terms have denominators less than or equal to n, arranged in order of increasing size.

With the restricted definition, each Farey sequence starts with the value 0, denoted by the fraction 0 / 1 , and ends with the value 1, denoted by the fraction 1 / 1 (although some authors omit these terms).

A Farey sequence is sometimes called a Farey series, which is not strictly correct, because the terms are not summed.[2] Contents 1 Examples 2 History 3 Properties 3.1 Sequence length and index of a fraction 3.2 Farey neighbours 3.3 Farey neighbours and continued fractions 3.4 Farey fractions and the least common multiple 3.5 Farey fractions and the greatest common divisor 3.6 Applications 3.7 Ford circles 3.8 Riemann hypothesis 3.9 Other sums involving Farey fractions 4 Next term 5 See also 6 Footnotes 7 References 8 Further reading 9 External links Examples The Farey sequences of orders 1 to 8 are : F1 = { 0 / 1 , 1 / 1 } F2 = { 0 / 1 , 1 / 2 , 1 / 1 } F3 = { 0 / 1 , 1 / 3 , 1 / 2 , 2 / 3 , 1 / 1 } F4 = { 0 / 1 , 1 / 4 , 1 / 3 , 1 / 2 , 2 / 3 , 3 / 4 , 1 / 1 } F5 = { 0 / 1 , 1 / 5 , 1 / 4 , 1 / 3 , 2 / 5 , 1 / 2 , 3 / 5 , 2 / 3 , 3 / 4 , 4 / 5 , 1 / 1 } F6 = { 0 / 1 , 1 / 6 , 1 / 5 , 1 / 4 , 1 / 3 , 2 / 5 , 1 / 2 , 3 / 5 , 2 / 3 , 3 / 4 , 4 / 5 , 5 / 6 , 1 / 1 } F7 = { 0 / 1 , 1 / 7 , 1 / 6 , 1 / 5 , 1 / 4 , 2 / 7 , 1 / 3 , 2 / 5 , 3 / 7 , 1 / 2 , 4 / 7 , 3 / 5 , 2 / 3 , 5 / 7 , 3 / 4 , 4 / 5 , 5 / 6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0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1} F6 = {0/1, 1/6, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 1/1} F7 = {0/1, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 2/5, 3/7, 1/2, 4/7, 3/5, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 1/1} F8 = {0/1, 1/8, 1/7, 1/6, 1/5, 1/4, 2/7, 1/3, 3/8, 2/5, 3/7, 1/2, 4/7, 3/5, 5/8, 2/3, 5/7, 3/4, 4/5, 5/6, 6/7, 7/8, 1/1} iterations 1-10 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. Using Pick's theorem the area of the sunburst is 4(|Fn|−1), where |Fn| is the number of fractions in Fn.

History The history of 'Farey series' is very curious — Hardy & Wright (1979)[3] ... 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)[4] 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.[4] Thus it was a historical accident that linked Farey's name with these sequences. This is an example of Stigler's law of eponymy.

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. Thus F6 consists of F5 together with the fractions 1 / 6 and 5 / 6 .

The middle term of a Farey sequence Fn is always 1 / 2 , for n > 1. From this, we can relate the lengths of Fn and Fn−1 using Euler's totient function {displaystyle varphi (n)}  : {displaystyle |F_{n}|=|F_{n-1}|+varphi (n).} Using the fact that |F1| = 2, we can derive an expression for the length of Fn:[5] {displaystyle |F_{n}|=1+sum _{m=1}^{n}varphi (m)=1+Phi (n),} where {displaystyle Phi (n)} is the summatory totient.

We also have : {displaystyle |F_{n}|={frac {1}{2}}left(3+sum _{d=1}^{n}mu (d)leftlfloor {tfrac {n}{d}}rightrfloor ^{2}right),} and by a Möbius inversion formula : {displaystyle |F_{n}|={frac {1}{2}}(n+3)n-sum _{d=2}^{n}|F_{lfloor n/drfloor }|,} where µ(d) is the number-theoretic Möbius function, and {displaystyle lfloor {tfrac {n}{d}}rfloor } is the floor function.

The asymptotic behaviour of |Fn| is : {displaystyle |F_{n}|sim {frac {3n^{2}}{pi ^{2}}}.} The index {displaystyle I_{n}(a_{k,n})=k} of a fraction {displaystyle a_{k,n}} in the Farey sequence {displaystyle F_{n}={a_{k,n}:k=0,1,ldots ,m_{n}}} is simply the position that {displaystyle a_{k,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: {displaystyle I_{n}(0/1)=0,} {displaystyle I_{n}(1/n)=1,} {displaystyle I_{n}(1/2)=(|F_{n}|-1)/2,} {displaystyle I_{n}(1/1)=|F_{n}|-1,} {displaystyle I_{n}(h/k)=|F_{n}|-1-I_{n}((k-h)/k).} The index of {displaystyle 1/k} where {displaystyle n/(i+1)-1} is equivalent to the Riemann hypothesis, and then Edmund Landau[19] remarked (just after Franel's paper) that the statement {displaystyle sum _{k=1}^{m_{n}}|d_{k,n}|=O(n^{r})quad forall r>1/2} is also equivalent to the Riemann hypothesis.

Other sums involving Farey fractions The sum of all Farey fractions of order n is half the number of elements: {displaystyle sum _{rin F_{n}}r={frac {1}{2}}|F_{n}|.} The sum of the denominators in the Farey sequence is twice the sum of the numerators and relates to Euler's totient function: {displaystyle sum _{a/bin F_{n}}b=2sum _{a/bin F_{n}}a=1+sum _{i=1}^{n}ivarphi (i),} which was conjectured by Harold L. Aaron in 1962 and demonstrated by Jean A. Blake in 1966. A one line proof of the Harold L. Aaron conjecture is as follows. The sum of the numerators is {displaystyle {displaystyle 1+sum _{2leq bleq n}sum _{(a,b)=1}a=1+sum _{2leq bleq n}b{frac {varphi (b)}{2}}}} . The sum of denominators is {displaystyle {displaystyle 2+sum _{2leq bleq n}sum _{(a,b)=1}b=2+sum _{2leq bleq n}bvarphi (b)}} . The quotient of the first sum by the second sum is {displaystyle {frac {1}{2}}} .

Let bj be the ordered denominators of Fn, then:[20] {displaystyle sum _{j=0}^{|F_{n}|-1}{frac {b_{j}}{b_{j+1}}}={frac {3|F_{n}|-4}{2}}} and {displaystyle sum _{j=0}^{|F_{n}|-1}{frac {1}{b_{j+1}b_{j}}}=1.} Let aj/bj the jth Farey fraction in Fn, then {displaystyle sum _{j=1}^{|F_{n}|-1}(a_{j-1}b_{j+1}-a_{j+1}b_{j-1})=sum _{j=1}^{|F_{n}|-1}{begin{Vmatrix}a_{j-1}&a_{j+1}\b_{j-1}&b_{j+1}end{Vmatrix}}=3(|F_{n}|-1)-2n-1,} which is demonstrated in.[21] Also according to this reference the term inside the sum can be expressed in many different ways: {displaystyle a_{j-1}b_{j+1}-a_{j+1}b_{j-1}={frac {b_{j-1}+b_{j+1}}{b_{j}}}={frac {a_{j-1}+a_{j+1}}{a_{j}}}=leftlfloor {frac {n+b_{j-1}}{b_{j}}}rightrfloor ,} obtaining thus many different sums over the Farey elements with same result. Using the symmetry around 1/2 the former sum can be limited to half of the sequence as {displaystyle sum _{j=1}^{lfloor |F_{n}|/2rfloor }(a_{j-1}b_{j+1}-a_{j+1}b_{j-1})=3(|F_{n}|-1)/2-n-lceil n/2rceil ,} The Mertens function can be expressed as a sum over Farey fractions as {displaystyle M(n)=-1+sum _{ain {mathcal {F}}_{n}}e^{2pi ia}}   where   {displaystyle {mathcal {F}}_{n}}   is the Farey sequence of order n.

This formula is used in the proof of the Franel–Landau theorem.[22] Next term A surprisingly simple algorithm exists to generate the terms of Fn in either traditional order (ascending) or non-traditional order (descending). The algorithm computes each successive entry in terms of the previous two entries using the mediant property given above. If a / b and c / d are the two given entries, and p / q is the unknown next entry, then c / d  =  a + p / b + q . Since c / d is in lowest terms, there must be an integer k such that kc = a + p and kd = b + q, giving p = kc − a and q = kd − b. If we consider p and q to be functions of k, then {displaystyle {frac {p(k)}{q(k)}}-{frac {c}{d}}={frac {cb-da}{d(kd-b)}}} so the larger k gets, the closer p / q gets to c / d .