You are on page 1of 13

Continued Fractions

Cahlen Humphreys
Abstract. Continued fractions are a fundamental part of number theory. We will prove that real numbers can be represented through the expansion of simple continued fractions. Convergents are a necessary concept in which we will moderately investigate to help understand the expansion of these continued fractions. Moreover, examples will be provided to further reinforce the steps needed to be taken in order to represent an arbitrary real number as an continued fraction expansion.

AMS Subject Classication Number(s): 11A55, 40A15 Keywords: Continued fractions, simple continued fractions, partial quotients, convergents. 1. Introduction When we look at a number like it can be quite daunting trying to comprehend the fact that it has no discernible pattern with regard to its decimal expansion. Further, it is quite tedious and in some ways not very insightful to observe the decimal expansion by itself. For this reason, among others, continued fractions play and integral role in the theory of numbers. Suppose for example that one wants to nd a good approximation for but is limited to only the rational approximation 22/7. For years it was commonly accepted as being a decent approximation, however with the theory of continued fractions we can approximate the value of more eciently. Continued fractions have been subject to investigation throughout the seventeenth and eighteenth centuries, and continue to be investigated today (C.D. Olds pg. 3). The earliest and most popular observance of a continued fraction comes from the days of Euclid and his algorithm for nding the greatest common divisor of two numbers. One can simply manipulate the algebra in the algorithm and easily produce a continued fraction. In this paper we are more intersted in how to represent real numbers, both rational and irrational, through the expansion of a continued fraction. Convergents are an important concept with regard to continued fractions, especially when we are looking at the approximation of numbers. Lets take the
2010 Mathematics Subject Classication. Primary 11A55.
1

CAHLEN HUMPHREYS

lengendary as a quick example. Observe that 22/7 is only the rst convergent of the rational approxmation through a continued fraction. That is, 1 22 =3+ . 7 7 However if we go further to the second convergent we get, 333 =3+ 106 and one additional step we get that 355 =3+ 113 1 7+ 1 15 + . 1 7+ 1 15

1 1 It is clear that our approximation for gets more and more precise the convergents a get larger and larger. This is explained more in Section 6 and 7 where we discuss convergents and expansions for irrational numbers through continued fractions. So lets begin our investigation with continued fractions. Beginning with notation and denitions and ending with the expansion of rational and irrational numbers. 2. Denitions and Notation Observe the expression below a1 + a2 + a3 + b1 b2 b3 a4 + b4 .. . .

This expression is known as a continued fraction, and this is its most basic form. The numbers a1 , a2 , a3 , . . . and b1 , b2 , b3 , . . . may be real numbers or complex numbers. Further, a continued fraction can be innite or nite. We will only be discussing simple continued fractions which have the form a1 + a2 + a3 + 1 1 1 a4 + 1 ..

where all the numerators after the rst term are 1. The rst term a1 can be positive, negative, or zero. The numbers a1 , a2 , a3 , . . . are all positive.

CONTINUED FRACTIONS

Finite simple continued fractions will be represented as the form a1 + a2 + a3 + a4 + .. 1 1 1 1 .+ 1 an1 + 1 an

where there are only nitely many terms a1 , a2 , a3 , . . . , an . One should note that continued fractions can also take on innitely many ai s, which we will discuss later in this paper. Unless otherwise indicated, all of our examples and theorems will deal exclusively with simple continued fractions. Another convenient way to write these nite simple continued fractions is of the form 1 1 1 [a1 , a2 , . . . , an ] = a1 + a2 + a3 + . . . + an where after each + we lower the fraction. We will also occasionally restrict our notation to the simple compact form [a1 , a2 , a3 , . . . , an ] and we call a1 , a2 , a3 , . . . , an simply partial quotients. 3. Example of Rational Expansion 3.1. Example. Rational numbers are of the form p/q where p and q are inte67 , which can represented through gers, and q = 0. Consider the rational number 13 a simple nite continued fraction. Observe, 67 =5+ 13 1 1 6+ 2 =5+ 1 1 6+2

