Copyright © University of Cambridge. All rights reserved.
'Farey Approximation' printed from http://nrich.maths.org/
In 1816 the British geologist John Farey defined the Farey sequence
$F_n$ as the list, written in increasing order, of all the rational
numbers between $0$ and $1$ that have only the numbers $1, 2, 3,
... , n$ as denominators. We can do the same thing for rational
numbers between any two positive numbers. For example we can
consider sequences betweeen $1$ and $2$ where we have
\[
\eqalign{F_1&=\frac{1}{1}, \frac{2}{1}\cr
F_2&=\frac{1}{1}, \frac{3}{2}, \frac{2}{1}.}
\]
What would $F_3$ and $F_4$ be in this case?
For the two positive rational numbers $\frac{b}{d}$ and
$\frac{a}{c}$ the mediant is defined as $\frac{a+b}{c+d}$. The
mediant has the nice property that it is always in between the two
fractions giving rise to it: if $0< \frac{b}{d} <
\frac{a}{c}$ then $\frac{b}{d} < \frac{a+b}{c+d} <
\frac{a}{c}$. You might want to verify this for yourself.
Clearly each Farey sequence $F_{n+1}$ must contain all of the terms
of $F_{n}$, along with some new terms. Mediants also have the nice
property that each 'new' term in the Farey sequence $F_{n+1}$ is
the mediant of two consecutive terms in $F_n$. Why not test this
out on $F_2, \dots, F_5$?
Farey sequences have all sorts of interesting properties. One is
that they give an interesting way of approximating rational
numbers.
In order to find a rational approximation to an irrational number
using Farey fractions you need to pick the interval between Farey
fractions that contains the target number and narrow the interval
at each step. If the target number is between $\frac{b}{d}$ and
$\frac{a}{c}$ then at the next step you have to decide which of the
two intervals
\[
\Big[\frac{b}{d}, \frac{a+b}{c+d}\Big], \quad
\Big[\frac{a+b}{c+d}, \frac{a}{c}\Big].
\]
contains the target number.
Carry out this numerical approximation process for $\sqrt 2$, and
for $\pi$, to get rational approximations that are correct to 4
decimal places. You may like to use a spreadsheet. Compare your
results to the approximations obtained by using a straightforward
interval-halving method. What do you notice?