<s>[INST] why$2 (-1 + 2^{1 + n})$ is the answer to the recurrence relation $a_{n}=2a_{n-1}+2$? $a_{0}=2$
$a_{1}=2(2)+2$
$a_{2}=2(2(2)+2)+2$
$a_{3}=2(2(2(2)+2)+2)+2$
$a_{4}=2(2(2(2(2)+2)+2)+2)+2$
$a_{5}=2(2(2(2(2(2)+2)+2)+2)+2)+2$
To simplifiy
$a_{6}=2^{6}+2^{5}...2^{1}$
so my answer is 
$a_{n}=2^{n+1}+2^{n}+...2^{1}$
The correct answer is $2 (-1 + 2^{1 + n})$
How do I make this transition?
 [/INST] If you divide both sides by $2^n$, you will get :
$$\forall k\ge1,\,\frac{a_k}{2^k}-\frac{a_{k-1}}{2^{k-1}}=\frac1{2^{k-1}}$$
Now, cancellation occurs when summing up ($k$ from $1$ to $n$) :
$$\frac{a_n}{2^n}-a_0=\sum_{k=1}^n\frac1{2^{k-1}}=\frac{1-\frac1{2^n}}{1-\frac12}=2-\frac1{2^{n-1}}$$
that is :
$$a_n=2^n\left(4-\frac1{2^{n-1}}\right)=2^{n+2}-2$$
and finally :

$$a_n=2\left(2^{n+1}-1\right)$$

</s>