with
with
with
so the continued fraction procedure produces the continued fraction of
so
so again
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,
The
th partial convergent of the continued fraction of
is
which is a good rational approximation to
Note that
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
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