In mathematics, the Farey sequence of order n is the sequence of completely reduced fractions, either between 0 and 1, or without this restriction,^{[1]} 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,^{[citation needed]} which is not strictly correct, because the terms are not summed.
YouTube Encyclopedic

1/5Views:1 76314 29211 597351 586373 960

✪ Farey Sequence {Theory Of Numbers}  Applications and results

✪ The deep structure of the rational numbers  Real numbers and limits Math Foundations 95

✪ Fractions and the SternBrocot tree  Real numbers and limits Math Foundations 96  N J Wildberger

✪ Infinite Fractions  Numberphile

✪ Funny Fractions and Ford Circles  Numberphile
Transcription
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 References
 7 Further reading
 8 External links
Examples
The Farey sequences of orders 1 to 8 are :
 F_{1} = { 0/1_{,} 1/1 }
 F_{2} = { 0/1_{,} 1/2_{,} 1/1 }
 F_{3} = { 0/1_{,} 1/3_{,} 1/2_{,} 2/3_{,} 1/1 }
 F_{4} = { 0/1_{,} 1/4_{,} 1/3_{,} 1/2_{,} 2/3_{,} 3/4_{,} 1/1 }
 F_{5} = { 0/1_{,} 1/5_{,} 1/4_{,} 1/3_{,} 2/5_{,} 1/2_{,} 3/5_{,} 2/3_{,} 3/4_{,} 4/5_{,} 1/1 }
 F_{6} = { 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 }
 F_{7} = { 0/1_{,} 1/7_{,} 1/6_{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7_{,} 7/8_{,} 1/1 } 
Sorted 

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, 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} 
Plotting the numerators versus the denominators of a Farey sequence gives a shape like the one below for F_{6}. Reflecting this shape around the diagonal and main axes generates the Farey sunburst. 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(F_{n}1), where F_{n} is the number of fractions in F_{n}.
History
 The history of 'Farey series' is very curious — Hardy & Wright (1979) Chapter III^{[2]}
 ... 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) Chapter XVI^{[3]}
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.^{[3]} 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 F_{n} contains all of the members of F_{n−1} and also contains an additional fraction for each number that is less than n and coprime to n. Thus F_{6} consists of F_{5} together with the fractions 1/6 and 5/6.
The middle term of a Farey sequence F_{n} is always 1/2, for n > 1. From this, we can relate the lengths of F_{n} and F_{n−1} using Euler's totient function :
Using the fact that F_{1} = 2, we can derive an expression for the length of F_{n}^{[4]}:
where is the summatory totient.
We also have :
and by a Möbius inversion formula :
where µ(d) is the numbertheoretic Möbius function, and is the floor function.
The asymptotic behaviour of F_{n} is :
The index of a fraction in the Farey sequence is simply the position that 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:
The index of where and is the least common multiple of the first numbers, , is given by^{[5]}:
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.^{[why?]} Since
this is equivalent to saying that
 .
Thus 1/3 and 2/5 are neighbours in F_{5}, and their difference is 1/15.
The converse is also true. If
for positive integers a,b,c and 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
then p/q is the mediant of a/b and c/d – in other words,
This follows easily from the previous property, since if bp – aq = qc – pd = 1, then bp + pd = qc + aq, p(b + d) = q(a + c), p/q = a + c/b + 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
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 F_{8}.
The total number of Farey neighbour pairs in F_{n} is 2F_{n}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.
Farey neighbours and continued fractions
Fractions that appear as neighbours in a Farey sequence have closely related continued fraction expansions. Every fraction has two continued fraction expansions — in one the final term is 1; in the other the final term is greater than 1. If p/q, which first appears in Farey sequence F_{q}, has continued fraction expansions
 [0; a_{1}, a_{2}, ..., a_{n − 1}, a_{n}, 1]
 [0; a_{1}, a_{2}, ..., a_{n − 1}, a_{n} + 1]
then the nearest neighbour of p/q in F_{q} (which will be its neighbour with the larger denominator) has a continued fraction expansion
 [0; a_{1}, a_{2}, ..., a_{n}]
and its other neighbour has a continued fraction expansion
 [0; a_{1}, a_{2}, ..., a_{n − 1}]
