I am told that If n = 25 , we have Sn = 121392 where Sn is the number of additions performed in the following function to calculate the nth fibonacci number.Can anyone explain how ? Int F -LRB- int n -RRB- -LCB- if -LRB- n == 0 -RRB- return -LRB- 0 -RRB- ; if -LRB- n == 1 -RRB- return -LRB- 1 -RRB- ; return -LRB- F -LRB- n-1 -RRB- + F -LRB- n-2 -RRB- -RRB- ; -RCB-
How can I find and prove a formula for -LSB- math -RSB- f -LRB- n +1 -RRB- ^ 3 + f -LRB- n -RRB- ^ 3 - f -LRB- n-1 -RRB- ^ 3 -LSB- / math -RSB- for -LSB- math -RSB- n \ geq 2 -LSB- / math -RSB- where -LSB- math -RSB- f -LRB- n -RRB- -LSB- / math -RSB- is the nth Fibonacci number ?