Computer Science, asked by akashkadali7838, 8 months ago

Prime fibonacci to find prime numbers between n1 and n2 and make possible unique combinations

Answers

Answered by Anonymous
0

Answer:

Given a number, find the numbers (smaller than or equal to n) which are both Fibonacci and prime.

Examples:

Input : n = 40

Output: 2 3 5 13

Explanation :

Here, range(upper limit) = 40

Fibonacci series upto n is, 1,

1, 2, 3, 5, 8, 13, 21, 34.

Prime numbers in above series = 2, 3, 5, 13.

Input : n = 100

Output: 2 3 5 13 89

Explanation :

Here, range(upper limit) = 40

Fibonacci series upto n are 1, 1, 2,

3, 5, 8, 13, 21, 34, 55, 89.

Prime numbers in Fibonacci upto n : 2, 3,

5, 13, 89.

Similar questions