Solving a recurrence relation ${}$

128 Views Asked by At

I feel I'm wasting my time trying to solve this

$a_0$ is given

$\displaystyle a_{n+1}=\frac{n-1}{n+2}(a_n-n-2)$

Mathematica found a closed form but there's a problem when evaluating for $n=0$

$\displaystyle-\frac{30 C-n^5+5 n^3-4 n}{5 n-5 n^3}$

Context: https://puzzling.stackexchange.com/questions/1820/paying-the-unfair-troll-toll

1

There are 1 best solutions below

0
On BEST ANSWER

As correctly stated in the comments, we can start from the fact that, by definition, for $n=0$ the answer is $a_0$.

The recurrence relation can be rewritten to express $a_n$ as a function of $a_{n-1}$. Substituting $n$ with $n-1$ we get$$\displaystyle a_{n}=\frac{n-2}{n+1}(a_{n-1}-n-1)$$ For $n=1$, the formula gives $a_1=-\frac{1}{2}(a_0-1-1)=1-a_0/2$, whereas for $n=2$ the formula gives $a_2=\frac{0}{3}[(1-a_0/2)-2-1]=0$. This means that, for the successive terms where $n\geq3$, the term $a_0$ is canceled out and will not longer appear in the results.

Now let us study the results of the recurrence formula for $n\geq3$. In doing this, for each $n$, we can write the result separately writing the fraction and the quantity in brackets. Also, we can express the quantity in brackets as fractions with equal denominator.

For $n=3$, the formula gives $a_3=\frac{1}{4}(-3-1)=\frac{1}{4}(-4)=\frac{1}{4}(-20/5)$. The result is $-1$.

For $n=4$, the formula gives $a_4=\frac{2}{5}(-1-4-1)=\frac{2}{5}(-6)=\frac{2}{5}(-30/5)$. The result is $-12/5$.

For $n=5$, the formula gives $a_5=\frac{3}{6}(-12/5-5-1)=\frac{3}{6}(-42/5)$. The result is $-21/5$.

For $n=6$, the formula gives $a_6=\frac{4}{7}(-21/5-6-1)=\frac{4}{7}(-56/5)$. The result is $-32/5$.

Continuing in this way, it is not difficult to show that the numerators of the quantities in brackets ($20, 30, 42, 56...$) represent the progression given by $(n+1)(n+2)$. Hence, the general formula can be rewritten as$$\displaystyle a_{n}=-\frac{1}{5}\frac{(n-2)}{(n+1)}(n+1)(n+2)=-\frac{1}{5}(n-2)(n+2)=-\frac{1}{5}(n^2-4)$$

which gives a closed formula for the calculation of $a_n$. As a counterproof:

$a_3=-\frac{1}{5}(3^2-4)=-1$

$a_4=-\frac{1}{5}(4^2-4)=-12/5$

$a_5=-\frac{1}{5}(5^2-4)=-21/5$

$a_6=-\frac{1}{5}(6^2-4)=-32/5$

and so on.

Lastly, note that the formula given by Mathemathica and reported in the question may be correct if we neglect the term $30C$. In fact: $$\displaystyle-\frac{-n^5+5 n^3-4 n}{5 n-5 n^3}=-\frac{-n^4+5 n^2-4}{5-5 n^2}=-\frac{1}{5}\frac{n^4-5 n^2+4}{n^2-1}=-\frac{1}{5}\frac{(n^2-4)(n^2-1)}{n^2-1}=-\frac{1}{5}(n^2-4)$$