Given a fibonacci number N, the task is to find the next fibonacci number.
Input: N = 5
8 is the next fibonacci number after 5
Input: N = 3
Approach: The ratio of two adjacent numbers in the Fibonacci series rapidly approaches ((1 + sqrt(5)) / 2). So if N is multiplied by ((1 + sqrt(5)) / 2) and round it, the resultant number will be the next fibonacci number.
Below is the implementation of the above approach:
- Find the previous fibonacci number
- Program to find Nth odd Fibonacci Number
- Program to find last two digits of Nth Fibonacci number
- Find nth Fibonacci number using Golden ratio
- Find Index of given fibonacci number in constant time
- 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
- Find the sum of first N odd Fibonacci numbers
- Finding number of digits in n'th Fibonacci number
- Find the GCD of N Fibonacci Numbers with given Indices
- Nth Even Fibonacci Number
- Nth XOR Fibonacci number
- Find length of longest Fibonacci like subsequence
- Find the Nth element of the modified Fibonacci series
- Find the longest Fibonacci-like subarray of the given array
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.