Nth Even Fibonacci Number.
1 Like
The Fibonacci numbers are the numbers in the following integer sequence.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ………
In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation
Fn = Fn-1 + Fn-2 with seed values
F0 = 0 and F1 = 1.
The even number Fibonacci sequence is : 0, 2, 8, 34, 144, 610, 2584…. We have to find nth number in this sequence.
The formula of even Fibonacci number = ((4*evenFib(n-1)) + evenFib(n-2));
You can more details on geeksforgeeks post.
1 Like