In mathematics, the Farey sequence of order n is the sequence of completely reduced fractions, either between 0 and 1, or without this restriction, 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 , and ends with the value 1, denoted by the fraction (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.
Examples
The Farey sequences of orders 1 to 8 are : F1 = { , } F2 = { , , } F3 = { , , , , } F4 = { , , , , , , } F5 = { , , , , , , , , , , } F6 = { , , , , , , , , , , , , } F7 = { , , , , , , , , , , , , , , , , , , } F8 = { , , , , , , , , , , , , , , , , , , , , , , }
Farey sunburst
Plotting the numerators versus the denominators of a Farey sequence gives a shape like the one to the right, shown for 6.
Reflecting this shape around the diagonal and main axes generates the Farey sunburst, shown below. The Farey sunburst of order connects the visible integer grid points from the origin in the square of side 2, centered at the origin. Using Pick's theorem, the area of the sunburst is 4(|n|−1), where |n| is the number of fractions in n.
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. 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 and .
The middle term of a Farey sequence Fn is always , for n > 1. From this, we can relate the lengths of Fn and Fn−1 using Euler's totient function :
Using the fact that |F1| = 2, we can derive an expression for the length of Fn:
where is the summatory totient.
We also have :
and by a Möbius inversion formula :
where µ(d) is the number-theoretic Möbius function, and is the floor function.
The asymptotic behaviour of |Fn| 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:
Farey neighbours
Fractions which are neighbouring terms in any Farey sequence are known as a Farey pair and have the following properties.
If and are neighbours in a Farey sequence, with < , then their difference − is equal to . Since
this is equivalent to saying that
.
Thus and are neighbours in F5, and their difference is .
The converse is also true. If
for positive integers a,b,c and d with a < b and c < d then and will be neighbours in the Farey sequence of order max(b,d).
If has neighbours and in some Farey sequence, with
then is the mediant of and – in other words,
This follows easily from the previous property, since if , then , , .
It follows that if and 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 .
Thus the first term to appear between and is , 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 (= ) and 1 (= ), by taking successive mediants.