Let's consider sequence following for $n=0...,T$ for which $a_0=a_T=0$. I want to solve equation $$a_n=1+\frac12a_{n+1}+\frac12a_{n-1}$$
My work so far
$$a_1=1+\frac12a_2 \Leftrightarrow a_2=2a_1-2$$ $$a_2=1+\frac12a_3+\frac12a_1 \Leftrightarrow2a_1-2=1+\frac12a_3 \Leftrightarrow a_3=3a_1-6$$ Also I calculated $a_4$ to get $a_4=4a_1-12$. So my observation is that for any $n \in \{1,...,T-1\}$ we have $$a_n=na_1+n(n-1)$$
And here I stacked, I'm not sure what to do next. Could you please give me a hand solving this equation ?
$$a_{n+1} - a_n -(a_n-a_{n-1}) = -2 \implies a_n - a_{n-1} = (a_1-a_0) - 2(n-1).$$
Can you take it from here?
Lastly, plug in $n=T$ and solve for $a_1$.