with and . We call the number the floor of , and we also sometimes write . If , write
with and . Thus , which is a (non-simple) continued fraction expansion of . Continue in this manner so long as writing
with and . We call this procedure, which associates to a real number the sequence of integers , the continued fraction process.
so the continued fraction procedure produces the continued fraction of .
so and . We have
so again and . Likewise, for all . As we will see below, the following exciting equality makes sense.
sage: def cf(bits): ... x = (1 + sqrt(RealField(bits)(5))) / 2 ... return continued_fraction(x) sage: cf(10) [1, 1, 1, 1, 1, 1, 1, 3] sage: cf(30) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2] sage: cf(50) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
For example, is the floor of . Subtracting and inverting, we obtain , so . Subtracting and inverting yields , so . We will prove in Section 5.3 that the continued fraction of obeys a simple pattern.
The th partial convergent of the continued fraction of is
which is a good rational approximation to , in the sense that
Note that , which illustrates the bound in Corollary 5.2.11 below.
Let's do the same thing with : Applying the continued fraction procedure, we find that the continued fraction of is
The first few partial convergents are
These are good rational approximations to ; for example,
Notice that the continued fraction of exhibits a nice pattern (see Section 5.3 for a proof), whereas the continued fraction of exhibits no pattern that is obvious to the author. The continued fraction of has been extensively studied, and over 20 million terms have been computed. The data suggests that every integers appears infinitely often as a partial convergent. For much more about the continued fraction of or of any other sequence in this book, type the first few terms of the sequence into [#!sloane!#].
William 2007-06-01