I am having some trouble with solving a recurrence relation with repeated substitutions.
$$a_n = 3\cdot2^{n-1}-a_{n-1}$$
I show some work:
$$a_n = 3\cdot2^{n-1} -(3\cdot2^{n-2}-a_{n-2})=3\cdot2^{n-1}-3\cdot2^{n-2}+a_{n-2}$$
Then I guess the pattern looks like this:
$$a_n = 3\cdot\sum_{i=1}^{n}(-1)^{i}\cdot2^{n-i}$$.
But here I am stuck. How can I deal with the summation (given that I am correct so far)?
[Another way to solve it is to manipulate it into $a_n=a_{n-1}+2_{n-2}$ and then solve it with the auxiliary equation method to get $a_n=2(-1)^n+2^n$.]
$$a_1 = 0$$ $$a_2 = 3\cdot2^1-a_1 = 6$$ Since it seems you don't have problem guessing the pattern, then I will jump there. Hypothesis: $$a_n=3\sum_{i=1}^{n-1}(-1)^{n-i-1}2^i$$ Proof: we can tell by inspection that it works for $n=1$. Let's assume it works for $n=k$. For $n=k+1$: $$a_{k+1}=3\cdot2^k-a_k=3\cdot2^k-\left(3\sum_{i=1}^{k-1}(-1)^{k-i-1}2^i\right)$$ $$=3\cdot2^k-3\sum_{i=1}^{k-1}(-1)^{k-i-1}2^i$$ $$=3\cdot(-1)^{(k+1)-k-1}2^k+3\sum_{i=1}^{k-1}(-1)^{(k+1)-i-1}2^i$$ $$=3\sum_{i=1}^{k}(-1)^{(k+1)-i-1}2^i=3\sum_{i=1}^{n-1}(-1)^{n-i-1}2^i$$ Which completes the proof. Next, comes the simplification: $$a_n=3\sum_{i=1}^{n-1}(-1)^{n-i-1}2^i=3\sum_{i=1}^{n-1}(-1)^{n-i-1}(-1)^{2i}2^i=3(-1)^{n-1}\sum_{i=1}^{n-1}(-1)^{i}2^i=3(-1)^{n-1}\sum_{i=1}^{n-1}(-2)^i=6(-1)^{n}\sum_{i=1}^{n-1}(-2)^{i-1}=6(-1)^{n}\sum_{i=0}^{n-2}(-2)^i=6(-1)^{n}\frac{(-2)^{n-1}-1}{(-2)-1}=2(-1)^{n-1}((-2)^{n-1}-1)=2^n+2(-1)^{n}$$