I am taking a graph theory class this quarter, and while this specific question below is not a homework question, proving it is required for a homework question that I am working on. I assume it may be a commonly asked question, if so apologies for the repeat:
Show that the system of equations for $0 < k < n:$
$$f_k = \frac{1}{2} (1 + f_{k-1}) + \frac{1}{2} (1 + f_{k+1})$$
together with the boundary conditions $f_0 = f_n = 0$ has a unique solution $f_k = k(n − k).$
I've written the equation out for $f_1, f_2, f_3$, for $f_1$ plugging in $f_0 = 0$ and solving in terms of $f_2$, repeating etc., and although I see some sort of pattern, I am having trouble connecting it to the solution $k(n-k)$. Any thoughts on how I can connect the dots, as well as a better approach than simply extending the problem out one calculation at a time.
Thanks!