Welcome to an introduction to continued fractions. A continued fraction is a special way to represent numbers as a sum of an integer plus a fraction, where the denominator is itself another continued fraction. This recursive pattern can continue indefinitely. The general form is shown on the right, where a_0 is the integer part, and the a_1, a_2, and so on are positive integers called partial quotients. For example, the mathematical constant pi can be approximated using a continued fraction as shown. This representation is both elegant and useful in number theory and approximation theory.
Let's see how to compute a continued fraction using a simple example: the decimal number 2.4. First, we separate the integer part 2 and the fractional part 0.4. We can express 0.4 as the fraction 2/5. Next, we take the reciprocal of this fraction, which gives us 5/2 or 2.5. We repeat the process with 2.5, separating it into 2 plus 0.5. Taking the reciprocal of 0.5 gives us 2. Since we've reached an integer, the process terminates. Now we can write 2.4 as a continued fraction: 2 plus 1 divided by 2 plus 1 divided by 2. This equals exactly 12/5, which is 2.4 in decimal. This method of finding continued fractions is essentially the Euclidean algorithm for finding greatest common divisors.
Continued fractions are particularly interesting when representing irrational numbers. While rational numbers always terminate in a finite continued fraction, irrational numbers have infinite continued fraction expansions. Even more fascinating, quadratic irrationals, like the square root of 2 or the golden ratio, have periodic continued fractions. Let's look at two famous examples. The golden ratio, phi, which equals one plus the square root of 5 divided by 2, has the simplest possible infinite continued fraction: it's just 1 plus 1 divided by 1 plus 1 divided by 1, and so on forever. This elegant pattern reflects the golden ratio's unique mathematical properties. Another example is Euler's number e, the base of natural logarithms. Its continued fraction starts with 2, followed by a pattern of mostly 1s with occasional other integers. These representations reveal deep mathematical structures and provide excellent rational approximations of these irrational numbers.
Continued fractions have numerous practical applications. One of the most important is finding the best rational approximations of irrational numbers. Let's look at approximating pi using continued fractions. The continued fraction expansion of pi begins with 3, 7, 15, 1, and so on. By taking successive convergents, we get increasingly accurate approximations. The first convergent is simply 3. The second convergent, using the first two terms, gives us 22 divided by 7, which equals approximately 3.1429. This is the familiar approximation of pi that many people learn in school. The third convergent, 333 divided by 106, gives us approximately 3.1415, which is even closer to pi. The fourth convergent, 355 divided by 113, gives us approximately 3.1416, which is remarkably accurate. In fact, the fraction 355/113 is an exceptionally good approximation of pi, accurate to six decimal places despite having relatively small numerator and denominator. This demonstrates the power of continued fractions for finding optimal rational approximations.
To summarize what we've learned about continued fractions: Continued fractions are a special representation that can express any real number as a sequence of integers. Rational numbers always have finite continued fraction expansions, while irrational numbers have infinite expansions. Quadratic irrationals, such as square roots of non-perfect squares, have periodic continued fractions. One of the most valuable properties of continued fractions is that they provide the best possible rational approximations of irrational numbers with the smallest possible denominators. This makes them extremely useful in various fields including number theory, where they help solve Diophantine equations; music theory, where they're used to design musical scales and intervals; and astronomy, where they help analyze planetary motion periods. The elegance and utility of continued fractions demonstrate the deep connections between different areas of mathematics and their practical applications.