# convergents to a continued fraction

Write

 $\displaystyle p_{0}$ $\displaystyle=a_{0}$ $\displaystyle p_{1}$ $\displaystyle=a_{0}a_{1}+1$ $\displaystyle q_{0}$ $\displaystyle=1$ $\displaystyle q_{1}$ $\displaystyle=a_{1}$

so that

 $\displaystyle[a_{0}]=a_{0}=\frac{p_{0}}{q_{0}}$ $\displaystyle=a_{0}+\frac{1}{a_{1}}=\frac{a_{0}a_{1}+1}{a_{1}}=\frac{p_{1}}{q_% {1}}$

For $n>1$, define

 $\displaystyle p_{n}$ $\displaystyle=a_{n}p_{n-1}+p_{n-2}$ (1) $\displaystyle q_{n}$ $\displaystyle=a_{n}q_{n-1}+q_{n-2}$
###### Theorem 1.

The $n^{\mathrm{th}}$ convergent to $[a_{0},a_{1},a_{2},a_{3},\ldots]$ is given by

 $[a_{0},\ldots,a_{n-1},a_{n}]=\frac{p_{n}}{q_{n}}$

where $p_{n},q_{n}$ are defined as above.

###### Proof.

Induction. For $n>1$,

 $\displaystyle[a_{0},\ldots,a_{n-1},a_{n}]$ $\displaystyle=[a_{0},\ldots,a_{n-1}+\frac{1}{a_{n}}]$ $\displaystyle=\frac{\left(a_{n-1}+\frac{1}{a_{n}}\right)p_{n-2}+p_{n-3}}{\left% (a_{n-1}+\frac{1}{a_{n}}\right)q_{n-2}+q_{n-3}}$ $\displaystyle=\frac{a_{n}(a_{n-1}p_{n-2}+p_{n-3})+p_{n-2}}{a_{n}(a_{n-1}q_{n-2% }+q_{n-3})+q_{n-2}}$ $\displaystyle=\frac{a_{n}p_{n-1}+p_{n-2}}{a_{n}q_{n-1}+q_{n-2}}$ $\displaystyle=\frac{p_{n}}{q_{n}}$

###### Theorem 2.

For $n\geq 1$, the numbers $\frac{p_{n-1}}{q_{n-1}}$ and $\frac{p_{n}}{q_{n}}$ are a Farey pair; in fact,

 $p_{n}q_{n-1}-p_{n-1}q_{n}=(-1)^{n-1}$ (2)

and thus

 $\frac{p_{n}}{q_{n}}-\frac{p_{n-1}}{q_{n-1}}=\frac{(-1)^{n-1}}{q_{n-1}q_{n}}$ (3)
###### Proof.

This is again a simple induction. The statement is true for $n=1$. For $n>1$, we have

 $\displaystyle p_{n}q_{n-1}-p_{n-1}q_{n}$ $\displaystyle=(a_{n}p_{n-1}+p_{n-2})q_{n-1}-p_{n-1}(a_{n}q_{n-1}+q_{n-2})$ $\displaystyle=p_{n-2}q_{n-1}-p_{n-1}q_{n-2}=-(-1)^{n-2}=(-1)^{n-1}$

Note that if $[a_{0},a_{1},\ldots]$ is a simple continued fraction, then the above theorem implies that $\gcd(p_{n},q_{n})=1$, since any common factor of $p_{n}$ and $q_{n}$ must divide $(-1)^{n}$.

###### Theorem 3.

For $n\geq 2$,

 $\displaystyle p_{n}q_{n-2}-p_{n-2}q_{n}=(-1)^{n}a_{n}$ (4) $\displaystyle\frac{p_{n}}{q_{n}}-\frac{p_{n-2}}{q_{n-2}}=\frac{(-1)^{n}a_{n}}{% q_{n-2}q_{n}}$ (5)
###### Proof.

Similar to the proof of the above theorem. ∎

###### Theorem 4.

If $[a_{0},a_{1},\ldots]$ is a simple continued fraction, then $q_{n}\geq n$ and, for $n>3$, $q_{n}>n$.

###### Proof.

This follows directly from the iterative definition for the $q_{i}$ and the fact that the $a_{i}$ are positive integers. ∎

These results easily imply the following important convergence theorem:

###### Theorem 5.

For any continued fraction, the even convergents $p_{2n}/q_{2n}$ are strictly monotonically increasing, and the odd convergents $p_{2n+1}/q_{2n+1}$ are strictly monotonically decreasing. In addition, every odd convergent is greater than each even convergent. If the continued fraction is simple, then the limit of the odd convergents is equal to the limit of the even convergents, and thus the continued fraction has a well-defined value equal to their common limit.

###### Proof.

This is basically obvious from the previous observations. Write $c_{n}$ for the $n^{\mathrm{th}}$ convergent, i.e.

 $c_{n}=\frac{p_{n}}{q_{n}}$

