Anda di halaman 1dari 7

7-4-2008

Continued Fractions
A finite continued fraction is an expression of the form
1
a0 +
1
a1 +
a2 +
.. .
.
1
+
1
an1 +
an
It can also be written as [a0 ; a1 , a2 , . . . , an ].
Finite continued fractions with integer terms represent rational numbers.
Every rational number can be expressed as a finite continued fraction using the Euclidean Algorithm,
but the expression is not unique.
The kth convergent of [a0 ; a1 , a2 , . . . , an ] is (the value of) the continued fraction [a0 ; a1 , a2 , . . . , ak ].
The convergents oscillate about the value of the continued fraction.
The convergents of a continued fraction may be computed from the continued fraction using a recursive
algorithm. The algorithm produces rational numbers in lowest terms.

Definition. Let a0 , . . . an be real numbers, with a1 , . . . , an positive. A finite continued fraction is an


expression of the form
1
a0 +
1
a1 +
a2 +
.. .
.
1
+
1
an1 +
an
To make the writing easier, Ill denote the continued fraction above by [a0 ; a1 , a2 , . . . , an ]. In most cases,
the ai s will be integers.

Example.
47 13 1 1 1 1
=2+ =2+ = 2+ =2+ = 2+ .
17 17 17 4 1 1
1+ 1+ 1+
13 13 13 1
3+
4 4
47
In short form, = [2; 1, 3, 4].
17
A little bit of thought should convince you that you can express any rational number as a finite continued
fraction in this way. In fact, the expansion corresponds to the steps in the Euclidean algorithm. First,

47 = 2 17 + 13

1
17 = 1 13 + 4

13 = 3 4 + 1

4=41+0

Rewrite these equations as


47 13
=2+
17 17
17 4
=1+
13 13
13 1
=3+
4 4
You can get the continued fraction I found above by substituting the third equation into the second,
and then substituting the result into the first.
Since this is just the Euclidean algorithm, I can use the first two columns of the Extended Euclidean
Algorithm table to get the numbers in the continued fraction expansion:

a q
47 -
17 2
13 1
4 3
1 4

Notice that the successive quotients 2, 1, 3, and 4 are the numbers in the continued fraction expansion.

117
Example. Find the finite continued fraction expansion for .
17

a q
117 -
17 6
15 1
2 7
1 2

117 1
= [6; 1, 7, 2] = 6 + .
17 1
1+
1
7+
2

Lemma. Every finite continued fraction with integer terms represents a rational number.

Proof. If a0 Z, then [a0 ] is rational.

2
Inductively, suppose that a finite continued fraction with n 1 levels is a rational number. I want to
show that
1
a0 +
1
a1 +
a2 +
..
.
1
+
1
an1 +
an
is rational.
By induction,
1
x = a1 +
1
a2 +
a3 +
..
.
1
+
1
an1 +
an
is rational.
So
1 1
a0 + = a0 +
1 x
a1 +
a2 +
..
.
1
+
1
an1 +
an
is the sum of two rational numbers, which is rational as well.

Example. The continued fraction expansion of a rational number is not unique. For example,
47 1 1
= 2+ =2+ .
17 1 1
1+ 1+
1 1
3+ 3+
4 1
3+
1
And in general,
[a0 ; a1 , a2 , . . . , an1 , an ] = [a0 ; a1 , a2 , . . . , an1 , an 1, 1].

I want to talk about infinite continued fractions things that look like
1
a0 +
1
a1 +
1
a2 +
a3 +
..
.

3
In preparation for this, Ill look at the effect of truncating a continued fraction.

Definition. The kth convergent of the continued fraction [a0 ; a1 , a2 , . . . , an ] is

ck = [a0 ; a1 , a2 , . . . , ak ].

Note that for k n, ck = [a0 ; a1 , a2 , . . . , an ].

Example. [1; 2, 3, 2]
c0 = 1
1 3
c1 = 1 +
=
2 2
1 10
c2 = 1 + =
1 7
2+
3
1 23
c3 = 1 + =
1 16
2+
1
3+
2
23
And c4 = c5 = = as well.
16

The next result gives an algorithm for computing the convergents of a continued fraction. Its important
for theoretical reasons, too Ill need it for several of the proofs that follow. For the theorem, I wont assume
that the ai s are integers, since I will need the general result later on.

Theorem. Let a0 , a1 , . . . , an be positive real numbers. Let

p 0 = a0 , q0 = 1

p1 = a1 a0 + 1, q1 = a1
pk = ak pk1 + pk2 , qk = ak qk1 + qk2 , k 2.
pk
Then the k-th convergent of [a0 ; a1 , a2 , . . . , an ] is ck = .
qk
Proof. First, note that
 
1 1
[b0 ; b1 , . . . , bk , bk+1 ] = b0 + = b0 ; b1 , . . . , bk +
1 bk+1
b1 +
b2 +
..
.
1
+
1
bk1 +
1
bk +
bk+1

by regarding the last two terms as a single term.


Note also that p0 , . . . , pk1 and q0 , . . . , qk1 are the same for these two fractions, since they only differ
in the k-th term.

4
Now Ill start the proof it will go by induction on k. For k = 0,

a0 p0
c0 = a 0 = = .
1 q0

