Is there a solution to this recurrence relation

64 Views Asked by At

Let $a(n+2) = -a(n+1) - a(n) - 1$ for all $n\geq 1$. In this case, is there a solution for a(n) and if so, what is it and how do you find it?

2

There are 2 best solutions below

0
On

It depends of course on $a(0),a(1)$. Suppose $a(0)=a$ and $a(1)=b$ then

$a(2) = -a-b-1$

$a(3) = -(-a-b-1)-b-1 = a+b+1-b-1 = a$

$a(4) = -a-(-a-b-1)-1 = b$

and then the sequence repeats $a(5)$ is again $-a-b-1$.

So we have

$$a(n) = \begin{cases} \displaystyle a & n\text{ mod } 3 = 0\\ b & n\text{ mod } 3 =1\\ -a-b-1 & n\text{ mod } 3 =2\\ \end{cases}$$

A formal proof is by induction on $n$.

Note that this solution makes sense because you can rewrite the equation as $a(n+2)+a(n+1)+a(n)=-1$

2
On

Hint: It is $$a_n=c_1 \left(-\frac{1}{2}-\frac{i \sqrt{3}}{2}\right)^n+c_2 \left(-\frac{1}{2}+\frac{i \sqrt{3}}{2}\right)^n-\frac{1}{3}$$