Here's one way of solving via the generating function method.
![\begin{cases}a_0=3\\a_1=6\\a_2=0\\a_n=2a_{n-1}+a_{n-2}-2a_{n-3}&\text{for }n\ge3\end{cases}](https://tex.z-dn.net/?f=%5Cbegin%7Bcases%7Da_0%3D3%5C%5Ca_1%3D6%5C%5Ca_2%3D0%5C%5Ca_n%3D2a_%7Bn-1%7D%2Ba_%7Bn-2%7D-2a_%7Bn-3%7D%26%5Ctext%7Bfor%20%7Dn%5Cge3%5Cend%7Bcases%7D)
For the sequence
![a_n](https://tex.z-dn.net/?f=a_n)
, denote its generating function by
![G(x)](https://tex.z-dn.net/?f=G%28x%29)
with
![\displaystyle G(x)=\sum_{n\ge0}a_nx^n](https://tex.z-dn.net/?f=%5Cdisplaystyle%20G%28x%29%3D%5Csum_%7Bn%5Cge0%7Da_nx%5En)
In the recurrence relation, multiply all terms by
![x^n](https://tex.z-dn.net/?f=x%5En)
and sum over all non-negative integers larger than 2:
![\displaystyle\sum_{n\ge3}a_nx^n=2\sum_{n\ge3}a_{n-1}x^n+\sum_{n\ge3}a_{n-2}x^n-2\sum_{n\ge3}a_{n-3}x^n](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Csum_%7Bn%5Cge3%7Da_nx%5En%3D2%5Csum_%7Bn%5Cge3%7Da_%7Bn-1%7Dx%5En%2B%5Csum_%7Bn%5Cge3%7Da_%7Bn-2%7Dx%5En-2%5Csum_%7Bn%5Cge3%7Da_%7Bn-3%7Dx%5En)
The goal is to rewrite everything we can in terms of
![G(x)](https://tex.z-dn.net/?f=G%28x%29)
and (possibly) its derivatives. For example, the term on the LHS can be rewritten by adding and subtracting the the first three terms of
![G(x)](https://tex.z-dn.net/?f=G%28x%29)
:
![\displaystyle\sum_{n\ge3}a_nx^n=\sum_{n\ge0}a_nx^n-(a_0+a_1x+a_2x^2)=G(x)-3-6x](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Csum_%7Bn%5Cge3%7Da_nx%5En%3D%5Csum_%7Bn%5Cge0%7Da_nx%5En-%28a_0%2Ba_1x%2Ba_2x%5E2%29%3DG%28x%29-3-6x)
For the other terms on the RHS, you need to do some re-indexing of the sum:
![\displaystyle\sum_{n\ge3}a_{n-1}x^n=\sum_{n\ge2}a_nx^{n+1}=x\sum_{n\ge2}a_nx^n=x\left(\sum_{n\ge0}a_nx^n-(a_0-a_1x)\right)=x\bigg(G(x)-3-6x\bigg)](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Csum_%7Bn%5Cge3%7Da_%7Bn-1%7Dx%5En%3D%5Csum_%7Bn%5Cge2%7Da_nx%5E%7Bn%2B1%7D%3Dx%5Csum_%7Bn%5Cge2%7Da_nx%5En%3Dx%5Cleft%28%5Csum_%7Bn%5Cge0%7Da_nx%5En-%28a_0-a_1x%29%5Cright%29%3Dx%5Cbigg%28G%28x%29-3-6x%5Cbigg%29)
![\displaystyle\sum_{n\ge3}a_{n-2}x^n=\sum_{n\ge1}a_nx^{n+2}=x^2\sum_{n\ge1}a_nx^n=x^2\left(\sum_{n\ge0}a_nx^n-a_0\right)=x^2\bigg(G(x)-3\bigg)](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Csum_%7Bn%5Cge3%7Da_%7Bn-2%7Dx%5En%3D%5Csum_%7Bn%5Cge1%7Da_nx%5E%7Bn%2B2%7D%3Dx%5E2%5Csum_%7Bn%5Cge1%7Da_nx%5En%3Dx%5E2%5Cleft%28%5Csum_%7Bn%5Cge0%7Da_nx%5En-a_0%5Cright%29%3Dx%5E2%5Cbigg%28G%28x%29-3%5Cbigg%29)
![\displaystyle\sum_{n\ge3}a_{n-3}x^n=\sum_{n\ge0}a_nx^{n+3}=x^3\sum_{n\ge0}a_nx^n=x^3G(x)](https://tex.z-dn.net/?f=%5Cdisplaystyle%5Csum_%7Bn%5Cge3%7Da_%7Bn-3%7Dx%5En%3D%5Csum_%7Bn%5Cge0%7Da_nx%5E%7Bn%2B3%7D%3Dx%5E3%5Csum_%7Bn%5Cge0%7Da_nx%5En%3Dx%5E3G%28x%29)
So in terms of the generating function, the recurrence can be expressed as
![G(x)-3-6x=2x\bigg(G(x)-3-6x\bigg)+x^2\bigg(G(x)-3\bigg)-2x^3G(x)](https://tex.z-dn.net/?f=G%28x%29-3-6x%3D2x%5Cbigg%28G%28x%29-3-6x%5Cbigg%29%2Bx%5E2%5Cbigg%28G%28x%29-3%5Cbigg%29-2x%5E3G%28x%29)
![(1-2x-x^2+2x^3)G(x)=3-15x^2](https://tex.z-dn.net/?f=%281-2x-x%5E2%2B2x%5E3%29G%28x%29%3D3-15x%5E2)
![G(x)=\dfrac{3-15x^2}{1-2x-x^2+2x^3}=\dfrac{3-15x^2}{(1-x)(1+x)(1-2x)}](https://tex.z-dn.net/?f=G%28x%29%3D%5Cdfrac%7B3-15x%5E2%7D%7B1-2x-x%5E2%2B2x%5E3%7D%3D%5Cdfrac%7B3-15x%5E2%7D%7B%281-x%29%281%2Bx%29%281-2x%29%7D)
Decomposing into partial fractions, we get
![G(x)=\dfrac6{1-x}-\dfrac2{1+x}-\dfrac1{1-2x}](https://tex.z-dn.net/?f=G%28x%29%3D%5Cdfrac6%7B1-x%7D-%5Cdfrac2%7B1%2Bx%7D-%5Cdfrac1%7B1-2x%7D)
and we recognize that for appropriate values of
![x](https://tex.z-dn.net/?f=x)
, we can write these as geometric power series:
![G(x)=\displaystyle6\sum_{n\ge0}x^n-2\sum_{n\ge0}(-x)^n-\sum_{n\ge0}(2x)^n](https://tex.z-dn.net/?f=G%28x%29%3D%5Cdisplaystyle6%5Csum_%7Bn%5Cge0%7Dx%5En-2%5Csum_%7Bn%5Cge0%7D%28-x%29%5En-%5Csum_%7Bn%5Cge0%7D%282x%29%5En)
Or, more compactly,
![G(x)=\displaystyle\sum_{n\ge0}\bigg(6-2(-1)^n-2^n\bigg)x^n](https://tex.z-dn.net/?f=G%28x%29%3D%5Cdisplaystyle%5Csum_%7Bn%5Cge0%7D%5Cbigg%286-2%28-1%29%5En-2%5En%5Cbigg%29x%5En)
which suggests that the solution to the recurrence is