Encyclopedia  |   World Factbook  |   World Flags  |   Reference Tables  |   List of Lists     
   Academic Disciplines  |   Historical Timeline  |   Themed Timelines  |   Biographies  |   How-Tos     
Sponsor by The Tattoo Collection
Continued fraction
Main Page | See live article | Alphabetical index

Continued fraction

In mathematics, a continued fraction is an expression such as

where a0 is some integer and all the other numbers an are positive integers. Longer expressions are defined analogously. If the numerators are allowed to differ from unity, the resulting expression is a generalized continued fraction.

Table of contents
1 Motivation
2 Calculating continued fraction representations
3 Notations for continued fractions
4 Finite continued fractions
5 Infinite continued fractions
6 Some Useful Theorems
7 The continued fraction expansion of π
8 Other continued fraction expansions
9 External links
10 References


Continued fractions are motivated by a desire to have a "mathematically pure" representation for the real numbers. The most well-known representation, of course, is the decimal expansion. In this representation, the number π, for example, is represented by the sequence of integers {3, 1, 4, 1, 5, 9, 2, ...}. Notationally, we say that the sequence of integers {ai} represents the real number r if

and each ai (except possibly a0, which may be any integer) is an element of {0, 1, 2, ..., 9}.

This representation has some problems, however. One problem is the appearance of the arbitrary constant 10 in the formula above. Why 10? This is because of a biological accident, not because of anything related to mathematics. Another problem is that many simple numbers lack finite representations in this system. For example, the number 1/3 is represented by the infinite sequence {0, 3, 3, 3, 3, ....}.

Continued fraction notation is a representation for the real numbers that evades both these problems. Let's consider how we might describe a number like 415/93, which is around 4.4624. This is approximately 4. Actually it is a little bit more than 4, about 4 + 1/2. But the 2 in the denominator is not correct; the correct denominator is a little bit more than 2, about 2 + 1/6, so 415/93 is approximately 4 + 1/(2 + 1/6). But the 6 in the denominator is not correct; the correct denominator is a little bit more than 6, actually 6+1/7. So 415/93 is actually 4+1/(2+1/(6+1/7)). This is exact.

By dropping the redundant parts of the expression 4+1/(2+1/(6+1/7)), we get the abbreviated notation [4; 2, 6,\n7].

The continued fraction representation of real numbers can be defined in this way. It has several desirable properties:

This last property is extremely important, and is not true of the conventional decimal representation. Truncating the decimal representation of a number yields a rational approximation of that number, but not usually a very good approximation. For example, truncating 1/7 = 0.142857... at various places yields approximations such as 142/1000, 14/100, and 1/10. But clearly the best rational approximation is "1/7" itself. Truncating the decimal representation of π yields approximations such as 31415/10000 and 314/100. The continued fraction representation of π begins [3; 7, 15, 1,\n292, ...]. Truncating this representation yields the excellent rational approximations 3, 22/7, 333/106, 355/113, ... The denominators of 314/100 and 333/106 are almost the same, but the error in the approximation 314/100 is nineteen times as large as the error in 333/106. As an approximation to π, [3; 7, 15,\n1] is accurate to better than one part per million.

Calculating continued fraction representations

Consider a real number r between 0 and 1. Let i be the integer part and f the fractional part of 1/r. Then the continued fraction representation of r is [0; i, ...], where "..." is the continued fraction representation of f, which is also between 0 and 1.

If r is not between 0 and 1, then it has the form i + f, where i is an integer and f is between 0 and 1; then r is represented as [i; ...].

To calculate a continued fraction representation of a number r, write down the integer part of r. Subtract this integer part from r. If the difference is 0, stop; otherwise find the reciprocal of the difference and repeat. The procedure will halt if and only if r was rational.

Notations for continued fractions

One can abbreviate a continued fraction as

or in the notation of Pringsheim

or another seldom used notation, similar to the above

One may also define infinite continued fractions as

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

Finite continued fractions

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

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).

Infinite continued fractions

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 a continued fraction , the first three convergents are

In words, the numerator of the third convergent is formed by multiplying the numerator of the second convergent by the third quotient, and adding the numerator of the first convergent. The denominators are formed similarly.

If successive convergents are found, with numerators and denominators then the relevant recursive relation is:

The successive convergents are given by the formula

Some Useful Theorems

If a0, a1, a2, ... is an infinite sequence of positive integers, define the sequences and recursively:

Theorem 1

For any positive

Theorem 2

The convergents of [a0, a1, a2, ...] are given by

Theorem 3

If the nth convergent to a continued fraction is , then

Corollary 1: Each convergent is in its lowest terms (for if and had a common divisor it would divide , which is impossible).

Corollary 2: The difference between successive convergents is a fraction whose numerator is unity:

Theorem 4

Each convergent is nearer to the n-th convergent than any of the preceding convergents. In symbols, if the rth convergent is considered to , then
for all .

Corollary 1: the odd convergents continually increase, but are always less than

Corollary 2: the even convergents continually decrease, but are always greater than .

Theorem 5

Corollary 1: any convergent is nearer to the continued fraction than any other fraction whose denominator is less than that of the convergent

Corollary 2: any convergent which immediately precedes a large quotient is a near approximation to the continued fraction.

The continued fraction expansion of π

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 preceding, 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:

These convergents are alternately smaller and larger than the true value of π, and approach nearer and nearer to π. The difference between a given convergent and π is less than the reciprocal of the product of the denominators of that convergent and the next convergent. For example, the fraction 22/7 is greater than π, but 22/7 - π is less than 1/(7x106), that is 1/742 (in fact, 22/7 - π is just less than 1/790).

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.

Other continued fraction expansions

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, ...].

However, most irrational numbers do not have any periodic or regular behavior in their continued fraction expansion. Nevertheless Khinchin proved that for almost all real numbers x, the ai (for i = 1,2,3...) have an astonishing property: their geometric mean is a constant (known as Khinchin's constant, K ≈ 2.6854520010...) independent of the value of x.

See also:

External links


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