and we can also represent this expansion simply as [5, 6, 2]. Further observe that this can be conrmed through simply using the Euclidean Algorithm. 67 = 5 13 + 2 13 = 6 2 + 1 We now rewrite these equations as 67 2 =5+ 13 13 13 1 =6+ 2 2

CAHLEN HUMPHREYS

Note that we get the continued fraction above by simply substituting the second equation into the rst. Note that, 1 67 =5+ 13 13 2 so we can now substitute to get 67 =5+ 13 1 6+ 1 2 =5+ 1 6+ 1 2

which is our continued fraction as desired. Observe that we can convert the continued fraction back into rational form. 1 1 67 2 = =5+ =5+ =5+ 13 13 1 12 1 13 6+ + 2 2 2 2 So in some way it is easier to go from a continued fraction to a rational number, rather than the other way around. 5+ 3.2. Example. Lets take the rational number 125/7 and nd the simple continued fraction expansion. Observe that 125 = 7 17 + 6. Now we divide by 7 to get 125 6 = 17 + 7 7 1 = 17 + . 7 6 We now repeat the process with 7/6, observe, 7=61+1 and dividing by 6 we get 7 1 =1+ . 6 6 Now we substitute this into our previous equation and get 125 = 17 + 7 . 1 1+ 6 1 1

Again, we repeat the process with 6/1 and get 6 = 1 6 + 0. 1

CONTINUED FRACTIONS

Observe that our remainder is now 0, so this is the farthest we can go with expanding this number into a continued fraction. Hence, our nal product is, = [17, 1, 6]. 1 1+ 6 One should note that this is the standard procedure for expanding rational numbers into continued fractions. 4. Expansion of Rational Fractions In the previous example we saw that we could represent a rational number as a continued fraction. We now wish to show that this is possible for any rational number. Theorem 4.1 (C.D. Olds (1.1) pg 14). Any nite simple continued fraction represents a rational number. Conversely, any rational number p/q can be represented as a nite simple continued fraction; with the exceptions to be noted below, the representation, or expansion, is unique. Proof. Going from a nite simple continued fraction to a rational number is not particularly dicult, as shown in the example above. So we will prove the converse, that any rational number can be represented as a nite simple continued fraction. Let p/q , q > 0, be any rational fraction. We divide p by q to obtain r1 p = a1 + , (4.1) q q 125 = 17 + 7 1

0 r1 q,

where a1 is the unique integer so chosen as to make the remainder r1 greater than or equal to 0 and less than q . Note that a1 can be negative, zero, or positive as explained in the denitions section. If r1 = 0, the process terminates and the continued fraction expansion for p/q is [a1 ]. If r1 = 0, we write (4.2) 1 p = a1 + , q q r1 0 < r1 < q,

and repeat the division process, dividing q by r1 to obtain q r2 (4.3) = a2 + , 0 r2 < r1 . r1 r1 Notice now that q/r1 is a positive fraction, so a2 is the unique largest positive integer that makes the remainder r2 a number between 0 and r1 . If r2 = 0, the process stops and we substitute q/r1 = a2 from (4.3) into (4.2) to obtain, p 1 = a1 + = [a1 , a2 ] q a2 as the continued fraction expansion for p/q .

CAHLEN HUMPHREYS

If r2 = 0, we write (4.3) in the form 1 q = a2 + , r1 r1 r2

(4.4)

0 < r2 < r1 ,

and repeat the division process using r1 /r2 . We observe that the calculations stop when we come to a remainder rn = 0. Is it possible never to arrive at an rn which is zero, so that the division process continues indenitely? This is clearly impossible, for the remainders r1 , r2 , r3 , . . . form a decreasing sequence of non-negative integers q > r1 > r2 > r3 > . . . and unless we come eventually to a remander rn which is equal to zero, we shall be in the ridiculous position of having discovered an innite number of distinct positive integers less than a nite positive integer q . Hence, by successive divisions we obtain a sequence of equations: r1 p = a1 + , q q q r2 = a2 + , r1 r1 r1 r3 = a3 + , r2 r2 (4.5) ............... rn3 rn1 = an1 + , rn2 rn2 0 rn2 = an + = an + 0, rn1 rn1 ......... 0 < r1 < q,

