$a_{n+2}+3 a_{n+1}+2 a_n=5 n+3$, where $a_0=1, a_1=4$.
I am trying to solve the homogeneous part first, I have the roots as r = -1 and r = -2, by factorising the characteristic equation which I have as $r^2 + 3r + 2 = 0$.
So I have the homogenous solution as $A(-1)^n + B(-2)^n$
I plug in $a_0 = 1$ into the solution to get $A + B = 1$ hence $A = 1 - B$ then I do the same with $a_1 = 4$ then solve the simultaneous equation to get $B = -5$
However it seems this is wrong upon checking the answer, I'm not sure where I'm going wrong, although I'm not sure what to do with the $5n$ or the $3$ in this part so that might be the reason, haven't really found a helpful source for this type of recurrence relation, any help is appreciated.