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 sum of Fibonacci elements in an Array is a Fibonacci number or not
- GFact 22 | (2^x + 1 and Prime)
- GFact 23 | (Brocard’s problem)
- Check if a M-th fibonacci number divides N-th fibonacci number
- Number of ways to represent a number as sum of k fibonacci numbers
- Nth XOR Fibonacci number
- Nth Even Fibonacci Number
- Find the next Non-Fibonacci number
- Fibonacci number in an array
- Find the next fibonacci number
- How to check if a given number is Fibonacci number?
- Nth Fibonacci number using Pell's equation
- Check if a number is Full Fibonacci or not
- Count the nodes whose sum with X is a Fibonacci number
- Python Program for n-th Fibonacci number
- Program to find Nth odd Fibonacci Number
- Find the previous fibonacci number