I am trying to solve reccurent equation:
$X_{n} = 2X_{n-1} + 1 , n > 1 , X_{1} = 2$
My solutions is as following
$X_{n} = 1 + 2X_{n-1}$
$ = 1 + 2 ( 1 + 2X_{n-2})$
$ = 1 + 2 ( 1 + 2( 1 + 2X_{n-3}))$
$ = 1 + 2 ( 1 + 2( 1 + 2...( 1 + 2*2))$
So $X_1 = 2$ , $X_2 = 5$, $X_3 =11$ , $X_4 = 23$.
But i fail to see the pattern , how can we express this equation with formula?
We add $1$ $n$ times so we have to add $+ n$ in the formula. Also every layer is multiplied by $2$ . The only formula that came to my mind is
$n + 1 + 2\sum_{i=0}^{n-1}i$
Which match only about every second index right. What is the right way to express this problem with formula?
Write $y_n=x_n+1$ and solve $y_n=2y_{n-1}$.