Fibonacci!

It goes 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55…

So, what do you think? Kind of remarkable, with those irrational numbers, trigonometric functions, complex roots, and chaos, right? What? You don’t see them? Look more closely.

Take ratios of consecutive Fibonacci numbers and they approach , the “Golden Ratio”. Weird, right? It’s all integers, and yet they point to an irrational number:

n | F_{n} |
F_{n}/F_{n-1} |
---|---|---|

0 | 0 | |

1 | 1 | |

2 | 1 | 1 |

3 | 2 | 2 |

4 | 3 | 1.5 |

5 | 5 | 1.666666667 |

6 | 8 | 1.6 |

7 | 13 | 1.625 |

8 | 21 | 1.615384615 |

9 | 34 | 1.619047619 |

10 | 55 | 1.617647059 |

11 | 89 | 1.618181818 |

12 | 144 | 1.617977528 |

13 | 233 | 1.618055556 |

14 | 377 | 1.618025751 |

15 | 610 | 1.618037135 |

But the Fibonacci sequence is just one instance of a more general integer linear recurrence sequence of order 2, defined by:

where are integer constants. gives the Fibonacci sequence. (One can get even more general by choosing other starting values; gives the Lucas sequence, for instance. But for our purposes let’s stick with .)

Keeping but using we get a sequence that increases much faster, not surprisingly. It looks like the ratio of consecutive terms converges to about 3.7, but the convergence is much slower:

n | L_{n} |
L_{n}/L_{n-1} |
---|---|---|

0 | 0 | |

1 | 1 | |

2 | 1 | 1 |

3 | 11 | 11 |

4 | 21 | 1.909090909 |

5 | 131 | 6.238095238 |

6 | 341 | 2.603053435 |

7 | 1651 | 4.841642229 |

8 | 5061 | 3.0654149 |

9 | 21571 | 4.262201146 |

10 | 72181 | 3.346205554 |

11 | 287891 | 3.988459567 |

12 | 1009701 | 3.507233641 |

13 | 3888611 | 3.851250024 |

14 | 13985621 | 3.596559543 |

15 | 52871731 | 3.780434991 |

If someone asks you, “what’s the next number in this sequence? 0, 1, 2, 3, 4, 5…” you can say, “that’s easy, it’s an integer linear recurrence sequence of order 2 with :”

n | L_{n} |
L_{n}/L_{n-1} |
---|---|---|

0 | 0 | |

1 | 1 | |

2 | 2 | 2 |

3 | 3 | 1.5 |

4 | 4 | 1.333333333 |

5 | 5 | 1.25 |

6 | 6 | 1.2 |

7 | 7 | 1.166666667 |

8 | 8 | 1.142857143 |

9 | 9 | 1.125 |

10 | 10 | 1.111111111 |

11 | 11 | 1.1 |

12 | 12 | 1.090909091 |

13 | 13 | 1.083333333 |

14 | 14 | 1.076923077 |

15 | 15 | 1.071428571 |

And there of course the ratios of consecutive terms converge to 1.0, but slowly.

It might take you a little longer to come to grips with 0, 1, 1, –1, –3, –1, 5, 7, –3… though. But that’s just :

n | L_{n} |
L_{n}/L_{n-1} |
---|---|---|

0 | 0 | |

1 | 1 | |

2 | 1 | 1 |

3 | -1 | -1 |

4 | -3 | 3 |

5 | -1 | 0.3333333333 |

6 | 5 | -5 |

7 | 7 | 1.4 |

8 | -3 | -0.4285714286 |

9 | -17 | 5.666666667 |

10 | -11 | 0.6470588235 |

11 | 23 | -2.090909091 |

12 | 45 | 1.956521739 |

13 | -1 | -0.02222222222 |

14 | -91 | 91 |

15 | -89 | 0.978021978 |

Whoah, chaotic! Doesn’t look like that one’s consecutive term ratio is converging to anything. Or diverging. It’s just all over the place.

One more: :

n | L_{n} |
L_{n}/L_{n-1} |
---|---|---|

0 | 0 | |

1 | 1 | |

2 | 2 | 2 |

3 | 2 | 1 |

4 | 0 | 0 |

5 | -4 | |

6 | -8 | 2 |

7 | -8 | 1 |

8 | 0 | 0 |

9 | 16 | |

10 | 32 | 2 |

11 | 32 | 1 |

12 | 0 | 0 |

13 | -64 | |

14 | -128 | 2 |

15 | -128 | 1 |

Huh. Not converging, but not chaotic. So what’s going on?

Well, let’s go back to the Fibonacci sequence. It seems to be connected with . And in fact, a closed formula is

where denotes the nearest integer to . Or another formula:

Wait, what? You’re taking ratios of differences of powers of irrational numbers and irrational numbers and getting integers? Well, yes. Because powers of and contain terms with even powers of , which are positive integers and cancel in the difference, and odd powers of , which are negative integers times ; those don’t cancel in the difference, and then the factor of cancels in the ratio, so you’re left with integers. Still, seems kind of weird, this intimate relationship between and the Fibonacci sequence.

But consider this quadratic equation:

whose solutions are and . Then and also are solutions of

(which is just the previous equation multiplied by ). If we define , where and are constants, then

so satisfies the Fibonacci recurrence relation, and if we solve the simultaneous equations

we get , and with those values, . Ta daa.

Well, we can generalize this. Consider the sequence

where and are integers; this is an integer linear recurrence sequence. To get a closed formula for start with the equation

whose solutions are . If , then setting to a linear combination of the s gives you the general solution — I won’t prove that, but it’s true.You can find a proof elsewhere, e.g. here. Imposing you get the particular solution

.

What if ? Then and the general solution is . (Once again, follow the above link or do some Googling if you want the proof.) Imposing you get

.

So what’s the behavior as increases? If and then as gets large, approaches and the ratio approaches . Similarly if and , the ratio approaches . Clearly the larger the difference in magnitude of the s the faster this convergence happens.

If , the ratio of consecutive terms approaches .

And what if ? Now it’s a whole new ball game; the s are complex, with . Taking the case , we have

where . Now

( denotes imaginary part)

When you get something similar, but multiplied by .

(So, uh, wait, we’re saying that right hand side is always an integer? Yes. You want proof? Heh.)

And that means the behavior as increases is… well. It’s complicated, isn’t it? That throws a monkey wrench into the whole business.

So let’s go back to our examples from above. If then we have the Fibonacci series. and is about two and a half times larger than , so the ratio of consecutive values converges quickly to .

If then ; the ratio converges to but more slowly.

The case gives , so the ratio approaches . Specifically it’s , so the convergence is pretty slow.

And for , and

and the ratios of consecutive terms don’t behave smoothly.

The case also has , but in this case the angle is , so the value of repeats after four steps and the sequence behaves regularly, with the ratios of consecutive terms cycling through 2, 1, 0, (undefined).

So you see? You thought when we started all this was just multiplying and adding integers. We ended up with irrationals and powers of complex numbers and trigonometric functions and chaos and all kinds of stuff. Amazing.