<s>[INST] Given functions $f,g$ find the direct form for $f(x)=g(x)+f(x-1)$ Let $g(x)=1+x+\frac{x(x+1)}{2}$ and let $f(x)=g(x)+f(x-1)$. Find the closed form for $f(x)$ and $x\geq0$ given that $f(0)=0$.
So what we are asked are is a direct form for $$\sum_{n=1}^{k}g(n)$$
I want to show that $$\sum_{n=0}^{k}g(n)=\frac{1}{2}(\sum_{n=0}^{k+1}n+\sum_{n=0}^{k+1}{n^2})=\dfrac{(k+1)(k+2)(k+3)}{6}$$
edit 1: $f,g$ are defined on the integers.
 [/INST] Hint: $\;g(k)=1 + \frac{3}{2} k + \frac{1}{2} k^2\,$, then by direct calculation:
$$
f(n) = \sum_{k=1}^{n}g(k) = \sum_{k=1}^{n} 1 + \frac{3}{2} \sum_{k=1}^{n} k + \frac{1}{2} \sum_{k=1}^{n} k^2 = n + \frac{3}{2} \frac{n(n+1)}{2} + \frac{1}{2}\frac{n(n+1)(2n+1)}{6} = \cdots
$$
</s>