In mathematics, a continued fraction is an expression such as
For finite continued fractions, note that
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 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:
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:
A. Ya. Khinchin; Continued Fractions; University of Chicago Press.