Lemma 4.3
If

is a reduced quadratic irrational, then the continued
fraction expansion of

is purely periodic. (The converse
is also true, and is easy to prove.)
Proof.
Let

be the floor of

.
Then

is reduced because

and

satisfies

.
Let
![$ [a_0, a_1, a_2, \ldots ]$](img81.png)
be the continued fraction
expansion of

. Then the continued
fraction expansion of

is
![$ [2a_0, a_1, a_2, \ldots]$](img83.png)
.
By Lemma
4.3, the continued fraction expansion of

is purely periodic, so
where

is the period. It follows that

, as claimed.
The following proposition shows that there are infinitely many
solutions to Pell's equation that arise from continued fractions.
Proof.
2By Lemma
4.4,
for

, the continued fraction of

can be written
in the form
where
Because

is the last partial convergent of the continued fraction
above, we have
Upon substituting

and simplifying, this reduces
to
Because the right-hand side is rational and

is irrational,

and
Multiplying the first of these equations by

and the second by

, and then adding them, gives
But
which proves the proposition.