For example, 3/8 has the two continued fraction expansions [0; 2, 1, 1, 1] and [0; 2, 1, 2], and its neighbours in F_{8} are 2/5, which can be expanded as [0; 2, 1, 1]; and 1/3, which can be expanded as [0; 2, 1].
Farey fractions and the least common multiple
In ^{[6]} and ^{[7]} it is shown that the lcm can be expressed as the products of Farey fractions as
Farey fractions and the greatest common divisor
Since the Euler's totient function is directly connected to the gcd so is the number of elements in F_{n},
For any 3 Farey fractions a/b, c/d and e/f the following identity between the gcd's of the 2x2 matrix determinants in absolute value holds^{[8]}:
Applications
Farey sequences are very useful to find rational approximations of irrational numbers.^{[9]} For example, the construction by Eliahou^{[10]} of a lower bound on the length of nontrivial cycles in the 3x+1 process uses Farey sequences to calculate a continued fraction expansion of the number log_{2}(3).
In physics systems featuring resonance phenomena Farey sequences provide a very elegant and efficient method to compute resonance locations in 1D^{[11]} and 2D.^{[12]}
Farey sequences are prominent in studies of anyangle path planning on squarecelled grids, for example in characterizing their computational complexity^{[13]} or optimality^{[14]}. The connection can be considered in terms of rconstrained paths, namely paths made up of line segments that each traverse at most rows and at most columns of cells. Let be the set of vectors such that , , and , are coprime. Let be the result of reflecting in the line . Let . Then any rconstrained path can be described as a sequence of vectors from . There is a bijection between and the Farey sequence of order given by mapping to .
Ford circles
There is a connection between Farey sequence and Ford circles.
For every fraction p/q (in its lowest terms) there is a Ford circle C[p/q], which is the circle with radius 1/(2q^{2}) and centre at (p/q, 1/(2q^{2})). Two Ford circles for different fractions are either disjoint or they are tangent to one another—two Ford circles never intersect. If 0 < p/q < 1 then the Ford circles that are tangent to C[p/q] are precisely the Ford circles for fractions that are neighbours of p/q in some Farey sequence.
Thus C[2/5] is tangent to C[1/2], C[1/3], C[3/7], C[3/8] etc.
Ford circles appear also in the Apollonian gasket (0,0,1,1). The picture below illustrates this together with Farey resonance lines.
Riemann hypothesis
Farey sequences are used in two equivalent formulations of the Riemann hypothesis. Suppose the terms of are . Define , in other words is the difference between the kth term of the nth Farey sequence, and the kth member of a set of the same number of points, distributed evenly on the unit interval. In 1924 Jérôme Franel^{[15]} proved that the statement
is equivalent to the Riemann hypothesis, and then Edmund Landau^{[16]} remarked (just after Franel's paper) that the statement
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:
The sum of the denominators in the Farey sequence is twice the sum of the numerators and relates to Euler's totient function:
which was conjectured by Harold L. Aaron in 1962 and demonstrated by Jean A. Blake in 1966.
Let b_{j} be the ordered denominators of F_{n}, then^{[17]}:
and
Let a_{j}/b_{j} the jth Farey fraction in F_{n}, then
which is demonstrated in ^{[18]}. Also according to this reference the term inside the sum can be expressed in many different ways:
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:
Next term
A surprisingly simple algorithm exists to generate the terms of F_{n} in either traditional order (ascending) or nontraditional 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
so the larger k gets, the closer p/q gets to c/d.
To give the next term in the sequence k must be as large as possible, subject to kd − b ≤ n (as we are only considering numbers with denominators not greater than n), so k is the greatest integer ≤ n + b/d. Putting this value of k back into the equations for p and q gives
This is implemented in Python as follows:
def farey(n, descending=False):
"""Print the n'th Farey sequence. Allow for either ascending or descending."""
a, b, c, d = 0, 1, 1, n
if descending:
a, c = 1, n  1
print(a, b)
while (c <= n and not descending) or (a > 0 and descending):
k = int((n + b) / d)
a, b, c, d = c, d, k * c  a, k * d  b
print(a, b)
Bruteforce searches for solutions to Diophantine equations in rationals can often take advantage of the Farey series (to search only reduced forms). The lines marked (*) can also be modified to include any two adjacent terms so as to generate terms only larger (or smaller) than a given term.^{[19]}
See also
References
 ^ Ivan M. Niven and Herbert S. Zuckerman, An Introduction to the theory of numbers, third edition, John Wiley and Sons 1972, Definition 6.1. "The sequence of all reduced fractions with denominators not exceeding n, listed in order of their size, is called the Farey sequence of order n." With the comment: "This definition of the Farey sequences seems to be the most convenient. However, some authors prefer to restrict the fractions to the interval from 0 to 1."
 ^ Hardy, G.H. & Wright, E.M. (1979) An Introduction to the Theory of Numbers (Fifth Edition). Oxford University Press. ISBN 0198531710
 ^ ^{a} ^{b} Beiler, Albert H. (1964) Recreations in the Theory of Numbers (Second Edition). Dover. ISBN 0486210960. Cited in Farey Series, A Story at CuttheKnot
 ^ Sloane, N. J. A. (ed.). "Sequence A005728". The OnLine Encyclopedia of Integer Sequences. OEIS Foundation.
 ^ Tomas, Rogelio (2018). "Partial Franel sums". arXiv:1802.07792 [math.NT]. Accessed: November 18, 2018.
 ^ Tomas, Rogelio (2009). "A product of Gamma function values at fractions with the same denominator". arXiv:0907.4384 [math.CA].
 ^ Tomas, Rogelio; Wehmeier, Stefan (2009). "The LCM(1,2,...,n) as a product of sine values sampled over the points in Farey sequences". arXiv:0909.1838 [math.CA].
 ^ Tomas, Rogelio (2018). "Partial Franel sums". arXiv:1802.07792 [math.NT].
 ^ "Farey Approximation", NRICH.maths.org. Accessed: 18 November 2018.
 ^ Eliahou, Shalom (August 1993). "The 3x+1 problem: new lower bounds on nontrivial cycle lengths". Discrete Mathematics. 118 (1–3): 45–56. doi:10.1016/0012365X(93)90052U.
 ^ *Zhenhua Li, A.; Harter, W.G. (2013). "Quantum Revivals of Morse Oscillators and FareyFord Geometry". arXiv:1308.4470v1 [quantph]. Accessed: November 18, 2018.
 ^ Tomas, R. (2014). "From Farey sequences to resonance diagrams", prstab.aps.org. Accessed: 18 November 2018.
 ^ Harabor, Daniel Damir; Grastien, Alban; Öz, Dindar; Aksakalli, Vural (26 May 2016). "Optimal AnyAngle Pathfinding In Practice". Journal of Artificial Intelligence Research. 56: 89–118. doi:10.1613/jair.5007.
 ^ Hew, Patrick Chisan (19 August 2017). "The Length of Shortest Vertex Paths in Binary Occupancy Grids Compared to Shortest rConstrained Ones". Journal of Artificial Intelligence Research. 59: 543–563. doi:10.1613/jair.5442.
 ^ "Les suites de Farey et le problème des nombres premiers", Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen, MathematischPhysikalische Klasse 1924, 198201. (in French)
 ^ "Bemerkungen zu der vorstehenden Abhandlung von Herrn Franel", Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen, MathematischPhysikalische Klasse 1924, 202206. (in German)
 ^ Kurt Girstmair; Girstmair, Kurt (2010). "Farey Sums and Dedekind Sums". The American Mathematical Monthly. 117 (1): 72–78. doi:10.4169/000298910X475005. JSTOR 10.4169/000298910X475005.
 ^ R. R. Hall & P. Shiu, The Index of a Farey Sequence, Michigan Math. J. 51
 ^ Norman Routledge, "Computing Farey Series," The Mathematical Gazette, Vol. 92 (No. 523), 55–62 (March 2008).
Further reading
 Allen Hatcher, Topology of Numbers
 Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics: A Foundation for Computer Science, 2nd Edition (AddisonWesley, Boston, 1989); in particular, Sec. 4.5 (pp. 115–123), Bonus Problem 4.61 (pp. 150, 523–524), Sec. 4.9 (pp. 133–139), Sec. 9.3, Problem 9.3.6 (pp. 462–463). ISBN 0201558025.
 Linas Vepstas. The Minkowski Question Mark, GL(2,Z), and the Modular Group. http://linas.org/math/chapminkowski.pdf reviews the isomorphisms of the SternBrocot Tree.
 Linas Vepstas. Symmetries of PeriodDoubling Maps. http://linas.org/math/chaptakagi.pdf reviews connections between Farey Fractions and Fractals.
 Scott B. Guthery, A Motif of Mathematics: History and Application of the Mediant and the Farey Sequence, (Docent Press, Boston, 2010). ISBN 1453810579.
 Cristian Cobeli and Alexandru Zaharescu, The HarosFarey Sequence at Two Hundred Years. A Survey, Acta Univ. Apulensis Math. Inform. no. 5 (2003) 1–38, pp. 1–20 pp. 21–38
 Andrey O. Matveev, Farey Sequences: Duality and Maps Between Subsequences, (De Gruyter, Berlin, 2017). ISBN 9783110546620.
External links
 Alexander Bogomolny. Farey series and SternBrocot Tree at CuttheKnot
 Ettore Pennestri'. A Brocot table of base 120
 Hazewinkel, Michiel, ed. (2001) [1994], "Farey series", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 9781556080104
 Weisstein, Eric W. "SternBrocot Tree". MathWorld.
 OEIS sequence A005728 (Number of fractions in Farey series of order n)
 OEIS sequence A006842 (Numerators of Farey series of order n)
 OEIS sequence A006843 (Denominators of Farey series of order n)
 Bonahon, Francis. "Funny Fractions and Ford Circles" (YouTube video). Brady Haran. Retrieved 9 June 2015.