To calculate a(n) has been difficult. So far a brute force (by hand!) approach has been the only fruitful method. That is, writing the equation of consideration in index notation, taking a Fourier transform and solving a rather large system of linear equations in 3^n unknowns.
Based on observation, it is suspected that the sequence takes the form [0, n=2, 3^n  q(n), n>2], where q(n) is quadratic in n. The quadratic in question is hypothesized to be q(n)=(1/2)*(7*n^217*n+30).
Writing a computer program to find further terms is desirable but beyond my expertise.
