next up previous
Next: What About Higher Degree? Up: Lecture 19: Continued Fractions Previous: Quadratic Irrationals

Periodic Continued Fractions

Definition 2.1   A periodic continued fraction is a continued fraction $ [a_0, a_1, \ldots, a_n, \ldots]$ such that

$\displaystyle a_n = a_{n+h}
$

for a fixed positive integer $ h$ and all sufficiently large $ n$. We call $ h$ the period of the continued fraction.

Example 2.2   Consider the periodic continued fraction $ [1,2,1,2,\ldots] = [\overline{1,2}]$. What does it converge to?

$\displaystyle [\overline{1,2}] = 1+\frac{1}{2+\frac{1}{1+\frac{1}{2+ \frac{1}{1+\cdots}}}},$

so if $ \alpha=[\overline{1,2}]$ then

$\displaystyle \alpha = 1 + \frac{1}{2+\alpha}.
$

Thus $ 2\alpha + \alpha^2 = 2 + \alpha + 1$, so

$\displaystyle \alpha^2 + \alpha - 3 = 0$    and $\displaystyle \quad \alpha = \frac{-1+\sqrt{7}}{2}.
$

Theorem 2.3   An infinite integral continued fraction is periodic if and only if it represents a quadratic irrational.

Proof. ( $ \Longrightarrow$) First suppose that

$\displaystyle [a_0, a_1, \ldots, a_n, \overline{a_{n+1},\ldots, a_{n+h}}]$

is a periodic continued fraction. Set $ \alpha=[a_{n+1},a_{n+2}, \ldots]$. Then

$\displaystyle \alpha = [a_{n+1},\ldots, a_{n+h}, \alpha],
$

so

$\displaystyle \alpha = \frac{\alpha p_{n+h} + p_{n+h-1}}{\alpha q_{n+h} + q_{n+h-1}}.
$

(We use that $ \alpha$ is the last partial convergent.) Thus $ \alpha$ satisfies a quadratic equation. Since the $ a_i$ are all integers, the number

$\displaystyle [a_0, a_1, \ldots ]$ $\displaystyle = [a_0, a_1, \ldots, a_n, \alpha]$    
  $\displaystyle = a_0 + \frac{1}{a_1 + \frac{1}{a_2 + \cdots + \alpha}}$    

can be expressed as a polynomial in $ \alpha$ with rational coefficients, so $ [a_0, a_1, \ldots]$ also satisfies a quadratic polynomial. Finally, $ \alpha\not\in\mathbb{Q}$ because periodic continued fractions have infinitely many terms.


( $ \Longleftarrow$) This direction was first proved by Lagrange. The proof is much more exciting! Suppose $ \alpha\in\mathbb{R}$ satisfies a quadratic equation

$\displaystyle a \alpha^2 + b\alpha + c = 0$

with $ a, b, c\in\mathbb{Z}$. Let $ [a_0, a_1, \ldots]$ be the expansion of $ \alpha$. For each $ n$, let

$\displaystyle r_n = [a_n, a_{n+1}, \ldots],
$

so that

$\displaystyle \alpha = [a_0, a_1, \ldots, a_{n-1}, r_n].
$

We have

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

Substituting this expression for $ \alpha$ into the quadratic equation for $ \alpha$, we see that

$\displaystyle A_n r_n^2 + B_n r_n + C_n = 0,$

where

$\displaystyle A_n$ $\displaystyle = a p_{n-1}^2 + b p_{n-1} q_{n-1} + c q_{n-1}^2,$    
$\displaystyle B_n$ $\displaystyle = 2a p_{n-1} p_{n-2} + b(p_{n-1} q_{n-2} + p_{n-2} q_{n-1}) + 2c q_{n-1} q_{n-2},$    
$\displaystyle C_n$ $\displaystyle = a p_{n-2}^2 + b p_{n-2} q_{n-2} + c p_{n-2}^2.$    

Note that $ A_n, B_n, C_n\in\mathbb{Z}$, that $ C_n = A_{n-1}$, and that

$\displaystyle B^2 - 4A_n C_n = (b^2- 4ac)(p_{n-1}q_{n-2} - q_{n-1}p_{n-2})^2 = b^2 - 4ac.
$

Recall from the proof of Theorem 2.3 of the previous lecture that

$\displaystyle \left\vert \alpha - \frac{p_{n-1}}{q_{n-1}}\right\vert
< \frac{1}{q_n q_{n-1}}.
$

Thus

$\displaystyle \left\vert \alpha q_{n-1} - p_{n-1}\right\vert < \frac{1}{q_n} < \frac{1}{q_{n+1}},
$

so

$\displaystyle p_{n-1} = \alpha q_{n-1} + \frac{\delta}{q_{n-1}}$   with $\displaystyle \vert\delta\vert < 1.
$

Hence

$\displaystyle A_n$ $\displaystyle = a\left(\alpha q_{n-1} + \frac{\delta}{q_{n-1}}\right)^2 +b\left(\alpha q_{n-1} + \frac{\delta}{q_{n-1}}\right)q_{n-1} +c q_{n-1}^2$    
  $\displaystyle = (a\alpha^2 + b\alpha + c)q_{n-1}^2 + 2a\alpha\delta + a\frac{\delta^2}{q_{n-1}^2} + b\delta$    
  $\displaystyle = 2a\alpha\delta + a\frac{\delta^2}{q_{n-1}^2} + b\delta.$    

Thus

$\displaystyle \vert A_n\vert = \left\vert 2a\alpha\delta + a\frac{\delta^2}{q_{n-1}^2} + b\delta\right\vert
< 2\vert a\alpha\vert + \vert a\vert + \vert b\vert.
$

Thus there are only finitely many possibilities for the integer $ A_n$. Also,

$\displaystyle \vert C_n\vert = \vert A_{n-1}\vert$    and $\displaystyle \quad
\vert B_n\vert = \sqrt{b^2 - 4(ac-A_n C_n)},
$

so there are only finitely many triples $ (A_n, B_n, C_n)$, and hence only finitely many possibilities for $ r_n$ as $ n$ varies. Thus for some $ h>0$,

$\displaystyle r_n = r_{n+h}.
$

This shows that the continued fraction for $ \alpha$ is periodic. $ \qedsymbol$


next up previous
Next: What About Higher Degree? Up: Lecture 19: Continued Fractions Previous: Quadratic Irrationals
William A Stein 2001-10-25