Each $q_{i}$ is positive, so

 $c_{n}-c_{n-2}=\frac{(-1)^{n}a_{n}}{q_{n}q_{n-2}}$

is positive for $n$ even and negative for $n$ odd. This proves the observations about monotonicity. Also,

 $c_{n}-c_{n-1}=\frac{(-1)^{n-1}}{q_{n}q_{n-1}}$

is positive for $n$ odd, so that

 $c_{2n+1}>c_{2n}$ (6)

Now, if for some $j,k$ we had $c_{2j+1}\leq c_{2k}$, then $j\neq k$ by (6). If $k, then since the even convergents increase, $c_{2j+1}\leq c_{2k}, while if $j, then since the odd convergents decrease, $c_{2k+1}. In either case, this contradicts (6).

As to the statement about simple continued fractions, it is clear that the even (odd) convergents converge since they form a monotonically increasing (decreasing) sequence  that is bounded below (above). But

 $\left\lvert\frac{p_{2n}}{q_{2n}}-\frac{p_{2n-1}}{q_{2n-1}}\right\rvert=\frac{1% }{q_{2n}q_{2n-1}}\leq\frac{1}{2n(2n-1)}\to 0$

and thus the limits are identical. ∎

Next we prove the following theorem regarding the connection between the “tail” of a continued fraction, its convergents, and its value:

###### Theorem 6.

If $x=[a_{0},a_{1},\ldots]$ is a simple continued fraction, write $t_{n}=[a_{n},a_{n+1},\ldots]$ for $n\geq 0$ (the $n^{\mathrm{th}}$ complete convergent). Then

 $x=\frac{p_{n-2}+t_{n}p_{n-1}}{q_{n-2}+t_{n}q_{n-1}}$
###### Proof.

This is another simple proof by induction. Note that

 $t_{n}=[a_{n},a_{n+1},\ldots]=a_{n}+\frac{1}{t_{n+1}}$

so that

 $t_{n+1}=\frac{1}{t_{n}-a_{n}}$

Then

 $\frac{t_{n+1}p_{n}+p_{n-1}}{t_{n+1}q_{n}+q_{n-1}}=\frac{\frac{1}{t_{n}-a_{n}}p% _{n}+p_{n-1}}{\frac{1}{t_{n}-a_{n}}q_{n}+q_{n-1}}=\frac{\frac{1}{t_{n}-a_{n}}(% a_{n}p_{n-1}+p_{n-2})+p_{n-1}}{\frac{1}{t_{n}-a_{n}}(a_{n}q_{n-1}+q_{n-2})+q_{% n-1}}=\frac{t_{n}p_{n-1}+p_{n-2}}{t_{n}q_{n-1}+q_{n-2}}=x$

Finally, we derive a bound on how well the convergents approximate the value of the continued fraction:

###### Theorem 7.

If $x=[a_{0},a_{1},\ldots]$ is a simple continued fraction, then

 $\left\lvert x-\frac{p_{n}}{q_{n}}\right\rvert<\frac{1}{q_{n}^{2}}$
###### Proof.
 $\displaystyle x-\frac{p_{n}}{q_{n}}$ $\displaystyle=\frac{p_{n-1}+t_{n+1}p_{n}}{q_{n-1}+t_{n+1}q_{n}}-\frac{p_{n}}{q% _{n}}$ $\displaystyle=\frac{q_{n}p_{n-1}+t_{n+1}p_{n}q_{n}-p_{n}q_{n-1}-t_{n+1}p_{n}q_% {n}}{q_{n}(q_{n-1}+t_{n+1}q_{n})}=\frac{q_{n}p_{n-1}-p_{n}q_{n-1}}{q_{n}(q_{n-% 1}+t_{n+1}q_{n})}$ $\displaystyle=\frac{(-1)^{n}}{q_{n}(q_{n-1}+t_{n+1}q_{n})}$

But $t_{n+1}>a_{n+1}$, so that $q_{n-1}+t_{n+1}q_{n}>q_{n-1}+a_{n+1}q_{n}=q_{n+1}$ and thus

 $\left\lvert x-\frac{p_{n}}{q_{n}}\right\rvert=\frac{1}{q_{n}(q_{n-1}+t_{n+1}q_% {n})}<\frac{1}{q_{n}q_{n+1}}<\frac{1}{q_{n}^{2}}$

since the $q_{i}$ are strictly increasing. ∎

## References

• 1 G.H. Hardy & E.M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Oxford Science Publications, 1979.
Title convergents to a continued fraction ConvergentsToAContinuedFraction 2013-03-22 18:04:20 2013-03-22 18:04:20 rm50 (10146) rm50 (10146) 8 rm50 (10146) Theorem msc 11Y65 msc 11J70 msc 11A55 convergent complete convergent