How to solve this recurrence relation? $f_n = 3f_{n-1} + 12(-1)^n$ How to solve this particular recurrence relation  ?
$$f_n = 3f_{n-1} + 12(-1)^n,\quad f_1 = 0$$
such that $f_2 = 12, f_3 = 24$ and so on.
I tried out a lot but due to $(-1)^n$ I am not able to solve this recurrence?
Any help will be highly appreciated.
Please this is no homework. I came across this while solving a problem on SPOJ

Let's write up a few more terms of the sequence to maybe guess a pattern. It goes $$0, 12, 24,  84, 240, 732 \cdots $$
Also keep in mind we expect these numbers to look something like powers of 3, because that's what the solution would be if we didn't have that $12(-1)^n$ term in the recurrence. So then with this hint we can see the terms are $$ 3^1-3, 3^2+3, 3^3-3, 3^4+3, 3^5-3, 3^6+3 \cdots $$
so we can guess the solution is $f_n = 3^n + 3(-1)^n .$  Now let us prove out suspicions with mathematical induction. The base case $n=1$ is true. Assume $f_n = 3^n + 3(-1)^n$ is true for some $n.$ Then $f_{n+1} = 3f_n - 12(-1)^n = 3( 3^n + 3(-1)^n ) - 12(-1)^n = 3^{n+1} -3(-1)^n = 3^{n+1} + 3(-1)^{n+1}$ so our formula is true for $n+1$ as well, completing the induction step.
