Download irrationality and transcendence 4. continued fractions.

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Law of large numbers wikipedia , lookup

Approximations of π wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Positional notation wikipedia , lookup

Infinitesimal wikipedia , lookup

Infinity wikipedia , lookup

List of important publications in mathematics wikipedia , lookup

Factorization wikipedia , lookup

Collatz conjecture wikipedia , lookup

Real number wikipedia , lookup

Mathematical proof wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Fermat's Last Theorem wikipedia , lookup

Non-standard calculus wikipedia , lookup

Four color theorem wikipedia , lookup

Theorem wikipedia , lookup

Addition wikipedia , lookup

Vincent's theorem wikipedia , lookup

System of polynomial equations wikipedia , lookup

Georg Cantor's first set theory article wikipedia , lookup

Series (mathematics) wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Elementary mathematics wikipedia , lookup

Continued fraction wikipedia , lookup

Transcript
PURE MATHEMATICS IV
IRRATIONALITY AND TRANSCENDENCE
Come back tomorrow night
. . . we’re gonna do fractions!
Tom Lehrer
4. CONTINUED FRACTIONS.
In Chapter 3 we were looking for rational approximations to various real
numbers as a means of proving irrationality or transcendence. There is in fact
a standard procedure for obtaining all of the “best” rational approximations
(in a sense to be explained later) to a given real number by the use of continued
fractions.
We shall start with the Euclidean algorithm for computing the greatest
common divisor of two (positive) integers. For example, beginning with 95 and
37 we have
95 = 2 × 37 + 21 ,
37 = 1 × 21 + 16 ,
21 = 1 × 16 + 5 ,
16 = 3 × 5 + 1 ,
which shows that the greatest common divisor of 95 and 37 is 1. Rewriting
these equalities in an obvious way gives
95
21
=2+
,
37
37
37
16
=1+
,
21
21
21
5
=1+
,
16
16
It is easy to see that if a0 , a1 , a2 , . . . , an are positive integers, then the
expressions just considered represent rational numbers.
√ If we try to find a
continued fraction √for an irrational number such as 2 we might begin as
follows. Since 1 < 2 < 2 we have
√
√
2 = 1 + ( 2 − 1) ,
√
and in order to express the “remainder” 2 − 1 as a fraction with numerator
1 we write
√
√
√
1
( 2 − 1)( 2 + 1)
√
=1+ √
.
2=1+
2+1
2+1
√
Since 2 < 2 + 1 < 3 we continue
√
1
1
1
√
√
2=1+
=1+
,
2+
2 + ( 2 − 1)
2+1
√
and we observe that with the reappearance of the denominator 2 + 1 the
process will repeat. Suppressing any qualms about infinite algebraic expressions
we might write
√
1
1
1
1
,
2=1+
2+ 2+ 2+ 2+ ···
though we should realise that this raises a convergence question which needs
to be resolved.
It’s time to introduce some terminology.
Definition. A finite or infinite expression of the form
16
1
=3+ ,
5
5
1
1+
This is called the continued fraction expansion of
use one of two alternative notations:
a0 +
a1 +
1
a2 + · · · +
1
an
1
5
95
37 .
b3
a3 + · · ·
is called a continued fraction. A simple continued fraction is one in which
every bk is 1, every ak is an integer, and every ak except possibly a0 is positive.
For a (finite or infinite) simple continued fraction we shall also use the notations
1
3+
1
a2 +
.
1
1+
b2
a1 +
and if we combine all these expressions we obtain
95
=2+
37
b1
a0 +
To save space we normally
1
1
1
= [a0 , a1 , a2 , . . . , an ] = a0 +
.
a1 + a2 + · · · an
a0 +
1
1
1
a1 + a2 + a3 + · · ·
and
[a0 , a1 , a2 , a3 , . . .] .
A finite simple continued fraction is said to represent the number obtained
by performing the arithmetic in the obvious way; an infinite simple continued
fraction [a0 , a1 , a2 , a3 , . . .] represents the real number α if
α = lim [a0 , a1 , a2 , a3 , . . . , an ] .
n→∞
51
52
Let k ∈ N. The integer ak is called the kth partial quotient of the continued
fraction [a0 , a1 , a2 , . . .], or of the number α it represents; the continued fraction
αk = [ak , ak+1 , ak+2 , . . .] is the kth complete quotient of α; and the continued
fraction [a0 , a1 , . . . , ak ] is the kth convergent to α.
Note.
• A convergent, being defined as a finite continued fraction, is always a
rational number.
• Henceforth we shall blur the distinction between a continued fraction and
the number represented by the continued fraction. We shall use such
language as, for example, “the continued fraction α = [a0 , a1 , a2 , . . .] ”
instead of saying more precisely, “the continued fraction [a0 , a1 , a2 , . . .]
which represents the number α”.
Continued fractions and their convergents have many fascinating properties.
Lemma. Let α be the finite simple continued fraction [a0 , a1 , . . . , an ] or the
infinite continued fraction [a0 , a1 , a2 , . . .]. Let the kth complete quotient of α
be αk . For integers k ≥ −2 define pk and qk inductively by
p−2 = 0 ,
p−1 = 1 , pk = ak pk−1 + pk−2 for k ≥ 0;
q−2 = 1 ,
q−1 = 0 , qk = ak qk−1 + qk−2 for k ≥ 0.
Here and in the following we shall assume in the finite case that k ≤ n. In any
case a list a0 , a1 , . . . , ak−1 with k = 0 is taken to be the empty list. We have
• α = [a0 , a1 , . . . , ak−1 , αk ] for k ≥ 0;
• if x > 0 is real and k ≥ 0, then
[a0 , a1 , . . . , ak−1 , x] =
• if k ≥ 0 then
α=
xpk−1 + pk−2
;
xqk−1 + qk−2
αk pk−1 + pk−2
;
αk qk−1 + qk−2
• pk /qk = [a0 , a1 , . . . , ak ] is the kth convergent to α, for k ≥ 0;
• if k ≥ −1, then
det
pk−1
qk−1
pk
qk
= pk−1 qk − pk qk−1 = (−1)k ;
• pk and qk are relatively prime for any k ≥ 0.
53
Proof. The first result is clear from the definition. The second is an easy
induction proof making use of the identity
a0 +
1
1
1
1
1
1
1
1
= a0 +
a1 + a2 + · · · ak + x
a1 + a2 + · · · ak−1 + ak +
1
x
and the third follows immediately. Taking x = ak in the second result yields
the fourth, and the fifth is again an induction using
pk qk+1 − pk+1 qk = pk (ak+1 qk + qk−1 ) − (ak+1 pk + pk−1 )qk
= −(pk−1 qk − pk qk−1 ) .
It follows from the fifth property that any common divisor of pk and qk is also
a divisor of (−1)k , and this proves the last result.
The above properties provide a convenient method for evaluating a finite
simple continued fraction α and all its convergents: we simply list the partial
quotients ak and calculate pk and qk recursively. Then all the values of pk /qk
are convergents to α, and the last of them is α itself. For example, to find the
convergents of
1
1
1
1
1 1
α =1+
3+ 1+ 5+ 1+ 1+ 4
we construct a table
0
1
1
0
1
1
1
3
4
3
1
5
4
5
29
23
1
34
27
1
63
50
34
,
27
63
,
50
286
,
227
4
286
227
and then read off the convergents
1
,
1
4
,
3
5
,
4
29
,
23
the last of which is the value of α.
We have seen that any finite simple continued fraction represents a rational
number. The converse is also true.
Theorem. Any rational number is represented by a finite simple continued
fraction.
Proof. Let α = p/q with, as usual, p, q relatively prime and q > 0. We shall
prove the result by induction on q. First, if q = 1 then the continued fraction is
54
just α = [p]. Let q > 1 and assume that any rational number with denominator
less than q can be expressed as a finite continued fraction. Divide p by q to
give quotient a and remainder r: that is,
p = aq + r
with 0 < r < q .
reasoning as in the case n = 1 above, we have
a0 < α ≤ a0 + 1 and b0 < α ≤ b0 + 1 .
Now if α is an integer then a0 + 1 = α = b0 + 1, while if not then a0 = bαc = b0 ;
but in either case, a0 = b0 . Therefore
The remainder r is not zero since p and q are coprime; so by the inductive
hypothesis we can write q/r as a finite simple continued fraction [b0 , b1 , . . . , bm ],
and we have
α =
p
r
1
= a+ = a+
= [a, b0 , b1 , . . . , bm ] .
q
q
q/r
This proves the inductive step, and the result follows.
Although any rational number can be written as a continued fraction, the
representation is not unique. For example, we have
95
1
1
1
1 1
1
1
1 1
=2+
=2+
.
37
1+ 1+ 3+ 5
1+ 1+ 3+ 4+ 1
We may, if convenient, rule out the second possibility by insisting that the last
partial quotient in a continued fraction be greater than 1; and there are no
further continued fraction representations of a rational number, as is shown in
the following result.
Proposition. Let 0 ≤ m ≤ n; suppose that [a0 , a1 , . . . , am ] and [b0 , b1 , . . . , bn ]
are finite simple continued fractions representing the same (rational) number.
Then either
• m = n and a0 = b0 , a1 = b1 , . . . , am = bm ; or
• m = n − 1 and a0 = b0 , a1 = b1 , . . . , am−1 = bm−1 , with am = bm + 1
and bn = 1.
Proof. First consider the case m = 0; then a0 = [b0 , b1 , . . . , bn ]. If n = 0 then
a0 = b0 . If n = 1 then a0 = b0 + 1/b1 and so b0 < a0 ≤ b0 + 1; since a0 and
b0 are integers we have a0 = b0 + 1 and the second alternative above holds. If
n > 1 then
1
a0 = b 0 +
;
1
b1 +
b2
but b1 + 1/b2 is strictly greater than 1, so b0 < a0 < b0 + 1, which is impossible.
In the case m ≥ 1 we write
α = [a0 , a1 , . . . , am ] = [b0 , b1 , . . . , bn ] ;
55
a0 +
1
1
= a0 +
,
[a1 , . . . , am ]
[b1 , . . . , bn ]
so [a1 , . . . , am ] = [b1 , . . . , bn ] and the result follows by induction.
√
Consider again our (presumed) continued fraction for 2 . Using
√ the tabular method, or otherwise, we find that the first few convergents to 2 are
1
,
1
3
,
2
7
,
5
17
,
12
41
,
29
99
,
70
239
,
169
577
,... .
408
If we evaluate the convergents (and, if necessary, a few more) as decimals, it is
not hard to convince ourselves that the convergents√
p2k /q2k with even indices
form an increasing sequence converging to the limit 2 , while the convergents
p2k+1 /q2k+1 with odd indices form a decreasing sequence which converges to
the same limit. In fact this observation is the key to proving that an infinite
simple continued fraction always converges; having
done so, we shall find it
√
easy to confirm that the continued fraction for 2 is as we have conjectured.
Lemma. Let pk /qk be the kth convergent to the infinite simple continued
fraction α = [a0 , a1 , a2 , . . .]. Then
p0
p2
p4
p5
p3
p1
<
<
< ··· <
<
<
.
q0
q2
q4
q5
q3
q1
(1)
Moreover, qk increases without limit as k → ∞.
Proof. It is obvious that p0 /q0 < p1 /q1 . For any k ≥ 2 we have
pk
ak pk−1 + pk−2
=
;
qk
ak qk−1 + qk−2
since all terms involved are positive, a result from elementary algebra (see
appendix 1) shows that pk /qk lies between pk−1 /qk−1 and pk−2 /qk−2 . Applying
this result repeatedly proves (1). To prove the second part of the lemma, note
first that q0 = 1 and q1 = a1 ≥ 1; then for k ≥ 2 we have
qk = ak qk−1 + qk−2 ≥ qk−1 + qk−2 ≥ qk−1 + 1 ,
and so qk → ∞ as k → ∞.
56
Comment. If α = [a0 , a1 , . . . , an ] is a finite continued fraction then (1) still
holds provided that we omit all pk /qk with k > n.
Theorem. Any infinite simple continued fraction converges to a limit; moreover, this limit is irrational.
Proof. Let pk /qk be the kth convergent to [a0 , a1 , a2 , . . .]. From the lemma,
np
0
q0
,
o
p2 p4
, ,...
q2 q4
is a monotonic increasing sequence which is bounded above (for example, by
p1 /q1 ), and therefore tends to a limit αL with αL ≥ p2k /q2k for all k. Similarly
np
1
q1
,
o
p3 p5
, ,...
q3 q5
decreases to a limit αU with αU ≤ p2k+1 /q2k+1 for all k. Moreover αU ≥ αL ,
for otherwise we should be able to find convergents p2k /q2k arbitrarily close
to αL and p2`+1 /q2`+1 arbitrarily close to αU ; but then p2`+1 /q2`+1 would be
smaller than p2k /q2k , contradicting (1). Therefore for any k we have
0 ≤ α U − αL ≤
p2k+1
p2k
1
−
=
.
q2k+1
q2k
q2k+1 q2k
However αU − αL is independent of k, and from the lemma we know that
1/q2k+1 q2k → 0 as k → ∞; so αU = αL = α, say. Thus [a0 , a1 , . . . , ak ] tends to
the limit α as k → ∞, and this means by definition that the continued fraction
represents the real number α.
To prove the irrationality of α we use the test from page 40. If α is rational
there is a positive constant c such that
Comment. The latter part of this proof is not redundant. We showed on
pages 54–55 above that a rational number has a finite continued fraction representation (in fact, two of them); but we did not prove that a rational has only
finite representations.
There is essentially only one fact we have yet to prove concerning the
existence and uniqueness (or not) of the continued fraction for a given real
number.
Theorem. If α is a real irrational number then it has a unique expansion as
a simple continued fraction (and we already know that this continued fraction
must be infinite).
√
Proof. Following the procedure we used for 2 on page 52, we set α0 = α and
then for k ≥ 0 define recursively
ak = bαk c and αk+1 =
1
.
αk − a k
(2)
Then a0 is an integer, a1 , a2 , . . . are positive integers and α1 , α2 , . . . are real
numbers exceeding 1. Since α is irrational we can readily show that every
αk is irrational; so αk − ak cannot vanish and the recursion never terminates.
Therefore we have an infinite simple continued fraction, which by the previous
theorem converges to a limit, say
β = a0 +
1
1
1
.
a1 + a2 + a3 + · · ·
We have to show that α = β. Now from (2) we prove by induction that
α = [a0 , a1 , . . . , ak−1 , αk ]
(3)
for all k, and hence by a property from page 53,
α − p2k ≥ c
q2k q2k
for all convergents p2k /q2k , with at most one exception. But for every k we
have
p2k
p2k+1
p2k
1
0 ≤ α−
≤
−
=
.
q2k
q2k+1
q2k
q2k+1 q2k
Combining these estimates yields q2k+1 < 1/c for all (except possibly one) k,
which is not true as the denominators q2k+1 are unbounded.
57
α=
αk pk−1 + pk−2
.
αk qk−1 + qk−2
Here pk /qk = [a0 , a1 , . . . , ak ] is the kth convergent to β. Note that we cannot
say immediately that pk /qk is a convergent to α because (3) is not a simple
continued fraction. Using appendix 1 again, α lies between
αk pk−1
αk qk−1
and
58
pk−2
.
qk−2
But as k → ∞ each of these fractions tends to the limit β, and so α = β as
required.
To prove uniqueness, suppose that we have two infinite simple continued
fractions representing the same number,
[a0 , a1 , a2 , . . .] = [b0 , b1 , b2 , . . .] .
For any k, we can write these in the form
[a0 , a1 , . . . , ak , αk+1 ] = [b0 , b1 , . . . , bk , βk+1 ]
with αk+1 , βk+1 > 1, all aj , bj integers and all except possibly a0 , b0 positive.
Then from the following lemma (which will be useful again later) we have
immediately ak = bk . As this is true for all k, the two continued fractions are
identical.
Lemma. A uniqueness property. Suppose that 0 ≤ m ≤ n and
[a0 , a1 , . . . , am−1 , αm ] = [b0 , b1 , . . . , bn−1 , βn ] ,
and we have a0 < α < a0 + 1. Similar reasoning holds for the other continued
fraction, and so
a0 = bαc = b0 .
Consequently
[a1 , . . . , am−1 , αm ] = [b1 , . . . , bn−1 , βn ] ,
and the result will follow from the corresponding result for m − 1 terms. Since
the case m = 0 is vacuously true (almost), the result is proved by mathematical
induction.
√
Examples. Although we now know that 2 has a continued fraction, and
that [1, 2, 2, 2, . . .] converges, we still have not shown that they are equal! To
do this, write
α =1+
1
1
1
2+ 2+ 2+ ···
and αm = [bm , . . . , bn−1 , βn ] .
Comment. This result can be expressed as follows: if two continued fractions,
each ending with complete quotients greater than 1, represent the same number,
then “as far as they are both simple” they are identical.
Proof. Let m ≥ 1 and suppose that
√
2=1+
1
1
1
.
2+ 2+ 2+ ···
As a second example we evaluate α = [5, 4, 3, 2, 1, 3, 2, 1, . . .], a periodic continued fraction. Set β = [3, 2, 1, 3, 2, 1, . . .]; then
α=5+
1 1
4+ β
and β = 3 +
0
1
with the conditions of the theorem satisfied. Observe that
1
0
3
3
1
gives
β=
for if m = 1 (so that there are no terms ak ) then the left hand side is just αm ,
which is greater than 1 by assumption, while if m > 1 then the left hand side
is the sum of a positive integer a1 and a strictly positive quantity. Hence
1
1 1
.
2+ 1+ β
Evaluating the latter fraction by the tabular method
α = [a0 , a1 , . . . , am−1 , αm ] = [b0 , b1 , . . . , bn−1 , βn ]
[a1 , . . . , am−1 , αm ] > 1 ;
1
1
.
2+ 2+ ···
Then β = 2 +√
1/β, which simplifies to β 2 − 2β − 1 = 0. Since β is positive we
have β = 1 + 2 ; but α = 1 + 1/β and at last we have shown properly that
where a0 , b0 are integers; a1 , . . . , am−1 , b1 , . . . , bn−1 are positive integers; and
αm , βn are real numbers strictly greater than 1. Then
a0 = b0 , a1 = b1 , . . . , am−1 = bm−1
and β = 2 +
2
7
2
1
10
3
β
10β + 7
3β + 2
10β + 7
,
3β + 2
which leads to the quadratic 3β 2 −8β−7 = 0 with positive root β =
using similar means to evaluate α in terms of β, we find that
1
3
√ 4+ 37 ;
1
1
1
0<
<1
a1 + · · · am−1 + αm
√
1
1
1
1
1
1
21β + 5
409 − 37
1
=
=
.
5+
4+ 3+ 2+ 1+ 3+ 2+ 1+ ···
4β + 1
77
59
60
In fact the same procedure will show that any (eventually) periodic continued
fraction is a quadratic irrational. Consider
once we emerge from algebraic manipulations we find that αk is a root of a
quadratic Ak z 2 + Bk z + Ck , where Ak , Bk and Ck are integers given by
α = [a0 , a1 , . . . , am−1 , b0 , b1 , . . . , bn−1 , b0 , b1 , . . . , bn−1 , b0 , . . .] ,
2
Ak = Ap2k−1 + Bpk−1 qk−1 + Cqk−1
and let
Bk = 2Apk−1 pk−2 + Bpk−1 qk−2 + Bpk−2 qk−1 + 2Cqk−1 qk−2
β = [b0 , b1 , . . . , bn−1 , b0 , b1 , . . . , bn−1 , b0 , . . .] .
If we write pk /qk for the convergents to α and rk /sk for the convergents to β,
we have
β pm−1 + pm−2
α = [a0 , a1 , . . . , am−1 , β] =
β qm−1 + qm−2
and
β rn−1 + rn−2
β = [b0 , b1 , . . . , bn−1 , β] =
.
β sn−1 + sn−2
The second equation reduces to a quadratic with integral coefficients, so β is
a quadratic irrational (the quadratic cannot have rational roots since β has
an infinite continued fraction). Substituting the value of β into the previous
equation and, if desired, rationalising the denominator shows that α is also a
quadratic irrational. We have proved the following result.
Theorem. An eventually periodic simple continued fraction represents a
quadratic irrational.
In fact, the converse of this result is true, so that a quadratic irrational
is characterised by having an (infinite) eventually periodic continued fraction.
We shall prove this immediately in order to complete our study of quadratic
irrationals, even though the proof requires a result concerning approximation
properties of convergents which we shall not prove until later. We leave it to
the reader to confirm that our proof of the lemma on page 63 could have been
done at this stage.
Theorem. The continued fraction of a quadratic irrational number is eventually periodic.
Proof. Let α be a root of the (irreducible) quadratic Az 2 + Bz + C, where
A, B and C are integers with A and C not zero. Since the convergents and the
complete quotients of α satisfy the relation
α=
αk pk−1 + pk−2
αk qk−1 + qk−2
we have
A
α p
2
α p
k k−1 + pk−2
k k−1 + pk−2
+C =0 ;
+B
αk qk−1 + qk−2
αk qk−1 + qk−2
61
2
Ck = Ap2k−2 + Bpk−2 qk−2 + Cqk−2
.
Now write dk = qk α − pk ; by the inequality in (5), page 63, we have
Therefore
1
pk 1
|dk | = qk α − <
≤
≤ 1.
qk
qk+1
qk
(4)
2
Ak = A(qk−1 α − dk−1 )2 + B(qk−1 α − dk−1 )qk−1 + Cqk−1
2
= (Aα2 + Bα + C)qk−1
− (2Aα + B)dk−1 qk−1 + Ad2k−1
= Ad2k−1 − (2Aα + B)dk−1 qk−1 ,
and using (4) we obtain
|Ak | ≤ |A| + |2Aα + B| .
Performing very similar calculations for Bk and observing that
qk−1 dk−2 + qk−2 dk−1 ≤
qk−1
qk−2
+
<2
qk−1
qk
we find that
|Bk | ≤ 2(|A| + |2Aα + B|) ;
finally,
|Ck | = |Ak−1 | ≤ |A| + |2Aα + B| .
Hence the coefficients Ak , Bk and Ck are bounded independently of k. They can
take, therefore, only finitely many values, and the quadratics Ak z 2 + Bk z + Ck
have altogether only finitely many roots. Therefore we must have αk = αk+t
for some k; it is easy to see that this implies that ak = ak+t , and that the same
relations must hold for all subsequent k. Hence the continued fraction of α is
eventually periodic.
62
Comments.
• As usual, the number of possibilities for αk given by
√ this estimate is far in
excess of the actual number. For example, if α = 2 then we have A = 1,
B = 0 and C = −2, which leads to
0 < |Ak | ≤ 3 ,
α−
|Bk | ≤ 7 and 0 < |Ck | ≤ 3 .
Even if we assume (as we may) that Ak is positive, this gives 270 possible
quadratics and 540 possible αk . But in fact αk takes only two different
values!
• An alternative argument for part of the above proof: by straightforward
algebra, Bk2 − 4Ak Ck = B 2 − 4AC. So once we have proved that Ak and
Ck take only finitely many values, the same follows immediately for Bk .
• Why does this not work for irrationalities of higher degree? Well, if α is
(say) a cubic irrational, we should expect to get a formula something like
3
2
Ak = (Aα3 + Bα2 + Cα + D)qk−1
− (3Aα2 + 2Bα + C)qk−1
dk−1
+ (3Aα + B)qk−1 d2k−1 − Ad3k−1 .
Now as in the quadratic case, the first term here will vanish and the last
two will be bounded. However the second term will be, roughly, a constant
times qk−1 , which is unbounded, and this will wreck the entire argument.
• In view of the theorem just proved and earlier results, we can sum up
the connection between the continued fraction of a real number and its
algebraic status in this way: algebraic numbers of degree 1 have finite
continued fractions; those of degree 2 have ultimately periodic infinite
continued fractions; and those of higher degree, as well as transcendental
numbers, have non–periodic infinite continued fractions.
Having proved all that we need about representation of numbers by continued fractions, we proceed to investigate what continued fractions can tell us
about the approximation of irrationals by rationals. This will link the present
topic with that of the previous chapter. First some equalities and inequalities
concerning the difference between a number and its convergents.
Lemma. Let α = [a0 , a1 , a2 , . . .] be an infinite simple continued fraction with
convergents pk /qk and complete quotients αk . Then for k ≥ 0 we have
1
1
1
α − p k =
<
≤
.
qk (αk+1 qk + qk−1 )qk
qk+1 qk
ak+1 qk2
63
If α = [a0 , a1 , . . . , an ] is a finite continued fraction then the same relations hold
for 0 ≤ k < n − 1, while if k = n − 1 the first inequality must be replaced by
equality.
Proof. We have
(5)
pk
αk+1 pk + pk−1
pk
pk−1 qk − pk qk−1
=
−
=
,
qk
αk+1 qk + qk−1
qk
(αk+1 qk + qk−1 )qk
and the equality follows since pk−1 qk − pk qk−1 = ±1. To prove the inequalities
we need only observe that, except in the finite case when k + 1 = n, we have
αk+1 qk + qk−1 > ak+1 qk + qk−1 = qk+1 ≥ ak+1 qk .
Comments.
• Using this we can give an alternative proof of the theorem on page 42, that
any irrational is approximable to order 2. For an irrational number α has
infinitely many convergents p/q, and, from (5), every one of these satisfies
1
p
0 < α − < 2 .
q
q
• Observe also from (5) that pk /qk will approximate α to within c/qk2 , and
that the constant c will be exceptionally small if the next partial quotient ak+1 is large. Now consider the continued fraction for π. By taking
a sufficiently accurate decimal approximation to π, or possibly by other
methods, we obtain
π =3+
1
1
1
1
1
1
1
1
.
7 + 15 + 1 + 292 + 1 + 1 + 1 + 2 + · · ·
So we can find two very good fractional approximations to π by truncating
the continued fraction just before the partial quotients 15 and 292. The
first of these gives π ' [3, 7] = 22
7 . This approximation is, of course, well
known; perhaps less well known is just how good an approximation it is.
1
1
The discrepancy is |π − 22
7 | < 15×72 = 735 ; to obtain similar accuracy from
the decimal expansion we would need to take two decimal places, and this
would mean, in effect, to approximate π by 314
100 , a much more complicated
fraction than 22
.
The
other
approximation
cited above gives
7
π '3+
1
355
1
1
=
7 + 15 + 1
113
64
and
1
π − 355 <
.
113 292 × 1132
This estimate was known to the Chinese mathematician Tsu Ch’ung–chih
(a.d. 429–501); it is accurate to six decimal places, and is a closer approximation than the fraction 3141593
1000000 .
We shall use the inequalities of the preceding lemma to look more closely at
the way in which numbers are approximated by their convergents, and thereby
to see how the continued fraction of a real number α is related to its order
of approximation by rationals. Since we already know (pages 40–41) everything there is to know about approximability properties of rationals, we shall
generally assume that α is irrational, and shall restrict ourselves to occasional
comments on the rational case. Many of the properties we shall prove do in fact
also apply to this case, with minor modifications sometimes being necessary.
First we show that the discrepancy between α and a convergent pk /qk always
decreases as k increases.
Lemma. Let α = [a0 , a1 , a2 , . . .] be an infinite simple continued fraction with
convergents pk /qk and complete quotients αk . Then for k ≥ 1 we have
|qk α − pk | < |qk−1 α − pk−1 | and
α − pk < α − pk−1 .
qk
qk−1 Proof. We use the equality in (5). The first inequality to be proved is equivalent to
αk+1 qk + qk−1 > αk qk−1 + qk−2 ;
substituting qk−2 = qk − ak qk−1 and rearranging shows that we need to prove
(αk+1 − 1)qk > (αk − ak − 1)qk−1 .
But for an infinite continued fraction it is always true that αk+1 > 1, and hence
that αk − ak = 1/αk+1 < 1; therefore
(αk+1 − 1)qk > 0 ≥ (αk − ak − 1)qk−1 ,
and the first part of the proof is complete. The second inequality follows
immediately since qk ≥ qk−1 .
Comment. If α = [a0 , a1 , . . . , an ] ∈ Q and if an > 1, then the inequalities just
proved hold for 1 ≤ k ≤ n. If an = 1 and k = n − 1 the first inequality is false,
and must be replaced by an equality. However, we may ignore this case, since,
as pointed out on page 55, a rational number can (nearly) always be written
as a continued fraction whose last partial quotient is strictly greater than 1.
65
The following result shows that the “best” rational approximations to an
irrational number are its convergents, as foreshadowed at the beginning of this
chapter.
Theorem. Let α be a real irrational with convergents pk /qk .
• If p/q is a rational number (with, as usual, positive denominator) such
that
α − p < α − pk (6)
q qk with k ≥ 1, then q > qk .
• If p and q are integers, q > 0, such that
|qα − p| < |qk α − pk |
(7)
with k ≥ 0, then q ≥ qk+1 .
Proof. We shall prove the second part of the theorem first, and then show
that the first part easily follows. So, suppose that α is irrational, that k ≥ 0
and that |qα − p| < |qk α − pk |; consider the system of linear equations
pk x + pk+1 y = p
q k x + q k+1 y = q .
The determinant of the coefficients on the left hand side is pk qk+1 − pk+1 qk ,
which is ±1, and so the system has a solution in integers x, y (see the second
appendix to this chapter). Recall that q, qk and qk+1 are all positive; from
the second equation above it is therefore clear that x and y cannot both be
negative, while if both are positive then q > qk+1 y ≥ qk+1 and the result is
proved. So we may assume that one of x, y is positive (or zero), and the other
is negative (or zero). From the lemma on page 56 we know that one of
α−
pk
qk
and α −
pk+1
qk+1
is positive, one negative; and so the same is true for the expressions qk α − pk
and qk+1 α − pk+1 . Therefore
x(qk α − pk )
and y(qk+1 α − pk+1 )
have the same sign, and hence
|x| |qk α − pk | + |y| |qk+1 α − pk+1 | = |x(qk α − pk ) + y(qk+1 α − pk+1 )| .
66
But the right hand side is just |qα − p|, and so
|x| |qk α − pk | ≤ |qα − p| < |qk α − pk | .
This can be true only if x = 0, so q = qk+1 y ≥ qk+1 and the second result
stated above is proved.
To prove the first result, suppose that (6) holds for some k ≥ 1, but that
q ≤ qk . Multiplying these inequalities (permissible as all the quantities involved
are positive) we obtain |qα − p| < |qk α − pk |. From the result already proved
we have q ≥ qk+1 , and so qk+1 ≤ qk , which is not possible for k ≥ 1.
Comments.
• The first result shows that if p/q is a better approximation to α than
pk /qk , then the former fraction must have a larger denominator than the
latter; in other words, of all fractions with denominators up to qk , the
convergent pk /qk is the closest to α. In fact, if we wish to obtain a better
approximation than pk /qk in the stronger sense (7), we have to go at least
as far as the next convergent.
• The condition k ≥ 1 in the first result is necessary because q0 = q1 for
some continued fractions α. In fact, if n + 12 < α < n + 1 then we have
α=n+
1
1+ ···
and
n
p0
= .
q0
1
However if p/q = (n + 1)/1 then the inequality (6) is satisfied, but the
conclusion q > q0 is false.
• An interesting alternative approach to continued fractions is to define the
convergents to a real number α as the best rational approximations to α,
and then derive all of the important properties of convergents. Specifically,
we let p0 = bαc and q0 = 1, and then define, for each k ≥ 0, the convergent
pk+1 /qk+1 to be the fraction with smallest possible denominator such that
|qk+1 α − pk+1 | < |qk α − pk | .
We can then show that qk−1 is a factor of qk − qk−2 , and define the partial
quotients of α by ak = (qk − qk−2 )/qk−1 . For more on this approach see
J.W.S. Cassels, An introduction to diophantine approximation.
The next result follows easily from that above.
Theorem. Let α be irrational. If
α − p < 1
q 2q 2
67
then p/q is a convergent to α.
Comment. Conversely, it can be shown that of any two consecutive convergents to α, at least one satisfies the above inequality. We shall not prove this
here.
Proof. Suppose that the given inequality holds. Since qk → ∞ as k → ∞,
there exists k ≥ 0 such that qk ≤ q < qk+1 . From the previous theorem we
have
|qk α − pk | ≤ |qα − p|
because q < qk+1 , and hence
|pqk − pk q| ≤ q|qk α − pk | + qk |qα − p| ≤ (q + qk )|qα − p| <
q + qk
≤ 1.
2q
Since the left hand side is an integer it must be zero, and p/q = pk /qk , which
is a convergent to α.
Two important approximation problems. The above theorem shows,
roughly speaking, that convergents are not merely good approximations, but
in a sense the only possible good approximations to a real number. We digress
to look at two important problems of rational approximation which may be
solved using continued fractions.
How many days should we count in a calendar year? The difficulty is that for
convenience of use, the calendar really should contain an integral number of
days per year, whereas the actual length of a solar year (that is, the period
from one spring equinox to the next) can be measured as 365 days, 5 hours,
48 minutes and 46 seconds. If a year were to contain an exact number of
days, and always the same number, the calendar would not keep pace with
the seasons; students who like to finish their exams around the beginning of
December and then head for the beach would at some (not very distant!) date
find the weather in December rather unsuitable for this. The main impetus
for the creation of the modern calendar came in the mediæval period, when
it was realised that accumulated errors in the calendar would eventually lead
to Easter, traditionally a spring festival in the northern hemisphere, being
celebrated in midwinter.
The solution to the calendar problem is, in outline, simple and well known:
we adopt 365 days as the standard length of a year, and decree that certain
leap years shall be allocated one extra day. The difficulty lies in the details.
How shall we determine precisely which years are to be leap years?
Suppose that in a cycle of q years we add an extra day in each of p years.
Then the average length of a calendar year will be 365 + p/q days, and we
68
would like this to equal the observed length of a solar year. Converting the
above data into a rational number of days, and deducting 365, we want
p
10463
=
.
q
43200
While we could obtain an exact fit to the observations by choosing 10463 years
in every 432 centuries as leap years, and then repeating the pattern, it is clear
that such a scheme would be too complicated for practical use. What we need,
therefore, is a good approximation to p/q having a much smaller denominator;
and as we have seen, this is a question which can be answered by examining
the convergents of p/q. We may compute the continued fraction
10463
1
1
1
1
1
1
=
,
43200
4 + 7 + 1 + 3 + 5 + 64
from which we find the convergents
1
,
4
7
,
29
8
,
33
31
,
128
163
673
and
10463
.
43200
The first of these convergents suggests that we make every fourth year a leap
year. This very simple rule constitutes the Julian calendar, so called because it
was instituted by Julius Caesar, on the advice of the Alexandrian astronomer
Sosigenes, in about 45 b.c. According to Sosigenes’ scheme, four calendar years
would be about 45 minutes longer than four solar years, and so, for example,
midsummer’s day would occur slightly earlier (according to the calendar) every
four years. The dates of midsummer and midwinter would be interchanged after
about 23000 years; while this prospect would not appear close enough to worry
anyone, smaller but still significant discrepancies became noticeable within a
few centuries, and led to further reforms of the calendar.
7
; it is not much simpler than the
We shall ignore the second convergent 29
8
following one, 33 , and it is not an exceptionally good approximation anyway.
We recall that this is because the third partial quotient here is not very large.
The third convergent can be used to improve on the Julian calendar. It prompts
us to declare 8 leap years in 33 years, or 24 in 99 years. Let us adjust this to 24
leap years in 100 years. The approximation will then be less good, but it will
be very easy to implement. We need only decree that every fourth year shall
be a leap year, with the exception of one year per century, say the century
year itself, which shall be an ordinary 365–day year. Using this calendar it
would take over 80000 years for the dates of midsummer and midwinter to be
interchanged.
69
The Julian calendar was in use throughout Europe for 1600 years or so,
by which time the difference between the calendar year and the solar year
was causing perceptible problems. The difficulty was not specifically with the
alteration of the seasons but with calculating the date of Easter. This date
depends on the first occurrence of the full moon after the (northern) spring
equinox. Since the Julian calendar year is longer than the true solar year, the
assumed date, March 21, for the equinox will bit by bit arrive later than the true
date. Even an error of a day or two – and by the 1500s the accumulated error
was about ten days – could cause the first full moon after the equinox to be
missed, and a “wrong” full moon to be chosen instead. As a consequence Easter
could be celebrated a month or more later than it should have been, and in the
late sixteenth century Pope Gregory XIII instituted a commission to advise on
how to correct the accumulated errors of 1600 years and minimise future errors.
The scheme proposed by this commission, adopted in 1582 in most European
Catholic countries and nowadays standard throughout the world, is known as
the Gregorian calendar.
31
to our required ratio. In itself this
Consider the fourth convergent 128
would suggest a 128–year cycle of ordinary and leap years, which probably
would not be convenient to use. But we might notice that
96 87
97
31
=
'
.
128
400
400
To employ a scheme based on this approximation we begin by decreeing a leap
year every four years, but then omit three of these leap years – that is, restore
them to 365 days – every 400 years. The precise method in use today is that
every year divisible by 4 is a leap year, except that a year divisible by 100 is
not a leap year, except that a year divisible by 400 once again is a leap year.
The average length of a year under the Gregorian calendar is 365 days, 5 hours,
49 minutes and 12 seconds, just 26 seconds longer than the solar year.
There is another way to derive this approximation from the convergents
on the previous page. If pk−1 /qk−1 and pk /qk are adjacent convergents to any
number α, consider the fractions
pk−1 pk−1 + pk pk−1 + 2pk pk−1 + 3pk
pk−1 + ak+1 pk
,
,
,
,...,
.
qk−1
qk−1 + qk
qk−1 + 2qk
qk−1 + 3qk
qk−1 + ak+1 qk
The last of these is the convergent pk+1 /qk+1 ; the first is obviously a convergent; the others are known as secondary convergents. Roughly speaking, the
secondary convergents to α are, after the convergents, the next best rational
70
approximations to α. Here one of the secondary convergents to
10463
43200
is
31 + 163
194
194
97
=
'
=
,
128 + 673
801
800
400
log 2
1
1
1
1
1
1
1
1
1
1
p
'
,
=1+
3
q
1 + 2 + 2 + 3 + 1 + 5 + 2 + 23 + 2 + 2 + · · ·
log 2
whose first few convergents are
1
,
1
2
,
1
5
,
3
12
,
7
41
,
24
53
.
31
The first two of these suggest that we should take a fifth, or two fifths,
to be the same as an octave: both of these approximations are far too crude
to give satisfactory musical results. The third convergent suggests that we
approximate five fifths by three octaves: that is, the note five fifths above
our fundamental pitch should be replaced by that three octaves above the
fundamental. Choosing an arbitrary fundamental for purposes of illustration,
our tonal system would then consist of just five notes, where notes differing by
an octave are regarded as “the same”.
from which we obtain again the Gregorian approximation.
Many documents from Pope Gregory’s scholars still exist, and it is clear
that they did not in fact use continued fractions to derive their calendar. According to N.M. Beskin, Fascinating Fractions, the commission took the length
of the solar year to be 365 days, 5 hours, 49 minutes and 16 seconds; this
value was given in the Alfonsine tables, a compendium of astronomical data
put together in the thirteenth century for King Alfonso X of Castile. Using
this figure they deduced that the Julian year was too long by 10 minutes and
44 seconds, and so would be one day late every 134 years. Therefore the committee reasoned that one leap year should be omitted every 134 years, which
is about three every 400 years.
So, regrettably, we are forced to admit that mathematical hindsight does
not entail historical accuracy. Nonetheless, we could argue that the theory
of continued fractions is what makes a particular approximation worthwhile,
regardless of the methods actually used to obtain it. Even though the astronomers and mathematicians appointed by Gregory did not use continued
fractions to obtain their results, they could not have found a good calendar
which was entirely inconsistent with this topic.
continued fractions to find the best possible approximate solutions. Rewriting
the above equation to find the desired (but unachievable) value of p/q, and
then computing its continued fraction, we obtain
These notes comprise a pentatonic system, and can be used to perform quite
satisfying, if perhaps extremely simple, music. Indeed, folk music from many
parts of the world is found to be based on pentatonic scales.
If we want a system containing more notes, and therefore offering wider
musical possibilities, we could turn to the next convergent and take twelve fifths
to equal seven octaves. Our (modified) sequence of fifths could look like this.
How many semitones should there be in an octave? There are good acoustical reasons for asserting that a combination of two musical notes at different
pitches will be pleasing to the ear if the ratio of their frequencies is a “simple”
rational number. The simplest ratios are 21 and 32 ; in musical terminology these
correspond to the intervals of the octave and the (perfect) fifth respectively.
Suppose that we take a fixed note as the basis of a tonal system, and build
upon this foundation two sequences of intervals, one consisting of fifths and the
other of octaves. In order to obtain a coherent system of finitely many notes
rather than an infinite mess, we require these two sequences to meet again at
some point. Suppose, then, that p perfect fifths exactly equal q octaves; in
terms of frequencies we have
= 2q .
2
3 p
Unfortunately, as is easily proved, this equation has no solutions in integers
except for p = q = 0, which is musically trivial. So we shall once again employ
Transposing and reordering these notes gives the twelve–note chromatic scale
which has been the basis of most Western music for many centuries.
71
72
We see, then, that the approximation of irrational numbers by rationals,
employing as its principal tool the convergents to a continued fraction, suggests a reason why there should be twelve “different” notes used in musical
composition, or to put it another way, why there should be twelve semitones in
an octave rather than eleven or thirteen. Of course, if we seek an even better
accommodation of fifths and octaves we may look further along the sequence
of convergents: the next would give us a 41–note scale, and if we ignore the
limitations of human performance we can make the ratio of fifths to octaves as
accurate as we wish.
Despite the beauty of the mathematics involved in this problem, we must
again beware of using it as a substitute for history. There is no reason to believe
that the chromatic scale was designed with continued fractions in mind. On
the contrary, it seems clear that our present tonal system was not “designed”
at all, but simply developed in accordance with the needs of composers and
performers. As in the calendar problem, however, we are very likely justified
in asserting that this development is a manifestation of properties of continued
fractions. The laws of nature hold in spite of our ignorance of them.
A “computational” test for rationality. Continued fractions can sometimes be used to give us an idea (though not necessarily a proof) that a certain
number, presented as an infinite decimal, may be rational. For example, in
connection with Apéry’s irrationality proof for ζ(3), it was claimed that ζ(4)
can be written as a sum
∞
X
1
,
ζ(4) = c
4
n 2n
n
n=1
with c ∈ Q. Since it is known that ζ(4) = π 4 /90, the claim is, in effect, that
∞
. X
1
c = π 4 90
4
n 2n
n
n=1
is rational. Evaluating c to 10 significant figures (which can be done by taking
the first 10 terms of the sum) and then calculating its continued fraction gives
1
1
1
.
8 + 2 + 19607842 + · · ·
Now the partial quotients in the continued fraction of a “sensible” real number
generally consist of fairly small integers. In fact it can be shown that for a
“randomly chosen” real number, a proportion about
a + 1. a + 2 log2
a
a+1
c ' 2·117647059 = 2 +
73
of the partial quotients should be equal to a given positive integer a; doing
the appropriate calculations, we find that about 42% of the partial quotients
should be 1, about 17% should be 2, and so on. One suspects, then, that
the partial quotient 19607842 is due to numerical inaccuracy, and that the
continued fraction should have terminated at the previous partial quotient.
Therefore it seems reasonable to believe that
c=2+
36
1 1
=
.
8+ 2
17
Obviously this does not constitute a rigorous proof, but in fact it can be shown
that c has the value 36
17 , as conjectured.
Further approximation properties of convergents. We know that for
every irrational α the inequality
α − p < 1
q q2
has infinitely many solutions, and that for certain α the right hand side can be
decreased by substituting for q 2 a higher power q s . Indeed, if α is a Liouville
number then we can choose arbitrarily large s and still find infinitely many
solutions; on the other hand, we know from Liouville’s theorem, page 43, that
if α is a quadratic irrational then the exponent 2 cannot be increased at all.
Thus, if we want a result which is true for all α, we cannot decrease the
right hand side of the above inequality by increasing s. Perhaps, however, we
could replace the 1 in the numerator by something smaller. Indeed, we can, for
the comment at the top of page 68 shows that 1 can be replaced by 12 . Can we
do even better than this?
Recall that convergents give “the best” approximations to a real number α,
and that the approximations are especially good when the next partial quotient
is large. Consider what happens if the “next partial quotient” of α is never
large. An extreme example of such a number is
√
1
1
1
1+ 5
α =1+
=
.
1+ 1+ 1+ ···
2
In this case it is plain that every complete quotient αk is equal to α. Moreover,
if we calculate the first few convergents to α it is very easy to conjecture, and
equally easy to prove by induction, that qk = pk−1 for k ≥ −1. (It is also
easy to show, though unimportant at present, that the numerators pk and
74
denominators qk are just the Fibonacci numbers.) Therefore, from equation
(5) on page 63 we have
1
1
1
1
α − pk =
=
∼
= √ 2 .
2
2
−1
qk
(αqk + qk−1 )qk
(α + qk−1 /qk )qk
(α + α )qk
5 qk
Since we do not expect that any real irrational number will have worse rational
approximations than α, the following result is plausible.
JOC/EFR April 2000
School of Mathematics and Statistics
Adolf
Hurwitz
University of St Andrews, Scotland
The URL of this page is:
Theorem (Hurwitz). Let α be a real irrational number.
Then the inequality
α − p < √ 1
q
5 q2
has infinitely many rational solutions p/q.
Proof. Write
qk−1
rk =
qk
Adolf Hurwitz
(1859–1919)
for k ≥ 0. The idea of the proof is to show that if the required inequality
fails for three consecutive convergents pk /qk , pk+1 /qk+1 and pk+2 /qk+2 to α,
then
√ the two consecutive quotients rk+1 and rk+2 are both strictly greater than
1
(
5 − 1), and a contradiction follows.
2
To begin the proof, we use the equality in (5) on page 63 to see that
√
α − pk < √ 1
if and only if αk+1 + rk > 5 .
(8)
Close this window
2
qk 5 qk
Suppose that in fact
αk+1 + rk ≤
√
5 and αk+2 + rk+1 ≤
√
5,
(9)
and observe that we have
αk+1 = ak+1 +
1
αk+2
and
1
= ak+1 + rk ,
rk+1
(10)
where the second identity follows immediately from the defining recursion for
qk+1 . Eliminating ak+1 we obtain
1
1
+
= αk+1 + rk ,
αk+2
rk+1
75
and by using the assumed inequalities (9) we have
√
√
1
1
+
≤ 5.
5 − rk+1
rk+1
This inequality is easily simplified to give
√
2
rk+1
− 5 rk+1 + 1 ≤ 0 ,
√
√
and since the roots of the quadratic x2 − 5 x + 1 are 12 ( 5 ± 1) we obtain
√
rk+1 ≥ 12 ( 5 − 1). But rk+1 is rational, so equality cannot hold and we have
√
5−1
.
rk+1 >
2
√
If we now suppose further that αk+3 + rk+2 ≤ 5 , then exactly the same
argument gives
√
5−1
;
rk+2 >
2
but using the second identity from (10), with k replaced by k + 1, we have
√
√
5 − 1 5 − 1
1 = (ak+2 + rk+1 )rk+2 > 1 +
= 1,
2
2
which is absurd. To sum up, we have shown that a contradiction follows from
the assumption that the inequalities in (8) are false for three consecutive integers k; consequently, the required inequality is true for at least one in every
three convergents pk /qk , and the theorem is proved.
√
Theorem is the best possible. That
Theorem. The constant 5 in Hurwitz’
√
is, if A is a constant greater than 5 , then there exist irrational numbers α
such that the inequality
α − p < 1
(11)
q Aq 2
has only finitely many rational solutions.
√ Proof. We shall show that α = 12 1 + 5 is such a number – no surprise, in
√
view of the comments introducing Hurwitz’ Theorem. Let A > 5. For any
solution p/q of (11) we have
α − p < √ 1 < 1 ,
q
2q 2
5 q2
76
and so by a previous result p/q must be a convergent pk /qk to α. Using a result
asserted on page 74 (proof: exercise!) we have
α −
and therefore
p 1
1
=
=
,
q (αk+1 qk + qk−1 )qk
(α + qk−1 /pk−1 )q 2
A<α+
contrary to assumption. This completes the proof.
Comments.
• An alternative proof of this result has echoes of Liouville’s proof in Chapter 3. Let
√
1+ 5
.
α=
2
Then the minimal polynomial of α is f (x) = x2 −x−1, and for any rational
number p/q we have by the Mean Value Theorem
f (α) − f (p/q)
= f 0 (γ) = 2γ − 1
α − p/q
p p2 − pq − q 2 ≥ 1 ,
=
f
q2
2
q
q
√
|2γ − 1| = |(2α − 1) + 2(γ − α)| ≤ 5 + 2 α −
p .
q
p ;
q
2
√ ,
A(A − 5)
so there are only finitely many possibilities for q, and (11) can have only
finitely many rational solutions.
• As mentioned at the top of page 68, at least one of any two consecutive
convergents to an irrational number α satisfies the inequality
α − p < 1 .
q 2q 2
This can be proved by an argument very similar to Hurwitz’. (Exercise.
Do so!)
√
• In the proof on page 76 we considered the number α = 12 (1+ 5) and made
use of the fact that every complete quotient of α is equal to α itself. In
fact, it would have been sufficient to consider a number β having infinitely
many complete quotients equal to α. A little thought shows that this is
true if and only if
β = b0 +
for some γ between α and p/q. However f (α) = 0, and
putting all this information together yields
√
1
α − p α −
5
+
2
≤
2
q
q √
5 . Then
q2 <
√
qk−1 1
A ≤ lim α +
= α+
= 5,
k→∞
pk−1
α
77
Now suppose that A >
qk−1
.
pk−1
It follows that (11) has only a finite number of solutions. For otherwise this
inequality would hold for arbitrarily large k and we would find
and
All of this is true for any p/q; if p/q is a solution of (11), then
√
p √
2
.
A < 5 + 2 α − < 5 +
q
Aq 2
1
1
1
1
1
1
b1 + . . . + bn + 1 + 1 + 1 + · · ·
for some integers b0 , b1 , . . . , bn ; in other words, if the partial quotients of
β are all 1 from
√ some point on. It can be shown that if α is such a number
then for A > 5 the inequality (11) has only a finite number of solutions.
On the other hand, if we exclude from consideration all such α then the
result can be improved, and we find that
α − p < √ 1
q
8 q2
for infinitely
√ many rationals p/q. If even more α are ignored then the
constant 8 can be increased still further. In fact, Hurwitz’ theorem is
the first of a series of results which show that if α has a continued fraction
78
not in a certain finite number of
such that
α −
categories, then there is a constant C
p 1
<
q Cq 2
has infinitely many solutions; the constants C can be explicitly identified, and can be shown to be best possible, in the sense of the theorem
on page 76. If arranged in increasing order, these constants comprise a
sequence known as the Markov spectrum
(r
)
4 9 − 2 m = 1, 2, 5, 13, 29, 34, . . .
m which tends to a limit of 3.
We can make use of properties of continued fractions to show, as asserted in
Chapter 3, that there exist transcendental numbers which are not Liouville
numbers.
Theorem. Any Liouville number has a continued fraction with unbounded
partial quotients.
Proof. Suppose that α has partial quotients ak < A for k ≥ 1. Now if α is
rational it is certainly not a Liouville number; suppose that α is irrational. If
α is approximable to order s > 2 then there is a constant c such that
p c
0 < α − < s
(12)
q
q
for rationals p/q with arbitrarily large q. Choose q so large that q s−2 > (A+2)c.
Then certainly q s−2 > 2c, we have
p 1
0 < α − < 2 ,
q
2q
and by a previous result p/q is one of the convergents to α. For p/q = pk /qk
we have
1
1
1
α − p =
>
>
,
2
q
(αk+1 qk + qk−1 )qk
(ak+1 + 2)qk
(A + 2)q 2
Corollary. Not all transcendental numbers are Liouville numbers.
Proof. Consider all possible continued fractions
a0 +
1
1
1
,
a1 + a2 + a3 + · · ·
(13)
where each ak is either 1 or 2. It is a standard result of set theory that the set
of all such continued fractions is uncountable; but the set of algebraic numbers
is countable. So there exist (uncountably many!) continued fractions of the
form (13) which are transcendental. But by the above theorem, none of these
continued fractions is a Liouville number.
From these results we know that certain transcendental numbers have continued fractions with unbounded partial quotients while others have continued
fractions with bounded partial quotients (though we have given no specific
example of the latter). What happens if we ask similar questions regarding
algebraic numbers? We already know that the continued fraction expansions
for rationals and for quadratic irrationals are finite and periodic respectively,
and hence clearly have bounded partial quotients, so we need only consider
algebraic numbers of degree higher than 2.
• Do there exist algebraic numbers of degree n ≥ 3 whose continued fractions
have bounded partial quotients?
• Do there exist algebraic numbers of degree n ≥ 3 whose continued fractions
have unbounded partial quotients?
Clearly one, perhaps both, of these problems must have an affirmative answer;
unfortunately, each remains unsolved! There is not a single algebraic number
of degree 3 or more whose complete continued fraction is known (though most
experts in the field believe that such a number will always have unbounded
partial quotients). Indeed, there appears to be very little of any great generality
that can be said about continued fractions for algebraic numbers of degree 3
or more, or for transcendental numbers. We can, however, give some useful
methods of computation, as well as some results for specific important numbers.
and since q s−2 > (A + 2)c this contradicts (12). Hence α is not approximable
to order greater than 2, which proves more than we claimed.
Computing the continued fraction of an algebraic irrational. Let α
be a root of a known irreducible polynomial f with degree n ≥ 2 and integral
coefficients. We shall assume that α > 1, and that f has no other roots β > 1.
In this case there is a very simple algorithm to find the zeroth partial quotient
a0 = bαc: calculate f (1), f (2), f (3), . . . until a change of sign occurs; then a0
is the last argument before the change of sign. Since α is irrational we have
a0 < α < a0 + 1. The first complete quotient α1 is defined by α = a0 + 1/α1 ;
79
80
therefore
1
f a0 +
=0,
α1
and α1 is a root of the polynomial defined by
1
n
f1 (z) = z f a0 +
.
z
Since, by assumption, f has a unique real root greater than 1, it is not hard to
show that f1 has the same property. For let β = α1 = 1/(α − a0 ). Then
1
f1 (β) = β f a0 +
β
n
n
= β f (α) = 0 ,
and β > 1 since 0 < α−a0 < 1; so f1 has a real root greater than 1. Conversely,
if β is any such root of f1 , then a0 + 1/β is a root of f and hence a0 + 1/β = α.
Because f1 is a polynomial having integral coefficients and a unique real root
α1 > 1, the procedure can be iterated to find the sequence of partial quotients
of α. Observe that the complete quotients α = α0 , α1 , α2 , . . . need never be
calculated, so we do not have the problem of calculating decimal expansions
to many places: all our calculations will be performed in terms of integer
arithmetic, and so the process will be free of rounding errors.
√
Example. We can find the continued fraction for 3 2 by starting with the
polynomial f (z) = f0 (z) = z 3 − 2. We have
f0 (z) = z 3 − 2 ,
f1 (z) = −z 3 + 3z 2 + 3z + 1 ,
a1 = 3 ;
f3 (z) = −3z 3 + 12z 2 + 24z + 10 ,
a3 = 5 ;
f5 (z) = −62z 3 − 30z 2 + 84z + 55 ,
a5 = 1 ;
3
2
f2 (z) = 10z − 6z − 6z − 1 ,
3
2
f4 (z) = 55z − 81z − 33z − 3 ,
3
2
f6 (z) = 47z − 162z − 216z − 62 ,
and so
a0 = 1 ;
√
3
2=1+
a2 = 1 ;
a4 = 1 ;
a6 = 4
1
1
1
1
1
1
.
3+ 1+ 5+ 1+ 1+ 4+ ···
√
Alternatively, we can find the continued fraction for α = 3 2 by adapting
the method used for quadratic irrationals. However, α has degree 3 and we shall
81
therefore, in general, have to find reciprocals of sums of three terms. Writing
ω = e2πi/3 , we have
√
√ √
√ a + bω 3 2 + cω 2 3 4 a + bω 2 3 2 + cω 3 4
1
√
√ =
a3 + 2b3 + 4c3 − 6abc
a+b32+c34
√
a2 − 2bc
2c2 − ab
3
= 3
+ 3
2
3
3
3
3
a + 2b + 4c − 6abc a + 2b + 4c − 6abc
√
b2 − ac
3
4,
+ 3
3
3
a + 2b + 4c − 6abc
and clearly the algebra is going to be significantly harder than it is in the
quadratic case. The polynomial method involves much less work.
Comment. In the above discussion we assumed that f0 has no real root
β > 1 except for β = α. If this is not true we may apply the same algorithm
anyway, and obtain an appropriate sequence of functions fk . The only possible
additional difficulty lies in determining the partial quotients ak = bαk c: it may
be that fk has more than one root greater than 1, and we need to ensure that
we choose the correct one as αk . However, it can be shown that the assumed
condition must be true, if not for f0 then after a certain number of iterations,
and once this happens the algorithm proceeds with little difficulty.
Example. Find the first few terms of the continued fraction of α, the smallest
positive root of
f (z) = 2z 3 − 20z 2 + 62z − 61 .
Solution. Being careful not to miss a root, we find that f has two roots
between 2 and 3, and one between 5 and 6. So a0 = 2 and
1
f1 (z) = z 3 f 2 +
= −z 3 + 6z 2 − 8z + 2 .
z
Now f1 has roots between 0 and 1, which is of no interest to us, between 1 and
2, and between 4 and 5. The smallest root of f corresponds to the largest root
of f1 ; therefore a1 = 4 and
1
f2 (z) = z 3 f1 4 +
= 2z 3 − 8z 2 − 6z − 1 .
z
We find that f2 has only one root greater than 1 and so the procedure is
standard from now on; we obtain
α=2+
1
1
1
1
1
1
1
.
4 + 4 + 1 + 1 + 1 + 149 + 3 + · · ·
82
Another point worth noting is that the procedure which locates a root
of a polynomial by searching for a sign change will fail for a double root. In
this case, however, we chose our original polynomial f to be irreducible, and it
follows that f cannot have a double root.
The continued fraction of e. We shall determine the continued fractions
for a class of numbers related to the exponential constant e. To do so, we first
consider the functions defined by the infinite series
f (c; z) =
∞
X
k=0
here the parameter c is any real number except 0, −1, −2, . . . , and it is easy
to show that the series converges for all z. To simplify the notation we write
c(k) = c(c + 1) · · · (c + k − 1), with the understanding that c(0) = 1; thus
∞
X
1 zk
.
c(k) k!
k=0
The expression c(k) is referred to as “c rising factorial k”. It satisfies the two
important recurrences
c(k+1) = c(k) (c + k) = c(c + 1)(k) ,
∞
X
k=1
1
c(k+1)
(14)
Lemma. Let c be a positive real number, z a non–zero real number and k a
non–negative integer; then
2
hc c + 1
c f (c; z )
c + k − 1 c + k f (c + k; z 2 ) i
.
=
,
,
.
.
.
,
,
z f (c + 1; z 2 )
z
z
z
z f (c + k + 1; z 2 )
Proof. First observe that under the stated conditions f (c + k + 1; z 2 ) is given
by a series of positive terms, so it does not vanish and the last term in the
continued fraction makes sense. From (14) the rising factorials satisfy
c(k)
and hence
c+k
1
k
= (k+1) =
+ (k+1) ,
c
(c + 1)(k)
c
∞
X
∞
1
zk X k zk
+
.
f (c; z) =
(c + 1)(k) k! k=0 c(k+1) k!
k=0
83
k=0
k=0
and we have the second–order recurrence
z
f (c + 2; z) .
c(c + 1)
Rearranging this equation and replacing z by z 2 gives an identity which looks
something like the beginning of a continued fraction,
f (c; z 2 )/f (c + 1; z 2 ) = 1 +
z 2 /c(c + 1)
;
f (c + 1; z 2 )/f (c + 2; z 2 )
however, we need to convert this into a form in which the numerator z 2 /c(c+1)
is replaced by 1. So, multiply the quotient f (c; z 2 )/f (c + 1; z 2 ) by a factor Ac
to give
Ac z 2 /c(c + 1)
f (c + 1; z 2 )/f (c + 2; z 2 )
Ac Ac+1 z 2 /c(c + 1)
= Ac +
.
Ac+1 f (c + 1; z 2 )/f (c + 2; z 2 )
Ac f (c; z 2 )/f (c + 1; z 2 ) = Ac +
both of which are instances of the more general relation c(k+m) = c(k) (c+k)(m) .
1
∞
∞
X
X
z
zk
1 z k+1
1
zk
=
=
,
(k+2)
(k)
(k − 1)!
k!
c(c + 1)
k!
c
(c + 2)
f (c; z) = f (c + 1; z) +
1
zk
;
c(c + 1) · · · (c + k − 1) k!
f (c; z) =
The first series on the right hand side is evidently f (c + 1; z). The second may
be written
(15)
We want Ac Ac+1 z 2 /c(c + 1) = 1, that is, Ac Ac+1 = c(c + 1)/z 2 , and it will
suffice to take Ac = c/z. Making this choice and substituting into (15), we
have
c
1
c f (c; z 2 )
.
= +
2
z f (c + 1; z )
z
c + 1 f (c + 1; z 2 )
z f (c + 2; z 2 )
But now the complete quotient on the right hand side can be treated in the
same way, and the whole process repeated k times, to yield
c c+1
c + k − 1 c + k f (c + k; z 2 )
c f (c; z 2 )
=
,
,
.
.
.
,
,
z f (c + 1; z 2 )
z
z
z
z f (c + k + 1; z 2 )
as claimed.
84
Theorem. Let c and z be real numbers with c > 0 and z 6= 0, such that
(c + k)/z is a positive integer for all k ≥ 0. Then
c f (c; z 2 )
c c+1 c+2
=
,
,
,
.
.
.
.
z f (c + 1; z 2 )
z
z
z
Proof. Using the previous lemma and the uniqueness result on page 59, all we
need show is that
c + k f (c + k; z 2 )
>1
(16)
z f (c + k + 1; z 2 )
Similarly f
3
2
2; z
= (2z)−1 sinh 2z; taking q = 2p and combining these results,
cosh p1
f 12 ; 4p12
=p 3 1 .
sinh p1
f 2 ; 4p2
We have proved the following result.
Theorem. For any positive integer p we have
coth
Corollary. The numbers
for k ≥ 0. But we have
(c + k + 1)(k) = (c + k + 1)(c + k + 2) · · · (c + 2k)
> (c + k)(c + k + 1) · · · (c + 2k − 1)
= (c + k)(k) ,
and noting that z 2 is a positive real number, it follows that
f (c + k; z 2 ) =
∞
X
k=0
∞
X
1
z 2k
1
z 2k
>
= f (c + k + 1; z 2 ) .
(k)
(k)
k!
k!
(c + k)
(c + k + 1)
k=0
Since by assumption (c + k)/z ≥ 1, the inequality (16) holds and the result is
proved.
Finally we must find c and z such that the conditions in the above result
hold, and also such that the series representing f (c; z 2 ) and f (c + 1; z 2 ) can
be summed without excessive difficulty. We need c/z and 1/z to be positive
integers, say c/z = p and 1/z = q; then
f pq ; q12
= [ p, p + q, p + 2q, p + 3q, . . . ] .
p p
f q + 1; q12
Moreover, if k ≥ 0 we have
1 (k)
2
=
and so
f
1
2
3
2
2
1
2; z
1
1
1
1
=p+
.
p
3p + 5p + 7p + · · ·
··· k −
1
2
=
1
2
1
3
2
2 · · · k − 12 k
(2k)!
= 2k
k!
2 k!
∞
∞
X
X
22k k! z 2k
(2z)2k
=
= cosh 2z .
=
(2k)! k!
(2k)!
k=0
k=0
85
coth
1
,
p
e+1
e−1
and e ,
where in the first p is a positive integer, are neither rational numbers nor
quadratic irrationalities.
Proof. The first claim is true because coth 1/p has an infinite non-periodic
continued fraction. The second number given is in fact coth 12 . If e were
rational or a quadratic irrational, then (e + 1)/(e − 1) would be too.
Comment. The function f (c; z) employed in the above proof is closely related
to the hypergeometric function, defined by the series
F (a, b; c; z) =
∞
X
a(a + 1) · · · (a + k − 1) b(b + 1) · · · (b + k − 1) z k
c(c + 1) · · · (c + k − 1)
k!
k=0
for |z| < 1. Here a, b and c are real parameters with c 6= 0, −1, −2, . . . . The
hypergeometric function is a solution of the differential equation
z(1 − z)y 00 + (c − (a + b + 1)z)y 0 − aby = 0 .
A large number of important functions are special cases of the hypergeometric
function. For example,
F (1, 1; 1; z) =
F (−n, 1; 1; −z) =
zF (1, 1; 2; z) =
∞
X
k=0
∞
X
k=0
∞
X
k=0
zk =
1
,
1−z
n(n − 1) · · · (n − k + 1) k
z = (1 + z)n
k!
z k+1
= − log(1 − z) ;
k+1
86
for n ∈ N ,
while by taking c =
hence
zF
2
1
3
2 , 1; 2 ; −z
1
2
=
in the recurrence (14) we find ( 32 )(k) ( 12 )(k) = 2k + 1 and
∞
X
( 1 )(k)
2
3 (k)
(
)
k=0 2
(−1)k z 2k+1 =
∞
X
(−1)k
k=0
z 2k+1
= tan−1 z .
2k + 1
The functions cosh and sinh cannot be obtained by making a simple substitution of particular values for a, b and c; however we have
2k
∞ X
2 k! z 2k+1
a(k)
b(k)
z lim lim F (a, b; 32 ; z 2 /4ab) =
lim k
lim k
a→∞ b→∞
a→∞ a
b→∞ b
(2k + 1)! 22k k!
=
k=0
∞
X
k=0
z 2k+1
(2k + 1)!
= sinh z ,
r3k+1 = (4k + 2)r3k−2 + r3k−5 ,
By using the continued fractions found above we may compute the continued fraction for e itself.
Theorem. The continued fraction of e is
s3k+1 = (4k + 2)s3k−2 + s3k−5 .
Since pk and qk satisfy the same relations, a little attention to initial values
and an easy induction shows that
r3k+1 = 2qk
and s3k+1 = pk − qk
for all k ≥ −1. From the results proved on page 86 we have α = (e + 1)/(e − 1);
therefore
β = lim
it being possible to justify the interchange of sum and limits.
e=2+
Eliminating r3k , r3k−1 , r3k−3 and r3k−4 gives a recurrence involving r3k+1 , r3k−2
and r3k−5 ; the same recurrence is satisfied by the corresponding denominators,
and we have
k→∞
rk
r3k+1
2qk
2
= lim
= lim
=
=e−1 ,
k→∞ s3k+1
k→∞ pk − qk
sk
α−1
from which we obtain the continued fraction for e.
1
1
1
1
1
1
1
1
1
.
1+ 2+ 1+ 1+ 4+ 1+ 1+ 6+ 1+ ···
Proof. Let the convergents of the continued fractions α = [2, 6, 10, 14, . . .] and
β = [1, 1, 2, 1, 1, 4, 1, 1, 6, . . .] be pk /qk and rk /sk respectively. The kth partial
quotient of the former is 4k + 2, and so we have
pk = (4k + 2)pk−1 + pk−2 ,
qk = (4k + 2)qk−1 + qk−2 .
The partial quotients of the second continued fraction are
2k
if m = 3k − 1
am =
1
otherwise,
and so for any k ≥ 1 we can write
r3k+1 = r3k + r3k−1
r3k = r3k−1 + r3k−2
r3k−1 = 2k r3k−2 + r3k−3
r3k−2 = r3k−3 + r3k−4
r3k−3 = r3k−4 + r3k−5 .
87
88
APPENDIX 1.
APPENDIX 3.
A simple property of positive fractions. If a, b, c and d are positive, then
Cardinality of sets of sequences. Let A be a set with more than one
element. Then the set
a+c
b+d
of sequences in A is uncountable.
lies between a/b and c/d.
APPENDIX 2.
Solutions of simultaneous equations with integral coefficients. Let
a, b, c, d and p, q be integers. If ad − bc = ±1 then the simultaneous equations
ax + by = p
cx + dy = q
have an integral solution x, y. Conversely, if the system has an integral solution
for all integers p, q, then ad − bc = ±1.
Proof. The solution can be written
x
a
=
y
c
b
d
S = { (a0 , a1 , a2 , . . .) | ak ∈ A for all k }
Proof. Suppose that S is countable; then by definition (see Chapter 3, Appendix 1) there is a one-to-one function f from S to N. Let x and y be distinct
elements of A. Since f is one-to-one each k ∈ N is the image of at most one
sequence in S, and so there is a well–defined sequence (b0 , b1 , b2 , . . .) given by
bk =
x
y
if k = f (a0 , a1 , a2 , . . .) and ak = y
otherwise;
note that the “otherwise” includes both the case where ak is an element of A
other than y and the case where k is not in the range of f . Clearly (b0 , b1 , b2 , . . .)
is in S, and so f (b0 , b1 , b2 , . . .) is equal to some natural number k. But this is
impossible since from the definition we have bk = x if bk = y, and bk = y if
bk 6= y. We have a contradiction, and the result is proved.
−1 1
1
p
d −b
dp − bq
p
=
=
q
q
ad − bc −c a
ad − bc aq − cp
provided that ad − bc 6= 0. It is clear that if ad − bc = ±1 then x and y are
integers. Conversely, suppose that |ad − bc| > 1 and consider the solutions
when p = 1, q = 0 and when p = 0, q = 1. If these solutions are to be integers
then ad − bc must be a factor of a, b, c and d. But this leads to
(ad − bc)2 | ad − bc ,
which is impossible. Finally note that if ad − bc = 0, then there exist p, q for
which the system has no solution at all, and therefore certainly no integral
solution.
Exercise. Let A be an n × n matrix with integral entries. Show that the linear
equations Ax = b have a solution x with integral components for all integer
vectors b, if and only if det(A) = ±1.
89
90