### What is a continued fraction?

To introduce this web site, the most appropriate place to start is with a
definition of a continued fraction. A *continued fraction*
refers to all
expressions of the form

where a_{1},a_{2},a_{3},.... and
b_{1},b_{2},b_{3},... are either real or
complex values.
The number of terms can be either finite or infinite.

### What can I find at this site on continued fractions?

Let me answer this question by first explaining what you will not find at this site. You will not find any deep analysis of continued fractions. For those of you researching this area, I direct your attention to the resources.

Even though this site does not go into great analysis of continued fractions, it does cover some of the basic theorems of the field. For those of you who are "math-phobic," now would probably be a good time to leave.

When I created this site, my intention was to provide a brief introduction to this fascinating area of mathematics. I have aimed this presentation at those at my own level, that is, those at an undergraduate level with an interest in mathematics. For many, this may be a first introduction to continued fractions since this subject, if it is taught at all, is restricted to a single chapter in a number theory text. Hopefully this site will inspire others to study continued fractions in greater detail.

I have broken this site into four main pieces. In the first section, which is found below, I present some of the basic theorems about simple continued fractions. In the second, History, I have sketched out the past . In the third, Applications, I will allow the user to calculate continued fractions. I have created a number of interactive programs that convert rationals (or quadratic irrationals) into a simple continued fraction, as well as the converse. In the final section, resources, I have attempted to list some of the major works on continued fractions. I have also tried to find all the references to continued fraction on the World Wide Web.

### Some Basic Theory of Continued Fractions

In this section, I have provided some definitions that deal with continued fractions. After this, one will find a number of a theorems, complete with proofs, that deal with continued fractions.For optimal viewing of this page, please use a browser that supports subscripts and superscripts, for example, Netscape 2.0 or larger, or Microsoft Explorer.

is said to be a

The value of a

C

C

C

where A, B, and C, are integers. They are called quadratic irrationals since they are the roots of quadratic equations, specifically

b = a q_{1}+ r_{1}, 0 =< r_{1}< |a|

We can now do the same for the two numbers (a, r

a = r_{1}q_{2}+ r_{2}, 0 =< r_{2}< |r_{1}|

We continue the sequence. Eventually, the remainder must converge to zero. The last two terms of the sequence are

r_{n-2}= r_{n-1}q_{n}+ r_{n}

r_{n-1}= r_{n}q_{n+1}

The value r

x

where a, b, c, and P are given integers (P is square free, that is, it is not 1, 4, 9, 16, and so on), are indeterminate equations. In general, we are interested in finding integer solutions to these equations. Equations of the first form are called Diophantine equations. Those of the second form are named Pell's equations.

by the more effecient notation

PROOF: Let n be a rational number. Then p/q for some integers p and q. Suppose also that p and q are in lowest terms. To prove the statement, we make use of Euclid's Algorithm. By applying this algorithm, we can write

p = a_{1}q + r_{1}, 0 <= r_{1} < q,

q = a_{2}r_{1} + r_{2}, 0 <= r_{2} < r_{1},

r_{1} = a_{3}r_{2} + r_{3}, 0 <= r_{3} < r_{2},

:

:

r_{n-3} = a_{n-1}r_{n-2} + r_{n-1}, 0 <= r_{n-1} < r_{n-2},

r_{n-2} = a_{n}r_{n-1}.

The next step involves rearranging the algorithm in the following manner.

Now, sustituting each equation into the previous, we find that

which is a finite simple continued fraction, as desired.

To show the converse, we prove by induction that if a simple continued fraction has n terms, it is rational. Let X represent the value of the continued fraction. We first check the base case n = 1. Then

We now prove the inductive case. Assume the theorem is true for all i <= n. We now show that the theorem also holds for n+1. Let X be a continued fraction that is represented by n+1 terms. We wish to show that X is rational. So, we have

Note, however, that we can rewrite this expression as

where B is the continued fraction

But B is a continued fraction with n terms, and by our induction hypothesis, it can be written as a rational p/q. This implies that

By applying some simple algebra, we arrive at the following equality

Since a_{1}, as well as p and q, is an integer, X must be a rational.
Thus, the theorem is true for n+1, and by induction, it must hold for all
integers.

q_{i} = a_{i}q_{i-1} + q_{i-2}

PROOF: We will prove this statement by using induction. Let the continued
fraction [a_{1}; a_{2}, a_{3}, .... a_{n}]
be given. We need to first check the two base cases.

Both cases agree with the definition. We now assume that the statement is true for all i <= k. We wish to show that the statement is true for k+1. By definition,

We can rewrite this fraction in the following manner

The continued fraction now has k terms, and by hypothesis

The last step made use of the induction hypothesis for the subtitution. The theorem is thus true for k+1, and by induction, must hold for all integers.

*
for all i >= 0.
*

To prove this, we will once again do a proof by induction We first check the two base cases, that is, for i=1 and i=2.

Now we show that the above theorem holds for all k. Assume it holds for all i <= k, We want to show that the statement is true for k+1.

Since the statement is true for k+1, by induction, the theorem holds for all integers k.

PROOF: Let X be an irrational number, and suppose that its simple continued fraction is finite. Then the simple continued fraction has n terms where n is a postive integer. But by Theorem 1, the value of any continued fraction with a finite number of terms must be rational. Hence the continued fraction is equivalent to a rational, and thus, it cannot be equivalent to X. This provides us with the neccesary contradiction