
While we are talking about different ways of calculating terms of the famous sequence, let's derive the closed-form expression for the nth number.
In school I had some trouble deriving this expression, so I decided to try now. It worked this time. I have no clue what was wrong. Probably nowadays I know how to cheat and choose a convenient starting index. I'm not sure...
Let's check the most interesting parts of this derivation, which might come in handy in other problems.
- for a linear recurrence relation a geometric progression can be found to satisfy it
- to find the common ratio, one has to solve a polynomial equation
- if d is the polynomial's degree, there are d geometric progressions - one per root
- repeated roots - a different story
- a linear combination of geometrical progression is also a solution of recurrency
- starting values give you a system of linear equations for coefficients in a linear combination
One day we can discuss Prony's method. Surprisingly it's driven by the same ideas. There is a connection with differential equations too.