Definition
A simple continued fraction is an expression of the form
where the are a possibly infinite sequence of integers such that is nonnegative and the rest of the seqence is positive. We often write in lieu of the above fraction. We may also call them regular continued fractions.
Truncating the sequence at and computing the resulting expression gives the th convergent for some positive coprime integers . The first three convergents are
Induction proves the recurrence relations:
for . We can make these relations hold for all by defining and . These correspond to the convergents 0 and , the most extreme convergents possible for a nonegative integer. They also allows us to show
Thus the difference between successive convergents approaches zero and alternates in sign, so a continued fraction always converges to a real number. This equation also shows that and are indeed coprime, a small detail glossed over earlier.
A similar induction shows
and thus decreases for even, and increases for odd.
Example
We demonstrate how to compute convergents of in practice. Terry Gagen introduced this to me as the “magic table”. I’ll refer to this method by this name, as I don’t know its official title.
We write the sequence left to right, and two more rows are started, one for the and one for the , which we bootstrap with the zero and infinity convergents:
For each row, we carry out the recurrence relation from left to right. In other words, for each row entry, write in (number to the left) (column heading) (number two to the left):
Observe
Rearranging, we see must be a solution to , but since is positive (indeed, ), we have . We obtain empirical evidence of some of our earlier statements: the convergents approach , alternatively overshooting and undershooting the target, but getting closer each time.