$a_{n} = −a_{n−1} + n − 1,\ and \ a_{0} = 7$ Find a close formula
Would you please give me some hints what is the best way to do this? I wrote out the sequence and it got all messed up as more and more turns are involved.
$a_{n} = −a_{n−1} + n − 1,\ and \ a_{0} = 7$ Find a close formula
Would you please give me some hints what is the best way to do this? I wrote out the sequence and it got all messed up as more and more turns are involved.
I suppose that this is very close to Hagen von Eitzen's answer.
Considering $$a_{n} = −a_{n−1} + n − 1$$ make first $a_n=b_n+\frac n2$. This would give $$b_n+b_{n-1}+\frac 12=0$$ Now, make $b_n=c_n-\frac 14$ which gives $$c_n+c_{n-1}=0\implies c_n=(-1)^nc_0$$
Note that $$ \begin{align}a_{n+1}&=-a_{(n+1)-1}+(n+1)-1\\ &=-a_n+n\\ &=-(-a_{n-1}+n-1)+n\\ &=a_{n-1}+1\end{align}$$
Hint:
$$\begin{align}a_n&=-a_{n-1}+n-1&=-a_{n-1}+n-1\tag{odd}\\&=-(-a_{n-2}+(n-1)-1)+n-1&=a_{n-2}+1\qquad\ \ \ \tag{even}\\&=-a_{n-3}+(n-3)-1+1&=-a_{n-3}+n-3\tag{odd}\\&=-(-a_{n-4}+(n-4)-1)+n-3&=a_{n-4}+2\qquad\ \ \ \tag{even}\\&=\ \vdots&=\ \vdots\qquad\qquad\qquad\end{align}$$
$a_0=7\rightarrow a_1=-7$ and we have
$$\begin{align} a_n & =-a_{n-1}+n-1 \\&=-(-a_{n-2}+n-1-1)+n-1 \\&=a_{n-2}+1\end{align}$$
So, $\displaystyle a_n=a_0+\frac{n}{2}=7+\frac{n}{2}$ for even integer n and $\displaystyle a_n=a_1+\frac{n-1}{2}=-7+\frac{n-1}{2}$ for odd integer n.
There are many sequences that satisfy the relation such that
$$a_n=(-1)^n7+\frac{n}{2}-\frac{1-(-1)^n}{4}$$