Daily Archives: April 24, 2008
Generating Fibonacci: Part II
We left off in our quest for an explicit formula for the nth Fibonacci number having created this amazing generating function: .
To do what we’re about to do, I need to remind you of two precalculus things:
First, that
. If you don’t know why, I suggest doing long division!
Second, partial fractions.
I’m going to go through this explanation assuming you know these two things.
So let’s look at the denominator of our and factor it. Okay, okay, you got me. There isn’t a nice factoring with integers. But it can still be factored, of course.
, where
and
. Using partial fractions, we get:
We’ve made good headway, but what we don’t know are and
! However, noticing that we can use the first precalculus topic above, that
.
Rewriting this as a simple polynomial, we get:
Now we’re almost done! We use the initial conditions to find out and
.
Since we know and
, we can say
and
. Solving these two equations simultaneously yields
and
.
So the nth Fibonacci number is:
which simplifies to: .
Which is what we set out to show! Huzzah! What’s also nice about this (besides the fact that it’s an integer, which is surprising) is that it shows that the Fibonacci sequence grows exponentially!
Generating Fibonacci: Part I
Yes, this is a YAFPOTW (Yet Another Fibonacci Post On The Web).
People have talked about and analyzed the Fibonacci sequence to death. So I’m clearly not going to be doing something new and novel for everyone. But I remember one stunning way to look at Fibonacci is through Generating Functions. You only really need precalculus to understand it, as long as you allow for infinite degree polynomials. And the best part is: you can apply this method to any simple recurrence relation.
To refresh your memory, the Fibonacci sequence is: 1,1,2,3,5,8,13,…, where the nth Fibonacci number is the sum of the two preceeding Fibonacci numbers:
.
That recursive formula, with the initial conditions ( and
), defines the entire sequence.
Let’s create a polynomial function from these Fibonacci numbers:
We call this function the generating function of the sequence
.
So what if we add ? First we find
:
and we add, term by term, to get:
Excellent! Do you see where this is going? HUZZAH We know those coefficients! They use the recursion formula that defines the Fibonacci numbers! So we simplify:
And we know , we replace that
above to get:
Notice the right side of the equation is equal to:
which immediately shows us a ! So we can rewrite that to as the much simpler:
And we’re almost there! Replacing with it’s value of 1, multiplying both sides by
, and rearranging, yields:
. So we get:
This is our generating function! The coefficients of the polynomial expansion will give you the Fibonacci sequence! But this method of generating functions will prove a nice and general way to find explicit solutions for any basic recursive relation. (What if we had the Lucas Numbers, for example? Or some recurrence like ?)
In a later post, I’ll write about how to get an explicit formula for the nth Fibonacci number from this. In case you need a refresher or never knew:
Where clearly we see some popping up of the golden ratio and its “opposite”! And in our generating function, we see an which has zeros which are the golden ratio and its “opposite.”

