Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 2187. Generalized Fibonacci

Created by kwijibo28

The Fibonacci sequence is defined as:

Fib(1) = 0
Fib(2) = 1
Fib(N) = Fib(N-1) + Fib(N-2)

The Fibonacci sequence can be generalize as follow:

Fib_gen(1) = a
Fib_gen(2) = b
Fib_gen(N) = Fib_gen(N-1) + Fib_gen(N-2)

where 0 >= a >= b

Moreover it can be shown that

Fib_gen(N) = k(1) * Fib(N) + k(2) * Fib(N+1)

Given a and b find k(1) and k(2).


Problem Group

Solution Statistics

26 correct solutions 5 incorrect solutions
Last solution submitted on Sep 27, 2015

Problem Comments