Given a summation series, is there any way to generate a function to find the value of the sum of first n terms?
For example, we have, $\sum f(n) = f(0) + f(1) + ... + f(n)$ . Now, I want to know if there is any $g(n) = \sum f(n)$
Any help would be highly appreciated. Thank you.
Edit: let me be specific. Just like we have $\sum_{k=1}^\mathbb{n} k$ = $n(n+1)/2$, Can we not have something for $\sum_{k=2}^\mathbb{n} 1/(k^2-1) $ ? If we can have, how to find that function?
Let $F(X)$ be the generating function of the sequence $(f(n))$ that is :
$$F(X)=\sum_{n=0}^{\infty}f(n)X^n $$
Then if $G(X)$ is the generating function of the sequence $(g(n))$ where :
$$g(n)=\sum_{k=0}^nf(k) $$
Using the Cauchy product for generating function you can show that :
$$G(X)=\frac{1}{1-X}F(X) $$
Hint : show and use the fact that :
$$\frac{1}{1-X}=\sum_{n=0}^{\infty}X^n $$
Let us look at your example. Assume we don't know that :
$$\sum_{k=0}^nk=\frac{n(n+1)}{2} $$
Now we set $f(n):=n$ and then $g(n)$ is the number we are looking for. Now :
$$F(X)=\sum_{n=0}^{\infty}nX^n $$
And we easily see that :
$$X\times \frac{d}{dX}\sum_{n=0}^{\infty} X^n=F(X) $$
So :
$$F(X)=X\times \frac{d}{dX}\frac{1}{1-X}=\frac{X}{(1-X)^2} $$
Hence :
$$G(X)=\frac{X}{(1-X)^3} $$
Now since the sequence of coefficients of $\frac{1}{(1-X)^k}$ is known to be $\begin{pmatrix}n+k-1\\n\end{pmatrix}$ we see that :
$$\frac{1}{(1-X)^3}=\sum_{n=0}^{\infty}\begin{pmatrix}n+2\\n\end{pmatrix}X^n$$
$$G(X)=\frac{X}{(1-X)^3}=\sum_{n=0}^{\infty}\begin{pmatrix}n+2\\n\end{pmatrix}X^{n+1}=\sum_{n=1}^{\infty}\begin{pmatrix}n+1\\n-1\end{pmatrix}X^{n}$$
Using then the convention that $\begin{pmatrix}n+1\\n-1\end{pmatrix}=0$ when $n=0$ then we have :
$$G(X)=\sum_{n=0}^{\infty}\begin{pmatrix}n+1\\n-1\end{pmatrix}X^n $$
whence $g(n)=\begin{pmatrix}n+1\\n-1\end{pmatrix}=\frac{n(n+1)}{2}$. Now the same method allows you to compute a closed formula of :
$$\sum_{k=0}^nk^p $$
For any $p$. To apply this to your new example you "just" have to compute the generating function of the sequence $(\frac{1}{n^2-1})_{n\geq 2}$.