ArticleslgStudy

mathematics

Farey sequence

Farey sequence is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Farey sequence rather than just read about it. In short: 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.

Farey sequence — main illustration
Farey sequence — illustration

Key takeaways

  • Farey sequence belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Farey sequence to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Farey sequence from memory before moving on to harder problems.

Reference excerpt

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.

Illustrations

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 represented with circular arcs. In the SVG image, hover over a curve to highlight it and its terms.
Farey sequence illustration
Farey sequence illustration
Farey sequence: Plotting F6 numerators vs denominators
Plotting F6 numerators vs denominators
Farey sequence: Starbursts of iterations 1–10 superimposed
Starbursts of iterations 1–10 superimposed

Worked examples

Example 1 — a first encounter with Farey sequence

Start with the simplest possible case. Write down what Farey sequence claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Farey sequence before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Farey sequence ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Farey sequence

In research
Farey sequence appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Farey sequence in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Farey sequence is common in secondary-school and first-year university syllabi. It links to neighbouring topics Fractions (mathematics), Number theory, Sequences and series, so understanding it makes those chapters shorter.
In everyday life
Look for Farey sequence outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Farey sequence” →

How to study Farey sequence in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Farey sequence means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Farey sequence out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Farey sequence in simple terms?

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.

Why does Farey sequence matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Farey sequence?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Farey sequence.

Tags

  • Fractions (mathematics)
  • Number theory
  • Sequences and series

Keep exploring