Fibonacci and continued fractions

The ancient Greeks (and pretty much everyone in the art world from the Renaissance onwards) were kind of fascinated with the golden ratio, or φ (phi). To see why it might be seen as interesting, let’s take a look at a geometric view of the golden ratio. Consider a rectangle: the sides of this rectangle are in the golden ratio if you can subtract a square based on the shorter side and are left with another smaller rectangle which is also in the golden ratio. Inception!

The sides of the bigger rectangle are in the ratio φ:1, whereas the smaller rectangle are in the ratio 1:(φ – 1). In other words, we can write:

φ/1 = 1/(φ – 1)

which becomes:

φ2 – φ – 1 = 0

from which using the standard quadratic equation we can calculate that φ = (1 + √5)/2 = 1.618…

Fairly interesting, but now let’s take this further. We can rewrite the quadratic equation as:

φ2 = φ + 1

and hence:

Now we can substitute the φ in the denominator with the sum from the right hand side:

And again:

I’m sure (especially given that what I said about this representation from last time) you can see that φ = [1; 1, 1, 1, 1, …]. A very nice elegant result.

So what has all this to do with Leonardo of Pisa, also known as Fibonacci?

The convergents of a continued fraction [a; b, c, d, e, f, …] are the rational numbers formed by the sequence of continued fractions [a;], [a; b], [a; b, c], [a; b, c, d], and so on. If you like, these rational numbers converge on the actual value of the continued fraction. For a infinite continued fraction, this gives a sequence of more and more accurate rational numbers to the value of the continued fraction. For example, given that π = [3; 7, 15, 1, 292, …] we can calculate the convergents as 3, 22/7, 333/106, 355/113, and so on. You might recognize a couple of well-used familiar values in there.

So what are the convergents to φ? Here we go:

1 (or 1/1), 2 (or 2/1), 3/2, 5/3, 8/5, 13/8, 21/13, 34/21, …

If you know your Fibonacci sequence of by heart (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …), you’ll recognize that the numerators and the denominators are successive Fibonnacci numbers. To be a bit more formal, the nth convergent to φ is Fn+1 / Fn. This conclusion, by the way, also shows that the ratio of successive Fibonacci numbers gets closer and closer to φ the further long the sequence you go.

Continued fractions: yes, they’re bizarre, but they don’t half poke their noses in to some weird places to produce some interesting results.

Now playing:
Kershaw, Nik - Bogart
(from Human Racing)

4 Responses

#1Craig Stuntz said...
12-Jan-12 8:05 AM

I happened upon this and thought of your post:

Seriously, if you're going to get a tattoo, it should be math, since that's the only thing which is REALLY permanent.

#2julian m bucknall said...
12-Jan-12 9:00 AM

Craig: That's brilliant!

Cheers, Julian

#3Craig Stuntz said...
12-Jan-12 9:04 AM

Hmm... Looks like the blog comment system ate the underscores in the second link. I'll try again:

Tattoo picture

#4julian m bucknall said...
12-Jan-12 12:33 PM

Cheers, Julian

Leave a response

Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.

•  Emphasize with italics: surround word with underscores `_emphasis_`
•  Emphasize strongly: surround word with double-asterisks `**strong**`
•  Link: surround text with square brackets, url with parentheses `[text](url)`
•  Inline code: surround text with backticks ``IEnumerable``
•  Unordered list: start each line with an asterisk, space `* an item`
•  Ordered list: start each line with a digit, period, space `1. an item`
•  Insert code block: start each line with four spaces
•  Insert blockquote: start each line with right-angle-bracket, space `> Now is the time...`