Continued fractions; LaTeX Trial

by landonlehman

I am hoping to be able to use \LaTeX code for future blog posts, so this post is just to see how it works.  The content is not original – I recently read about continued fractions in The Princeton Companion to Mathematics (a book that I highly recommend to anyone interested in math).

First of all, what are continued fractions?  The easiest explanation is by way of constructing an example.  Take the all-important transcendental number e=2.718281828459....  The leading integer 2 will be the first number in the continued fraction, so subtract it.  We are left with 0.71828....  Now take the reciprocal of this number: 1/0.71828... = 1.3922....  Again use the leading integer for the continued fraction and subtract it from the original number (1.3922...-1), giving 0.3922....  Take the reciprocal of this number and repeat the process ad infinitum to generate the continued fraction for e:

e = 2 +\cfrac{1}{1+ \cfrac{1}{2+\cfrac{1}{1+...}}}

Several notes:

  1. This is a sloppy, non-technical way of explaining the algorithm for obtaining a continued fraction.  What is really going on is the use of a certain form of the Euclidean algorithm for division.  But this is an easy way to get started actually writing down a continued fraction.
  2. The above formula took some time to input using \LaTeX and is very error-prone.  Since the numerator of each fraction is always 1 (aside from the initial integer), we can compress the notation as follows: e=[2; 1,2,1,1,...].  Semicolon after the initial integer part; commas after that.
  3. (Note promoted to part of main text).
  4. The ... at the end of the continued fraction signify that the fraction does not terminate.  This is because e is not a rational number.  In general, rational numbers have finite continued fractions (i.e. the algorithm will terminate eventually) and irrational numbers have infinite continued fractions (which may or may not be periodic).

(3)  I was going to say that the continued fraction for e does not have a simple form, because e is transcendental and all that.  But the continued fraction form of e actually contains a very interesting pattern.  Let’s look at some more digits using the compressed notation:

e = [2;1,2,1,1,4,1,1,6,1,1,8,1,1,10,1,1,12,1,1,14,1...]

See the pattern?  If not, drop the initial 2 and write the remaining numbers in groups of three.  The outer two numbers in each triplet are always 1, while the middle number starts at 2 and increases by 2 in each successive triplet.  More digits can be found here (hey look – one of my links was actually useful 🙂 ).  I don’t know the explanation for this pattern, but it would be very interesting to find out whether it is just some numerical coincidence or if it points to some more fundamental property of e.

Well, I think I figured out how to use \LaTeX in WordPress.  I picked e at random for an illustration of continued fractions and found out about the cool pattern while I was writing up the post.  So I didn’t get to what I wanted to talk about, but that’s ok because I learned something new!  This post is plenty long, so I will conclude with a preview of what I originally planned to discuss:  Cutting off the continued fraction of an irrational number provides a (rational) approximation to that number – you can perhaps imagine how you might go through some standard but lengthy algebraic manipulations to get a single “normal” fraction out of any finite continued fraction.  There is a well-defined way in which this approximation is the “best” approximation to the original number.  And out of all the continued fraction approximations of all the irrational numbers, the number that is most difficult to approximate in this manner turns out to be very interesting.

More to come!

Advertisements