I have a recursive formula $a_n=4-a_{n-1}, a_3=7$ and I had to solve this and check the correction of the answer with induction.
I started solving this and the solved formula is: $a_n=-2((-1)^{n-3}-1)+7(-1)^{n-3}$.
Base case $n=3$ is true
Let's assume this is true for $n=k$
Thus this should be true for $n=k+1$
$a_{n=k+1}=5(-1)^{k-2}+2$.
I don't know how to continue from this place, please someone help me and explain this, thank you.
Note that $-2((-1)^{n-3} - 1) + 7(-1)^{n-3} = 5(-1)^{n-3} + 2$.
Assuming $a_n = 5(-1)^{n-3} + 2$, the recursive formula tells us that
$$a_{n+1} = 4 - a_n = 4 - [5(-1)^{n-3} + 2] = -5(-1)^{n-3} + 2 = 5(-1)^{n-2}+2.$$
This proves the result.