0 < r2 < r1 ,

0 < r3 < r2 ,

0 < rn1 < rn2 ,

rn = 0,

terminating, after a certain nite number of divisions, with the equation in which the remainder rn is equal to zero. It is now easy to represent p/q as a nite simple continued fraction. From the rst two equations in (4.5) we have 1 1 p = a1 + = a1 + q q 1 a2 + r1 r1 r2

CONTINUED FRACTIONS

Using the third equation in (4.5) we replace r1 /r2 by 1 , r2 r3 and so on, until we nally obtain the expression p 1 1 1 (4.6) = a1 + = [a1 , a2 , . . . , an ] q a2 + a3 + . . . + an a3 + The uniqueness of the expansion (4.6) follows from the manner in which the ai s are calculated. This statement must be accompanied, however, by the remark that once the expansion has been obtained we can always modify the last term an so that the number of terms in the expansion is either even or odd, as we choose. To see this, notice that if an is greater than 1 we can write 1 = an 1 (a 1) + 1 1 ,

so that (4.6) can be replaced by p (4.7) = [a1 , a2 , . . . , an1 , an 1, 1]. q On the other hand, if an = 1, then 1 1 an1 + an so that (4.6) becomes (4.8) p = [a1 , a2 , . . . , an2 , an1 + 1]. q = 1 , (an1 + 1)

5. Example of Irrational Expansion Much like our rst example, irrational numbers can also be represented as simple continued fractions. In the case of rational numbers, we can represent them with nitely many partial quotients. In the case of irrational numbers we will observe that the expansion is innite, hence we will have innitely many partial quotients. Observe that through each step we obtain and more precise approximation of the irrational number. 5.1. Example. Appropriately, we will continue our example by expanding one of the most popular irrational numbers in history, that being . The largest integer < = 3.14 . . . is a1 = 3. Thus, 1 1 =3+ . x1 x1 Now we solve this equation for x1 and get = a1 + x1 = 1 7.06251. 3

CAHLEN HUMPHREYS

So at the point were at 1 . 1 3 Then we continue with the same process as the beginning. The largest integer < x1 = 7.06251 . . . is a2 = 7. Thus, =3+ =3+ 1 1 7+ x2 1 7+ 3= 1 7+ 7+ 1 x2 1 x2 .

As before, we solve for x2 and we get =3+

1 1 = x2 3 1 22 7 = x2 3 3 15.9966 x2 = 22 7 Continuing this process innitely we get the simple continued fraction expansion of =3+ 7+ 1 1 15 + 1 .. . = [3, 7, 15, . . . ]

5.2. Example. Lets solve another irrational number, take 3 for example. We rst take the lowest integer values of 3, thus a0 = 1. So we begin with 1 3=1+ x1 and solving for x1 we get, x1 = So at this point we are at 3=1+ 1 1 31 1 . 31

CONTINUED FRACTIONS

and the lowest integer value of x1 1.3660 . . . , so a1 = 1. We now have, x1 = a1 + From here we substitute for x1 and get which implies that x2 = 1 1 =1+ x2 31 1 1 =1+ . x2 x2

31 2.732 . . . . 2 3 And we repeat by taking the lowest integer value of x2 which is a2 = 2. At this point we are at 1 3=1+ . 1 1+ 1 2+ x3 Now we want to solve for x3 1 x2 = 2 + x3 and after we substitute for x2 we get 31 1 =2+ x 2 3 3 which simplies to 2 3 x3 = 1.3660 . . . . 3 35 Observe that x3 is approximately the same value as x1 , so we are going to get a pattern and can stop here. Hence, we have in the end that 1 = [1, 1, 2, . . . ] 3=1+ 1 1+ 1 2+ 1 1+ . 2 + .. where 1 and 2 repeat innitely. 6. Convergents Before we begin to explain the expansion of irrational numbers it is vital that we discuss the concept of convergents of continued fractions. In this section we will be looking at three dierent theorems that will be essential in proving that rational numbers can be represented as nite continued fraction, and more importantly, that irrational numbers can be represented as innite continued fractions. Convergents are essentally cutting up continued fraction expansions into segments, and then solving them for that segment. We can easily approximate numbers to

