OK, maybe not for the greater good, but still fun. This first post will
be relatively short and sweet, intended to give an introduction for the
posts that will follow.
Before the introduction, some
motivation
courtesy of Wikipedia:
...decimal representation has some problems. One problem is that many
rational numbers lack finite representations in this system. For
example, the number 31 is represented by the
infinite sequence (0,3,3,3,3,…). Another
problem is that the constant 10 is an essentially arbitrary
choice, and one which biases the resulting representation toward numbers that
have some relation to the integer 10. For example,
1600137 has a finite decimal representation,
while 31 does not, not because
1600137 is simpler than
31, but because 1600 happens
to divide a power of 10(106=1600×625). Continued fraction
notation is a representation of the real numbers that avoids both
these problems. Let us consider how we might describe a number like
93415, which is around 4.4624.
This is approximately 4. Actually it is a little bit more
than 4, about 4+21. But the
2 in the denominator is not correct; the correct
denominator is a little bit more than 2 about
2+61, so 93415 is
approximately
4+2+611.
But the 6 in the denominator is not correct; the correct
denominator is a little bit more than 6, actually
6+71. So 93415 is
actually
4+2+6+7111.
This is exact...
With this in mind, one can define an infinite continued fraction to be
a0+a1+a2+⋱11.
With the denominators a0,a1,a2,…, we can define
a recurrence for the finite approximations (convergents) of this value. For
example, the zeroth is a0 and the first is
a0+a11=a1a0a1+1.
The other motivation (the one I actually learned first in real life) for
continued fractions comes from 2 being represented by
an infinite continued fraction. (Instead of saying a probability of
0.01876, people would rather say a 1 in
53 chance.) So we try to write
2=1.41421356… as
1+2.4141. But, instead, notice that
2=1+(2−1)=1+2+11.
Plugging this into itself, we have
2=1+1+1+2+111=1+1+1+1+1+2+1111
and notice it can be represented by (1;2,2,2,…).
Define the nth convergent to be
knhn, so above we have
h0=a0,k0=1 and
h1=a0a1+1,k0=a1.
Claim:
hn and kn satisfy
hnkn=anhn−1+hn−2=ankn−1+kn−2
along with h−1=1,h−2=0 and
k−1=0,k−2=1.
Proof:
The fraction knhn is converted
into kn+1hn+1 simply by
changing an to an+an+11
in the final denominator. Since