Hi I found that the generating function of a series $a_n$ is:
$$\frac{(1-x)(1+2x)}{(1+3x)(1-3x)}$$
I need to find a formula for $a_n$.
I tried some things and found that the generating function is equal to:
$$\frac{1}{3}\cdot (1+2x)\cdot( \frac{2}{1+3x} + \frac{1}{1-3x})$$
but I cant get any further than that.
Hint: use partial fractions to rewrite as $$\frac{2}{9}+\frac{2/9}{1-(-3x)}+\frac{5/9}{1-3x}.$$