I would like to find the closed form of the sequence given by $$ a_{n+2} = 2a_{n+1}-a_n+2^n+2,~~~~n > 0~~~~and~~~a_1 = 1, ~~~~a_2 = 4$$
This task is in the topic of differential and difference equation. I don't know how to start solving this problem and what are we looking for? ($a_n, a_{n+2}$)
I do know how to solve the following form $$ a_{n+2} = 2a_{n+1}-a_n $$ using linear algebra as well. The actual problem I encountered the obstructionist term $\color{red}{2^n+2}$.
Are there some kind of variational constant method for recursive linear sequences,?
I only now this method for linear ODE with constant coefficient.
But I believe that such method could be doable here as well. Can any one provide me with a helpful hint or answer?.
solve a non-homogeneous recurrence relation
. If you type this in the MSE search box you will get 65 hits. – David Feb 02 '18 at 00:12