The function $f(n) = 3f(n-2) - 2f(n-1)$, where $f(2) = 3$ and $f(1) = -1$. What is the value of $f(5)$?
If f(n) = 3f(n-2) - 2f(n-1) and
f(1) = -1
f(2) = 3
We can simply continue:
f(3) = 3f(3-2) - 2f(3-1) = 3*(-1) - 2*3 = -9
f(4) = 3f(4-2) - 2f(4-1) = 3*3 - 2*(-9) = 27
f(5) = 3f(5-2) - 2f(5-1) = 3*(-9) - 2*27 = -81
More generally:
f(n) = (-1)n*3(n-1)