## Program to find Nth term in the series 0, 2, 1, 3, 1, 5, 2, 7, 3,…

Given a number N. The task is to write a program to find the N-th term in the below series: 0, 2, 1, 3, 1,… Read More »

Given a number N. The task is to write a program to find the N-th term in the below series: 0, 2, 1, 3, 1,… Read More »

Give a number N, print alternate fibonacci numbers till n-th Fibonacci. Examples: Input : N = 7 Output : 0 1 3 8 Input :… Read More »

The tetranacci numbers are a generalization of the Fibonacci numbers defined by the recurrence relation T(n) = T(n-1) + T(n-2) + T(n-3) + T(n-4) with… Read More »

Given two numbers N and K. Find the number of ways to represent N as the sum of K Fibonacci numbers. Examples: Input : n… Read More »

Prerequisites: Generating Functions, Fibonacci Numbers, Methods to find Fibonacci numbers. The method of using Generating Functions to solve the famous and useful Fibonacci Numbers‘ recurrence… Read More »

A Matrix series is defined as follows: M, MT, M(MT), M(MT)2, M2(MT)3, M3(MT)5, M5(MT)8 . . . . . . . ., where M is a… Read More »

Given N positions, the task is to count the total number of ways to place X and Y such that no two X are together.… Read More »

Given two numbers M and N, the task is to check if the M-th and N-th Fibonacci numbers perfectly divide each other or not. Examples:… Read More »

Most of the Dynamic Programming problems are solved in two ways: Tabulation: Bottom Up Memoization: Top Down One of the easier approaches to solve most… Read More »

Given a number n, the task is to print first n Fibonacci numbers. Prerequisite : Program to print first n Fibonacci Numbers | Set 1… Read More »

Consider a sequence a0, a1, …, an, where ai = ai-1 + ai-2. Given a0, a1 and a positive integer n. The task is to… Read More »

Given first two numbers of series, find n terms of series with these two numbers. The given series follows the same concept as Fibonacci series,… Read More »

Print the Fibonacci sequence. The first Fibonacci numbers are: C++ // Simple CPP Program to print Fibonacci // sequence #include <iostream> using std::cout; void fib(int… Read More »

You are given two Integers N and M, and print all the terms of the series upto M-terms of the N-bonacci Numbers. For example, when… Read More »

Given a number N, find the number of ways to construct an array of size N such that it contains only 1s and 0s but… Read More »