Solving the Fibonacci recurrence with generating functions
posted by benzi
Then this generating function can be broken into partial fractions: If

r_1 = \frac{-1 + \sqrt{5}}{2} \text{ and } r_2 = \frac{-1 - \sqrt{5}}{2}

are the roots of 1 - x - x^2 = 0, then

u = \frac{-x}{(x-r_1)(x-r_2)} = \frac{A}{x-r_1} + \frac{B}{x-r_2},

where
A = \frac{-r_1}{r_1 - r_2} \text{ and } B = \frac{r_2}{r_1 - r_2}.


r_1 - r_2 turns out to be \sqrt{5}, so

u \quad=\quad \frac{1}{\sqrt{5}}\left[ \frac{-r_1}{x-r_1} + \frac{r_2}{x-r_2} \right].


Each fraction can be expressed as a geometric series in x, i.e.,

u \quad=\quad \frac{1}{\sqrt{5}}\left[ \frac{1}{1 - x/r_1} - \frac{1}{1 - x/r_2} \right] \quad=\quad \frac{1}{\sqrt{5}}\left[ \left(1 + \frac{x}{r_1} + \left(\frac{x}{r_1}\right)^2 + \cdots\right) - \left(1 + \frac{x}{r_2} + \left(\frac{x}{r_2}\right)^2 + \cdots\right) \right].


In this series, the coefficient of x^n is \frac{1}{\sqrt{5}} \left[ \left(\frac{1}{r_2}\right)^n - \left(\frac{1}{r_2}\right)^n \right]. This is thus the nth Fibonacci number as above, so

F_n = \frac{1}{\sqrt{5}} \left[ \left(\frac{1}{r_2}\right)^n - \left(\frac{1}{r_2}\right)^n \right].
Reply to this post
Back to original post
Submit Reply
Title: Your Name:
Wrap equations in [EQ]equation here[/EQ] tags, and inline equations in [IEQ][/IEQ] tags.