Given a number N, the task is to check if the given number and all its digits are Fibonacci. If so, then the given number is a Full Fibonacci Number, else not.
Explanation: 13 and its digits 1 and 3 are all Fibonacci numbers
Explanation: 4 is not a Fibonacci number.
First check if all digits of N are Fibonacci or not. If so, similarly check if N is Fibonacci or not by the principle that a number is Fibonacci if and only if one or both of (5*N2 + 4) or (5*N2 – 4) is a perfect square.
Below code is the implementation of the above approach:
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Check if sum of Fibonacci elements in an Array is a Fibonacci number or not
- Check if a M-th fibonacci number divides N-th fibonacci number
- Check if a number is Full Prime
- An efficient way to check whether n-th Fibonacci number is multiple of 10
- How to check if a given number is Fibonacci number?
- Check if the n-th term is odd or even in a Fibonacci like sequence
- Check whether Array represents a Fibonacci Series or not
- Check whether frequency of characters in a string makes Fibonacci Sequence
- Number of ways to represent a number as sum of k fibonacci numbers
- Finding number of digits in n'th Fibonacci number
- Nth XOR Fibonacci number
- Nth Even Fibonacci Number
- Find the next Non-Fibonacci number
- Fibonacci number in an array
- Find the next fibonacci number
- n'th multiple of a number in Fibonacci Series
- Program to find Nth odd Fibonacci Number
- Python Program for n-th Fibonacci number
- Nth Fibonacci number using Pell's equation
- Count of Fibonacci divisors of a given number
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.