# Transforming a sum of sequences

Let $f(i),i\in \mathbb N\,$ be a sequence of real or complex numbers then for natural numbers $m,n$ and $r$ holds sum transformation

$$\sum_{i=0}^{mn+r}f(i)=\sum_{i=0}^{r}f(mn+i)+\sum_{i=0}^{m-1}\sum_{j=0}^{n-1}f(mj+i).$$

This identity can be proved by induction by $r$. I am looking for an alternative proof.

-

You need to check that the set

$$\{0,1,\dots,mn+r\}$$

is identical to the set

$$\{mn+i : 0\leq i\leq r\} \cup \{mj+i : 0\leq i < m, 0\leq j < n\}$$

This is not too hard: the second set in the union counts all of the numbers from $0$ to $mn-1$, and the first set counts all of the numbers from $mn$ to $mn+r$.

-
The result is evident using $$\sum\limits_{i = 0}^{m - 1} {\sum\limits_{j = 0}^{n - 1} {f(mj + i)} } = \sum\limits_{j = 0}^{n - 1} {\sum\limits_{i = 0}^{m - 1} {f(mj + i)} }.$$