10

CAHLEN HUMPHREYS

very precise values when utilizing convergents correctly. Take the continued fraction = r1 = [a1 , a2 , a3 , . . . , an ] = (6.1)
p q p q

= [a0 , a1 , a2 , . . . , an ], and let q=p

. Then we can represent p and q as

p = a0 q + q ,

which we require for the next few theorems. If we represent a segment of as sk = [a0 , a1 , a2 , . . . , ak ] where a < n, then we call it the k th-order convergent (or approximant ) of the continued from . This concept is dened in exactly the same way for nite and innite continued fractions. The only dierence is that a nite continued fraction has a nite number of convergents, whereas an innite continued fraction has an innite number of them. Take for example an n th-order continued fraction = [a0 , a1 , a2 , . . . , an ], then obviously pn = ; qn such a continued fraction has n + 1 convergents (of orders, 0, 1, 2, . . . , n). Theorem 6.1 (Khinchin (1) pg. 4). (the rule for the formation of convergents). For arbitrary k 2, pk = ak pk1 + pk2 , (6.2) qk = ak qk1 + qk2 . Proof. In the case of k = 2, the formulas in (6.2) are easily veried directly. Let us suppose that they are true for all k < n. Let us then consider the continued fraction [a1 , a2 , a3 , . . . , an ] and let us denote by pr /qr its r th-order convergent. Then by (6.1) pn = a0 pn1 + qn1 , qn = pn1 . And since, by hypothesis, pn1 = an pn2 + pn3 , qn1 = an qn2 + qn3 (here, we have an rather than an1 because the fraction [a1 , a2 , a3 , . . . , an ] begins with a1 and not with a0 ), it follows that pn = a0 (an pn2 + pn3 ) + (an qn2 + qn3 ) = an (a0 pn2 + qn2 ) + (a0 pn3 + qn3 ) = an pn1 + pn2 , qn = an pn2 + pn3 = an qn1 + qn2 , which completes the proof.

CONTINUED FRACTIONS

11

These recursion formulas in (6.2), which express the numerator and denominator of an n th-order convergent in terms of the element an and the numerators and denominators of the two preceding convergets, serve as the formal basis of the entire theory of continued fractions. Theorem 6.2 (Khinchin (5) pg. 7). For arbitrary k (1 k n), (6.3) [a0 , a1 , a2 , . . . , an ] = pk1 rk + pk2 . qk1 rk + qk2

(Here, pi , qi , ri refer to the continued fraction on the left side of this equation.) Proof. We omit this proof for the sake of brevity. To every innite continued fraction (6.4) [a0 , a1 , a2 , . . . ],

there corresponds an innite sequence of convergents (6.5) pk p0 p1 , ,..., ,.... q0 q1 qk

Every convergent is some real number. If the sequence (6.5) converges, that is, if it has a unique limit , it is natural to consider this number as the value of the continued fraction (6.4) and to write = [a0 , a1 , a2 , . . . ]. The continued fraction itself is then said to converge. If the sequence does not have a denite limit, we say that the continued fraction diverges. Theorem 6.3 (Khinchin (7) pg. 8). If the innite continued fraction [a0 , a1 , a2 , . . . ] converges, so do all of its remainders; conversely, if at least one of the remainders of the continued fraction [a0 , a1 , a2 , . . . ] converges, the continued fraction itself converges. Proof. Let us agree to denote by pk /qk the convergents of a given continued fraction [a0 , a1 , a2 , . . . ], and by pk /qk the convergents for any of its remainders, for example, rn . From Theorem 6.2 we have, we have (6.6) pn1 qk + pn2 pn+k k = [a0 , a1 , a2 , . . . , an+k ] = (k = 0, 1, . . . ). p qn+k qn1 qk + qn2
k

