next up previous
Next: About this document ... Up: Lecture 18: Continued Fractions Previous: The Continued Fraction Algorithm

Infinite Continued Fractions

Theorem 2.1   Let $ a_0, a_1, a_2, \ldots $ be a sequence of integers such that $ a_n > 0$ for all $ n\geq 1$, and for each $ n\geq 0$, set $ c_n = [a_0, a_1, \ldots a_n].$ Then $ \displaystyle \lim_{n\rightarrow \infty} c_n$ exists.

Proof. For any $ m\geq n$, the number $ c_n$ is a partial convergent of $ [a_0, \ldots, a_m]$. Recall from the previous lecture that the even convergents $ c_{2n}$ form a strictly increasing sequence and the odd convergents $ c_{2n+1}$ form a strictly decreasing sequence. Moreover, the even convergents are all $ \leq c_1$ and the odd convergents are all $ \geq c_0$. Hence $ \alpha_0 = \lim_{n\rightarrow \infty} c_{2n}$ and $ \alpha_1 = \lim_{n\rightarrow \infty} c_{2n+1}$ both exist and $ \alpha_0\leq \alpha_1$. Finally, by a proposition from last time

$\displaystyle \vert c_{2n} - c_{2n-1}\vert
= \frac{1}{q_{2n}\cdot q_{2n-1}} \leq
\frac{1}{2n(2n-1)} \rightarrow 0,
$

so $ \alpha_0 = \alpha_1$. $ \qedsymbol$

We define

$\displaystyle [a_0, a_1, \ldots ] = \lim_{n\rightarrow \infty} c_n.
$

Example 2.2   We use PARI to illustrate the convergence of the theorem for $ x=\pi$.
? a = contfrac(Pi)
%38 = [3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, ...]
? c = convergents(a)
%39 = [3, 22/7, 333/106, 355/113, 103993/33102, 104348/33215, ...]
? \p9                      \\ so we can see.
   realprecision = 9 significant digits
? [c[1]*1.0, c[3]*1.0, c[5]*1.0, c[7]*1.0]  \\ odd ones converge up to pi
%43 = [3.00000000, 3.14150943, 3.14159265, 3.14159265]
? [c[2]*1.0,c[4]*1.0,c[6]*1.0,c[8]*1.0]     \\ even ones swoop down on pi.
%44 = [3.14285714, 3.14159291, 3.14159265, 3.14159265]

Theorem 2.3   Let $ x\in\mathbb{R}$ be a real number. Then

$\displaystyle x = [a_0, a_1, a_2, \ldots],
$

where $ a_0, a_1, a_2, \ldots $ is the sequence produced by the continued fraction algorithm.

Proof. If the sequence is finite then some $ t_n=0$ and the result follows by Proposition 1.2. Suppose the sequence is infinite. By Proposition 1.2,

$\displaystyle x = [a_0, a_1, \ldots, a_n, \frac{1}{t_n}].
$

By a proposition from the last lecture1,

$\displaystyle x = \frac{\frac{1}{t_n} p_n + p_{n-1}}{\frac{1}{t_n} q_n + q_{n-1}}.
$

Thus if $ c_n = [a_0, a_1, \ldots, a_n]$, then

$\displaystyle x - c_n$ $\displaystyle = x - \frac{p_n}{q_n}$    
  $\displaystyle =\frac{\frac{1}{t_n} p_n q_n + p_{n-1} q_n - \frac{1}{t_n} p_n q_n - p_n q_{n-1}} {q_n \left(\frac{1}{t_n} q_n + q_{n-1}\right)}.$    
  $\displaystyle = \frac{p_{n-1} q_n - p_{n}q_{n-1}}{q_n\left(\frac{1}{t_n} q_n + q_{n-1}\right)}$    
  $\displaystyle = \frac{(-1)^n}{q_n\left(\frac{1}{t_n} q_n + q_{n-1}\right)}.$    

Thus

$\displaystyle \vert x - c_n\vert$ $\displaystyle = \frac{1}{q_n\left(\frac{1}{t_n} q_n + q_{n-1}\right)}$    
  $\displaystyle < \frac{1}{q_n(a_{n+1} q_n + q_{n-1})}$    
  $\displaystyle = \frac{1}{q_n \cdot q_{n+1}} \leq \frac{1}{n(n+1)} \rightarrow 0.$    

(In the inequality we use that $ a_{n+1}$ is the integer part of $ \frac{1}{t_n}$, and is hence $ \leq \frac{1}{t_n}$.)

$ \qedsymbol$


next up previous
Next: About this document ... Up: Lecture 18: Continued Fractions Previous: The Continued Fraction Algorithm
William A Stein 2001-10-24