In mathematics, a continued fraction is an expression such as

where a0 is some integer and all the other numbers an are positive integers. The above expression is abbreviated as x = [a0; a1, a2, a3]. Longer expressions [a0; a1, a2, ..., an] are defined analogously. One may also define infinite continued fractions as limits:

This limit exists for any choice of positive integers a1, a2, a3 ...

For finite continued fractions, note that

So, for every finite continued fraction, there is another finite continued fraction that represents the same number, for instance
[2; 3, 1] = [2; 4] = 9/4 = 2.25

Every finite continued fraction is rational, and every rational number can be represented in precisely two different ways as a finite continued fraction (in one representation the final term in the continued fraction is 1; in the other, shorter, representation the final term is greater than 1). Every infinite continued fraction is irrational, and every irrational number can be represented in precisely one way as an infinite continued fraction.

An infinite continued fraction representation for an irrational numbers is mainly useful because its initial segments provide excellent rational approximations to the number. These rational numbers are called the convergents of the continued fraction. Even-numbered convergents are smaller than the original number, while odd-numbered ones are bigger. For example, to calculate the convergents of pi, we set a0 = [π] = 3 (where [x] denotes the largest integer ≤ x), define u1 = 1/(π - 3) ≈ 113/16 = 7.0625 and a1 = [u1] = 7, u2 = 1/(u1 - 7) ≈ 31993/2000 = 15.9965 and a2 = [u2] = 15, u3 = 1/(u2 - 15) ≈ 1003/1000 = 1.003. Continuing like this, one can determine the infinite continued fraction of π as [3; 7, 15, 1, 292, 1, 1, ...]. The third convergent of π is [3; 7, 15, 1] = 355/113 = 3.14159292035... which is fairly close to the true value of π.

Let us suppose that the quotients found are, as above, [3; 7, 15, 1]. The following is a rule by which we can write down at once the convergent fractions which result from these quotients without developing the continued fraction.

The first quotient, supposed divided by unity, will give the first fraction, which will be too small, namely, 3/1. Then, multiplying the numerator and denominator of this fraction by the second quotient and adding unity to the numerator, we shall have the second fraction, 22/7, which will be too large. Multiplying in like manner the numerator and denominator of this fraction by the third quotient, and adding to the numerator the numerator of the preceding fraction, and to the denominator the denominator of the preceding fraction, we shall have the third fraction, which will be too small. Thus, the third quotient being 15, we have for our numerator (22 · 15 = 330) + 3 = 333, and for our denominator, (7 · 15 = 105) + 1 = 106. The third convergent, therefore, is 333/106. We proceed in the same manner for the fourth convergent. The fourth quotient being 1, we say 333 times 1 is 333, and this plus 22, the numerator of the fraction preceeding, is 355; similarly, 106 times 1 is 106, and this plus 7 is 113.

In this manner, by employing the four quotients [3; 7, 15, 1], we obtain the four fractions:

The fractions are alternately smaller and larger than the true value of π, and have the advantage of approaching nearer and nearer to its value in such wise that no other fraction can approach it nearer except the denominator be larger than the product of the denominator of the fraction in question and the denominator of the fraction following. For example, the fraction 22/7 is more than the true value, but it approaches to it nearer than any other fraction does whose denominator is not greater than the product of 7 by 106, that is 742.

The demonstration of the foregoing properties is deduced from the fact that if we seek the difference between one of the convergent fractions and the next adjacent to it we shall obtain a fraction of which the numerator is always unity and the denominator the product of the two denominators. Thus the difference between 22/7 and 3/1 is 1/7, in excess; between 333/106 and 22/7, 1/742, in deficit; between 355/113 and 333/106, 1/11978, in excess; and so on. The result being, that by employing this series of differences we can express in another and very simple manner the fractions with which we are here concerned, by means of a second series of fractions of which the numerators are all unity and the denominators successively be the product of every two adjacent denominators. Instead of the fractions written above, we have thus the series:

The first term, as we see, is the first fraction; the first and second together give the second fraction, 22/7; the first, the second and the third give the third fraction 333/106, and so on with the rest; the result being that the series entire is equivalent to the original value.

While one cannot discern any pattern in the infinite continued fraction expansion of π, this is not true for e, the base of the natural logarithm: e = [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, ...].

The numbers with periodic continued fraction expansion are precisely the solutions of quadratic equations with integer coefficients. For example, the golden ratio φ = [1; 1, 1, 1, 1, 1, ...] and √ 2 = [1; 2, 2, 2, 2, ...].

See also:

References

A. Ya. Khinchin; Continued Fractions; University of Chicago Press.