It follows immediately that if the remainder rn converges, that is, if as k the fraction pk /qk approaches a limit which we shall also denote by rn , then the fraction pn+k /qn+k will converge to a limit equal to (6.7) = pn1 rn + pn2 . qn1 rn + qn2

By solving (6.6) for pk /qk , we establish the validity of the converse, thus completing the proof of the theorem.

12

CAHLEN HUMPHREYS

7. Expansion of Irrational Numbers The procedure for expanding an irrational number is fundamentally the same as that used for rational numbers. Therefore, we introduce a new theorem which validates the innite simple continued fraction expansion of an irrational number. Theorem 7.1 (Khinchin (14) pg. 16). To every real number , there corresponds a unique continued fraction with value equal to . This fraction is nite if is rational and innite if is irrational. Proof. We denote a0 the largest integer not exceeding . If is not an integer, the relation 1 (7.1) = a1 + r1 allows us to determine the number r1 . Here, clearly, r1 > 1, since 1 (7.2) = a0 < 1. r1 In general, if rn is not an integer, we denote by an the largest integer not exceeding rn and dene the number rn+1 by the relation 1 (7.3) rn = an + . rn+1 This procedure can be continued as long as rn is not an integer; here, clearly, rn > 1 (n 1). Equation (7.1) shows that = [a0 , r1 ]. Suppose that, in general, (7.4) Then, from (7.3), we have = [a0 , a1 , a2 , . . . , an1 , an , rn+1 ]; thus, (7.4) is valid for all n (assuming, of course, that r1 , r2 , . . . , rn1 are not integers). If the number is rational, all the rn still clearly be rational. It is easy to see that, in this case, our process will stop after a nite number of steps. If, for example, rn = a/b, then a ban c rn an = = , b b where c < b, since rn an < 1. Equation (7.3) then gives b rn+1 = c (provided c is not equal to zero, that is, if rn is not an integer; if rn is an integer, our assertion is already satised). Thus, rn+1 has a smaller denominator than does rn . It follows from this that if we consider r1 , r2 , . . . , we must eventually come to an integer rn = an . But, in this case, (7.4) asserts that the number is represented by a nite continued fraction, the last element of which is an = rn > 1. = [a0 , a1 , a2 , . . . , an1 , rn ].

CONTINUED FRACTIONS

13

If is irrational, then all the rn are irrational and our process is innite. Setting pn [a0 , a1 , a2 , . . . , an ] = qn (where the fraction pn /qn is irreducible and qn > 0), we have, by Theorem 6.3 and (7.4), pn1 rn + pn2 = (n 2). qn1 rn + qn2 On the other hand, it is obvious that pn pn1 an + pn2 = , qn qn1 an + qn2 so that pn (pn1 qn2 qn1 pn2 )(rn an ) = qn (qn1 rn + qn2 )(qn1 an + qn2 ) and, consequently, pn 1 1 < < 2 qn (qn1 rn + qn2 )(qn1 an + qn2 ) qn Thus, pn as n ; qn but this means that the innite continued fraction [a0 , a1 , a2 , . . . ] has as its value the given number . Thus it is shown that any number can be represented by a continued fraction; this fraction is nite if is rational and innite if is irrational. 8. Conclusion We have gone over quite a few dierent theorems in this paper, however all were geared towards proving that both rational real numbers and irrational real numbers can be represented as continued fractions. The former being a nite expansion, and the latter being an innite expansion. Continued fractions help us look at and analyze numbers in a way which is incredibly useful in many dierent branches of mathematics.

References
1. Olds, C.W., Continued Fractions, Random House, Stanford, CA, 1963. 2. Khinchin, A. Ya., Continued Fractions, Dover Publications, Chicago, IL, 1964. Boise State University E-mail address : cahlenhumphreys@u.boisestate.edu

You might also like