SEQ - EDITORIAL

Difficulty: Easy - Medium

Pre requisites: Basic mathematics

Problem link:

Contest problem link

Practice problem link

Problem:
To find the nth number in the series:

2 3 7 13 27…

Explanation:

Here the series can be interpreted in two ways.

  1. It is a series where the number at nth position is

    T(n)=T(n-1)+2*T(n-2)

  2. It can also be interpreted as,

    T(n)= 2*T(n-1)+1 ,if n is odd

    T(n)=2*T(n-1)-1 ,if n is even

The solution has been provided using 1st interpretation.

Problem setter’s solution: SOLUTION