We have discussed different methods to find nth Fibonacci Number.
Following is another mathematically correct way to find the same.
nth Fibonacci Number :
Here φ is golden ratio with value as
The above formula seems to be good for finding nth Fibonacci Number in O(Logn) time as integer power of a number can be calculated in O(Logn) time. But this solution doesn’t work practically because φ is stored as a floating point number and when we calculate powers of φ, important bits may be lost in the process and we may get incorrect answer.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Find nth Fibonacci number using Golden ratio
- Deriving the expression of Fibonacci Numbers in terms of golden ratio
- Finding number of digits in n'th Fibonacci number
- Check if a M-th fibonacci number divides N-th fibonacci number
- GFact 22 | (2^x + 1 and Prime)
- GFact 23 | (Brocard’s problem)
- Number of ways to represent a number as sum of k fibonacci numbers
- Nth Even Fibonacci Number
- Nth XOR Fibonacci number
- Fibonacci number in an array
- Find the next fibonacci number
- Nth Fibonacci number using Pell's equation
- n'th multiple of a number in Fibonacci Series
- Count the nodes whose sum with X is a Fibonacci number
- Find the previous fibonacci number