How to deal with linear recurrence that it's characteristic polynomial has multiple roots? example ,
$$
a_n=6a_{n-1}-9a_{n-2},a_0=0,a_1=1
$$
what is the $a_n$?
In fact, I want to know there are any way to deal with this situation.

A bare-hands method would be as follows:
$$a_n - 3 a_{n-1} = 3 ( a_{n-1} - 3 a_{n-2} )$$
$$a_n - 3 a_{n-1} = 3^{n-1} ( a_1 - 3 a_0 )$$
$$\sum_{k=1}^n 3^{n-k} ( a_k - 3 a_{k-1} ) = \sum_{k=1}^n 3^{n-k} \left( 3^{k-1} ( a_1 - 3 a_0 ) \right)$$
$$\sum_{k=1}^n 3^{n-k} a_k - 3^{n-(k-1)} a_{k-1} = \sum_{k=1}^n 3^{n-1} ( a_1 - 3 a_0 )$$
$$a_n - 3^n a_0 = n 3^{n-1} ( a_1 - 3 a_0 )$$
The constants were obtained from the factorization of the quadratic.
Note that the above method works regardless of whether the roots are repeated, although the last step will differ.
