Periodic Continued Fractions
A periodic continued fraction is periodic if the sequence eventually repeats, i.e there exists some with for all . Our first example of a continued fraction, , is periodic and turned out to be . In fact:
Theorem: Any periodic continued fraction represents a root of a quadratic equation with integer coefficients.
Proof: Let . For some we have . Let be the convergents of . Then
thus satisfies a quadratic equation with integer coefficients.
As the same is true for .
The converse is also true:
Theorem: An irrational root of a where are integers has a periodic continued fraction expansion.
Proof: Let be an irrational root with continued fraction expansion , and define . Recall , which we relabel as
From results on the convergents we have
for some reals of absolute value less than 1.
Substituting into the quadratic gives where
If we show are bounded, that is, their magnitude is less than some positive integer depending only on , then can be a solution of only a finite number of quadratic equations. Then as is irrational, the continued fraction expansion is infinite, and since can only take finitely many possible values, eventually the fraction repeats itself.
Firstly,
Using and the triangle inequality yields
showing is bounded. Replacing with shows is bounded.
As for , we can either show by direct computation or that
Since are successive convergents, and are opposite in sign, so:
From the definitions of and ,
thus , that is,
Pure Periodicity
Suppose . Then so must be a root of
The left-hand side takes a negative value when , and a positive value when , thus there is root in and it is the conjugate of .
A positive root of a quadratic equation with integer coefficients is called a reduced quadratic surd if it is greater than 1 and its conjugate lies in .
Theorem: A real has a pure periodic fraction expansion if and only if is a reduced quadratic surd.
Proof: We have just seen the proof for one direction. As for the other, let let be a quadratic equation for which is reduced quadratic surd. Let . Define , Let be the conjugate of .
Considering gives a quadratic equation for . Let be the other solution, the conjugate of . We have and . Since neither root is equal to , and quadratic equations have two roots, we have . Since and we see , hence is also a reduced quadratic surd. Inducting shows is a reduced quadratic surd for all , and that .
Since , this last equation implies .
Now suppose the continued fraction expansion for repeats at for some and . Then and , and hence . Repeating the argument gives
Corollary: The continued fraction expansion of where is a nonsquare positive integer has the form
The same can be said for any positive real of the form where is an integer and is a nonsquare positive integer.