# How to find unique solutions to recurrence relation $a_n =10a_{n-1}-32a_{n-2}+32a_{n-3}$ with $a_0=5$, $a_1=18$, $a_2=76$

How to find the unique solutions to the recurrence relation given initial conditions and using the characteristic root technique?

$$a_n =10a_{n-1}-32a_{n-2}+32a_{n-3}$$ with $$a_0=5$$, $$a_1=18$$, $$a_2=76$$

Using the characteristic root technique, I create the characteristic root equation $$x^3 -10x^2+32x-32=0$$, which reduces to $$(x-4)^2(x-2)=0$$, so the characteristic roots are x=4 and x=2

I am confused here about how to set up my system of equations because for differing roots we use $$a_n=ar_1^n + br_2^n$$ where $$r$$ are the roots. While for repeated roots we use $$a_n=ar^n + bnr^n$$. How do I set up the system of equations to solve when an equation has repeated and differing roots?

if a root $$r$$ was repeated of order, say $$k$$ , then the corresponding terms in the general recurrence will become$$t_n=P_k(n)\cdot r^n$$where $$P_k(n)$$ is a polynomial of degree $$k-1$$.
In our case, it will be:$$a_n=(a+bn)\cdot 4^n+c\cdot 2^n$$