A sequence \(u_n\), where \(n = 1, 2, \ldots\), is said to have \emph{degree} \(d\) if \(u_n\), as a function of \(n\), is a polynomial of degree \(d\).
Show that, in any sequence \(u_n\) \((n = 1, 2, \ldots)\) that satisfies \(u_{n+1} = \frac{1}{2}(u_{n+2} + u_n)\) for all \(n \geqslant 1\), there is a constant difference between successive terms.
Deduce that any sequence \(u_n\) for which \(u_{n+1} = \frac{1}{2}(u_{n+2} + u_n)\), for all \(n \geqslant 1\), has degree at most 1.
The sequence \(v_n\) \((n = 1, 2, \ldots)\) satisfies \(v_{n+1} = \frac{1}{2}(v_{n+2} + v_n) - p\) for all \(n \geqslant 1\), where \(p\) is a non-zero constant. By writing \(v_n = t_n + pn^2\), show that the sequence \(v_n\) has degree 2.
Given that \(v_1 = v_2 = 0\), find \(v_n\) in terms of \(n\) and \(p\).
The sequence \(w_n\) \((n = 1, 2, \ldots)\) satisfies \(w_{n+1} = \frac{1}{2}(w_{n+2} + w_n) - an - b\) for all \(n \geqslant 1\), where \(a\) and \(b\) are constants with \(a \neq 0\). Show that the sequence \(w_n\) has degree 3.
Given that \(w_1 = w_2 = 0\), find \(w_n\) in terms of \(n\), \(a\) and \(b\).