I'm asked to find a closed formula for
$f(n)=6f(n-1)-9f(n-2)$ for $n>1$ with $f(0)=-1. f(1)=0$,
using the ordinary generating function $F(X)$.
I found $F(X)=-1/(1-3x)^2$ but from there I don't manage to get a satisfactory formula for $f(n)$. Can anyone give me a hint ?
Thanks
Hint: $$\frac 1{1-x} = \sum x^n\\ \frac 1{(1-x)^2} = \frac d{dx} \frac 1{1-x}.$$
details:
then taking the term by term derivative: $$ \frac 1{(1-x)^2} = \sum (n+1)x^n;\\ -\frac 1{(1-3x)^2} = -\sum (n+1)3^n x^n. $$
However, this method does not work here.
Let us try hte straightforward method instead: the caracteristic equation is $$ r^2 = 6r - 9\iff r=3. $$ Hence, the general solution has the expression $$ f(n) = (A + Bn)3^n $$ and, plugging the initial conditions we get $$ -1 = A;\\ 0 = (A+B)\times 3;\\ f(n) = (n-1)3^n. $$