Druva Interview Question

Solve a mathematics recurrence problem