Basic Results
Theorem: Let be a nonnegative real. If is irrational, it has a unique simple continued fraction expansion. Otherwise there are exactly two expansions representing , namely and .
Proof: Let for all . Then
By inductive assumption are uniquely determined.
We have since is a positive integer. Then If , then and uniqueness of follows by induction. Otherwise and the fraction must terminate here. Then is rational and we could discard and add one to .
Actually there's a hole in the proof. We neglected to rule out that an infinite continued fraction cannot approach a rational. We show this once we derive some bounds.
Define as in the proof. Then by induction,
Observe that to convert a rational to a simple continued fraction, we perform Euclid's algortihm on and . The quotients become the continued fraction sequence.
The recurrence relation of continued fractions is also related to division with remainder in the Euclid's algorithm.
Theorem: Let be coprime. If is expanded into a continued fraction, then is a solution of where is the number of convergents.
Proof: We have and for all .
Lemma: For any distinct rationals and , the sequence
is strictly increasing, or strictly decreasing for any nonnegative real .
Proof: Calculation shows the sign of determines the direction of the sequence.
Visualizing the graph of for nonnegative is instructive. We have part of a hyperbola with -intercept at , and as . By considering the derivative, either monotonically increases or decreases, implying the last lemma.
Sequences of convergents for describe sequences of graphs whose ranges for nonnegative are successively narrower and approach the horizontal line . Somewhere on all but the last graph, there is a unique for which .