Is the solution to this recurrence correct?

61 Views Asked by At

I'm working on a problem that resulted in the following recurrence (which I think is wrong, but that's not the question here):

$$ (n-i)*2i*Z_i = n(n-1) + (n-i)(i+1)Z_{i+1} + (n-i)(i-1)Z_{i-1} $$ Subject to $Z_n = 0$.

The solution for $i=1$ to the above recurrence is said to be $$ Z_1=(n-1)^2 $$ Is there a quick way I can find if this solution is indeed correct?

1

There are 1 best solutions below

0
On

This is a second order recurrence. With a single final condition, the solution is indeterminate.


Assuming you fix this, a possible check is to solve the recurrence explicitly with small $n$, say $3,4,5$, and check if the solutions match $(n-1)^2$.