Non-homogeneous linear recurrence relation where the non-homogeneous part is piecewise-defined

32 Views Asked by At

How can we solve the non-homogeneous recurrence relation $$a_n = 3a_{n-2}+2a_{n-3}+f(n),$$ where $$f(n) = \begin{cases} -2^{k+1}\binom{2k+2}{k} & n=3k, \\ 2^{k+1} \binom{2k+2}{k+1} & n=3k+1, \\ 2^{k+1}\binom{2k+3}{k+1} & n=3k+2, \\ \end{cases}$$ and $a_1=10$, $a_2=10$, and $a_3=14$?

I can solve the associated homogeneous recurrence $a_n=3a_{n-2}+2a_{n-3}$, but I don't know how to find a particular solution.