Consider two fractions \frac{m_1}{n_1} and \frac{m_2}{n_2} with positive numerators and denominators. The fraction \frac{m_1+m_2}{n_1+n_2} is called the mediant of \frac{m_1}{n_1} and \frac{m_2}{n_2}. It is straightforward to show that the mediant is placed numerically between the original fractions,
\frac{m_1}{n_1} < \frac{m_2}{n_2} \quad \Rightarrow \quad \frac{m_1}{n_1} < \frac{m_1+m_2}{n_1+n_2} < \frac{m_2}{n_2}.
Consider now the following simple procedure [...]
