# Telescoping a series

Telescoping is a method for finding the sum of certain series.

If we have a sequence $a_0$, $a_1$, $a_2$, …, and we can find a function $f(n)$ such that $a_n=f(n+1)-f(n)$ for every $n$, then $\sum_{i=0}^n a_i = \sum_{i=0}^n f(i+1)-f(i) = f(n+1)-f(0)$ (because all the other terms cancel).

But finding such a function explicitly may be difficult.

As an example, for the sequence $a_n=n$, we note that $(n+1)^2-n^2=2n+1$, and $(n+1)-n=1$, so if we take $f(n)=\frac{1}{2}(n^2-n)$, we will have \begin{align*} f(n+1)-f(n) &=\tfrac{1}{2}\bigl((n+1)^2-(n+1)\bigr) - \tfrac{1}{2}(n^2-n)\\ &=\tfrac{1}{2}(n^2+n) - \tfrac{1}{2}(n^2-n)\\ &=n\\ &=a_n \end{align*} so that \begin{align*} \sum_{i=0}^n i&=f(n+1)-f(0)\\ &=\tfrac{1}{2}\bigl((n+1)^2-(n+1)\bigr)-\tfrac{1}{2}(0^2-0)\\ &=\tfrac{1}{2}n(n+1). \end{align*}