Hosoya’s Triangle

The Fibonnaci triangle or Hosoya’s triangle is a triangular arrangement of numbers based on Fibonacci numbers. Each number is the sum of two numbers above… Read More »

Fibonacci Word

Like Fibonacci numbers, a Fibonacci word. is a specific sequence of binary digits (or symbols from any two-letter alphabet). The Fibonacci word is formed by… Read More »

Program to find last two digits of Nth Fibonacci number

Given a number ‘n’, write a function that prints the last two digits of n-th (‘n’ can also be a large number) Fibonacci number. Examples:… Read More »

Ways to paint stairs with two colors such that two adjacent are not yellow

Given n stairs and we have 2 colour yellow and green the task is that we have to paint given stairs by given colour with… Read More »

Prime numbers and Fibonacci

Given a number, find the numbers (smaller than or equal to n) which are both Fibonacci and prime. Examples: Input : n = 40 Output:… Read More »

Count ways to express ‘n’ as sum of odd integers

Given an positive integer n. Count total number of ways to express ‘n’ as sum of odd positive integers. Input: 4 Output: 3 Explanation There… Read More »

Time complexity of recursive Fibonacci program

The Fibonacci numbers are the numbers in the following integer sequence 0, 1, 1, 2, 3, 5, 8, 13… Mathematically Fibonacci numbers can be written… Read More »

Leonardo Number

The Leonardo numbers are a sequence of numbers given by the recurrence: The first few Leonardo Numbers are 1, 1, 3, 5, 9, 15, 25,… Read More »

Maximum games played by winner

There are N players which are playing a tournament. We need to find the maximum number of games the winner can play. In this tournament,… Read More »

Fibonacci number in an array

We have been given an array and our task is to check if the element of array is present in Fibonacci series or not. If… Read More »

Cassini’s Identity

Given a number N, the task is to evaluate below expression. Expected time complexity is O(1). f(n-1)*f(n+1) – f(n)*f(n) Where f(n) is the n-th Fibonacci… Read More »

Fibonacci modulo p

The Fibonacci sequence is defined as = + where = 1 and = 1 are the seeds. For a given prime number p, consider a… Read More »

Interesting facts about Fibonacci numbers

We know Fibonacci number, Fn = Fn-1 + Fn-2. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,… Read More »

An efficient way to check whether n-th Fibonacci number is multiple of 10

We are given a variable n, we need to find whether Fibonacci number will be multiple of 10 or not. Examples: Input : 15 Output… Read More »

Largest subset whose all elements are Fibonacci numbers

Given an array with positive number the task is that we find largest subset from array that contain elements which are Fibonacci numbers. Asked in… Read More »