- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Python Program for nth multiple of a number in Fibonacci Series
In this article, we will learn about the solution to the problem statement given below.
Problem statement− We are given a number, we need to find the nth multiple of a number k in Fibonacci number.
The solution to the problem is discussed below−
# find function def find(k, n): f1 = 0 f2 = 1 i =2; #fibonacci recursion while i!=0: f3 = f1 + f2; f1 = f2; f2 = f3; if f2%k == 0: return n*i i+=1 return # multiple of which number n = 5; # number k = 4; print("Position of n\'th multiple of k in""Fibonacci Series is: ", find(k,n));
Position of n'th multiple of k inFibonacci Series is: 30
All the variables and functions are declared in the global scope as shown in the figure above.
In this article, we have learned how we can find nth multiple of a number k in the Fibonacci series.
- Java Program for nth multiple of a number in Fibonacci Series
- Program to find Nth Fibonacci Number in Python
- Write a C# function to print nth number in Fibonacci series?
- C program to find Fibonacci series for a given number
- Program to find Fibonacci series results up to nth term in Python
- Python Program for nth Catalan Number
- C++ program to find Nth Non Fibonacci Number
- Python Program for n-th Fibonacci number
- Program to find Nth Even Fibonacci Number in C++
- Java program to print Fibonacci series of a given number.
- Program to find nth Fibonacci term in Python
- Program to find last two digits of Nth Fibonacci number in C++
- Python Program for Fibonacci numbers