Say you have $a_{n+1}=4-a_n$ and $a_1=1$
In general, how do you find the formula for $a_n$?
Say you have $a_{n+1}=4-a_n$ and $a_1=1$
In general, how do you find the formula for $a_n$?
This is typically done by writing out the first couple of steps and finding the pattern.
$a_1 = 1$
$a_2 = 4-1 = 3$
$a_3 = 4-3 = 1$
So we see then $a_n = 1$ if $n$ is odd and $3$ if $n$ is even.
$$a_{n+2}=4-a_{n+1}=4-(4-a_{n})=a_{n}$$
Hence $a_{n}$ has period $2$.
For even $n$:
$$a_n=a_2=3$$
For odd $n$
$$a_n=a_1=1$$
First, $$a_{n+1} = 4-a_n$$
$$\Leftrightarrow a_{n+1}+a_n = 4$$ The characteristic polynomial of the homogeneous part is $$ c(\lambda) = \lambda+1$$ which has its root at $\lambda^* = -1$.
Consequently the homogeneous solution is $$a_n = c\cdot(-1)^n$$ Since $a_1 = 1$, we can conclude that $a_1 = (-1)^1 + 2$ with $c = 0$.
Thus,
$$a_n = (-1)^n +2$$