Fibonacci sequence

 

(1)   Dynamic programming

 

fib(i)=0                            for i=0

fib(i)=1                            for i=1

fib(i)=fib(i-2)+fib(i-1)    for i=2,3,4,. . .

 

(2)   General form

 

 

where  is Golden ratio.

 

(3)   Matrix form

 

      for n=1,2,3, . . .

 

Relation between Fibonacci sequence and Golden ratio

 

Ratio fib(n+1)/fib(n) will approach Golden ratio as n increases.

Golden ration  is a positive root of .