I am trying to solve the following recurrence but I am not sure which method is best for solving the following :
$$a_{n+1}-2a_n=2^n; a_0 = 1$$
My problem is that I know that this is not a linear equation and $2^n$ is not a polynomial equation so I'm not sure where to begin.
Any suggestions?
$$a_{n+1}-2a_n = 2(a_n-2a_{n-1})\Longrightarrow a_{n+1}-4a_n +4a_{n-1}=0$$
so the characteristic equation is $x^2-4x+4=0$ so $x_1=x_2=2$ so the general solution is $$a_n = (a\cdot n+b)\cdot 2^n$$ for some $a$ and $b$. Since $a_0=1$ we get $ b=1$ and since $a_1= 3 = 2(a+b)$ we get $a= 1/2$, so $$a_n = (n+2)\cdot 2^{n-1}$$