And for k = 1,
1 a1 a0 + 1 p1
c1 = a 0 + = = .
a1 a1 q1

Suppose k 2, and assume that result holds through the k-th convergent. Then
 
1
ck+1 = [a0 ; a1 , . . . , ak , ak+1 ] = a0 ; a1 , . . . , ak + .
ak+1

pk
Now this is the k-th convergent of a continued fraction, so by induction this is , where pk and qk
  qk
1
refer to a0 ; a1 , . . . , ak + (as opposed to [a0 ; a1 , . . . , ak , ak+1 ]). But what are the pk and qk for this
ak+1
fraction? Theyre given inductively by

pk = (k-th term)pk1 + pk2 , qk = (k-th term)qk1 + qk2 .

 
1
Now pk2 , pk1 , qk2 , qk1 are the same for a0 ; a1 , . . . , ak + and [a0 ; a1 , . . . , ak , ak+1 ], as I noted
 ak+1 
1 1
at the start. On the other hand, the k-th term of a0 ; a1 , . . . , ak + is ak + . So
ak+1 ak+1
 
1
ak + pk1 + pk2
ak+1 ak+1 (ak pk1 + pk2 ) + pk1 ak+1 pk + pk1 pk+1
ck+1 =   = = = .
1 ak+1 (ak qk1 + qk2 ) + qk1 ak+1 qk + qk1 qk+1
ak + qk1 + qk2
ak+1

(The next to the last equality also follows by induction.) This shows that the result holds for k + 1, so
the induction step is complete.

Example. [1; 2, 1, 2, 1]
ak pk qk ck
1 1 1 1
3
2 3 2 = 1.5
2
4
1 4 3 1.33333
3
11
2 11 8 = 1.375
8
15
1 15 11 1.36364
11

There is a pattern to the computation of the ps and qs which makes things pretty easy. To get the

5
next p, for instance, multiply the current a by the last p and add the next-to-the-last p.

a p q a p q
1 1 1 1 1 1
2 3 2 2 3 2
1 1 4 3
2 2
1 1

Fill in the a's, p0 , q0, p 2= (1)(3) + 1 = 4


p1 , and q1 .
q 2= (1)(2) + 1 = 3

a p q a p q
1 1 1 1 1 1
2 3 2 2 3 2
1 4 3 1 4 3
2 11 8 2 11 8
1 1 15 11
p 3= (2)(4) + 3 = 11 p 4= (1)(11) + 4 = 15
q 3= (2)(3) + 2 = 8 q 4= (1)(8) + 3 = 11

Notice that the convergents oscillate, and that the fractions which give the convergents are always in
lowest terms.

Example. [1; 1, 3, 1, 3]
ak pk qk ck
1 1 1 1
1 2 1 2
7
3 7 4 = 1.75
4
9
1 9 5 = 1.8
5
34
3 34 19 1.78947
19

Again, notice that the convergents oscillate, and that the fractions for the convergents are always in
lowest terms.

Ill prove that the convergent fractions are in lowest terms first.

Theorem. Let a0 , a1 , . . . , an be positive real numbers. Let

p 0 = a0 , q0 = 1

p1 = a1 a0 + 1, q1 = a1

pk = ak pk1 + pk2 , qk = ak qk1 + qk2 , k 2.


Then
pk qk1 pk1 qk = (1)k1 .

6
Corollary. Let a0 , a1 , . . . , an be positive integers. Let
p 0 = a0 , q0 = 1
p1 = a1 a0 + 1, q1 = a1
pk = ak pk1 + pk2 , qk = ak qk1 + qk2 , k 2.
pk
For k 1, is in lowest terms.
qk
Proof. pk qk1 pk1 qk = (1)k1 = 1 implies that (pk , qk ) = 1.
Proof of the Theorem. Ill induct on k. For k = 1,
p1 q0 p0 q1 = (a1 a0 + 1)(1) (a0 )(a1 ) = 1 = 111 .
Take k > 1, and assume the result holds for k. Then
pk+1 qk pk qk+1 = (ak+1 pk + pk1 )qk pk (ak+1 qk + qk1 ) = pk1 qk pk qk1 =
pk qk1 pk1 qk = (1)k1 = (1)k1 = (1)k .


This proves the result for k + 1, so the general result is true by induction.


1+ 5
Example. Ill show later that (the golden ratio) has the infinite continued fraction expansion
2
[1; 1, 1, . . .]. Here are the first ten convergents:
ak pk qk ck
1 1 1 1
1 2 1 2
1 3 2 1.5
1 5 3 1.66667
1 8 5 1.6
1 13 8 1.625
1 21 13 1.61538
1 34 21 1.61905
1 55 34 1.61765
1 89 55 1.61818

1+ 5 1+ 5
In fact, 1.61803. In this case, you can see formally that [1; 1, 1, . . .] should be . Let
2 2
1
x =1 +
1
1+
1
1+
1+
..
.
Notice that x contains a copy of itself as the bottom of the first fraction! So
1
x = 1 + , x2 = x + 1, x2 x 1 = 0.
x

1 5 1+ 5
The roots are . Since the fraction is positive, take the positive root to obtain x = .
2 2


c 2008 by Bruce Ikenaga 7

Anda mungkin juga menyukai