The Fibonacci numbers Fn are given by the recurrence
F0 = 0
F1 = 1
Fn = Fn-1 + Fn-2 (for n > 1).
The first few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ... .
The generating function for the Fibonacci numbers is z/(1-z-z2), which can be proved easily from the recurrence (see GeneratingFunctions). Expanding the generating function using partial fractions gives the formula
where
is the golden_ratio.