<s>[INST] Finding sequence that's defined by a recurrence relation This is the problem that I ran into when doing practice in my textbook.
How do I find the sequence (call it $a_n$) that's defined by recurrence relation whose generating function is $\frac 4 {-x^2-2x+3}$?
Help appreciated!
 [/INST] We use partial fractions. So we want to find integers $A$ and $B$ such that 
$$\frac{4}{-x^2 -2x+3}=\frac{A}{3+x}+\frac{B}{1-x}.$$
There are general procedures, but we can see that $A=1$, $B=1$ work.
Now 
$$\frac{1}{1-x}=1+x+x^2+x^3+\cdots=\sum_0^\infty x^n.$$  
Expanding $\frac{1}{3-x}$ takes more work. Rewrite as 
$$\frac{1}{3}\frac{1}{1-\left(-\frac{x}{3}\right)}.$$ 
When we expand we get 
$$\frac{1}{3}\sum_0^\infty (-1)^n\frac{1}{3^n}x^n.$$
Put the pieces together to get the coefficient of $x^n$.
</s>