If $h(n)$ is a function over $\mathbf{Z}$ and $h(n)$ is periodic with period of $N$, that is, $h(n+N)=h(n)$ for all $n$. Show that:
\begin{eqnarray*} \sum_{n=m}^{m+N-1} h(n)=\sum_{n=0}^{N-1} h(n) \end{eqnarray*} for all m in $\mathbf{Z}$.
For this, I rewrite the sum: \begin{eqnarray*} \sum_{n=m}^{m+N-1} h(n-m)=\sum_{n=0}^{N-1} h(n) \end{eqnarray*} And I think that I have to used that $h$ is periodic but I can't. Can you help me with some hint? Thanks.
For any given $n,m$ we have no idea how the function behaves is in won't do any good to consider $h(n-m)$. But we do know $h(n-kN) = h(n)$ so we can match up the values $n: 0 \le n \le N-1$ with the values $n': m\le n' \le m + N-1$ so they are apart by a multiple of $N$ we are good.
Now $0$ and $m$, $1$ and $m+1$ etc. aren't a multiple of $N$ apart but is the any other $n': m \le n' \le m + (N-1)$ then are a multiple of $N$ apart from $0$? what about from $1$, $2$ etc?
Now $m,m+1, ....., m+(N-1)$ must have one of each possible residue classes and $0, ...., N-1$ does too. so that should be it. If $i \equiv i' \pmod N$ then $f(i) = f(i')$ and as all the $i\in \{0,.....,N-1\}$ are each equiv to a distinct $i'\in \{m,.....,m+(N-1)\}$ so the sum should be the same.
so the number theory heavy proof:
If $k \equiv k'\pmod N$ then $f(k) = f(k')$.
$\sum_{n=0}^{N-1} f(n) = \sum_{n \in \{0,1,2,....,N-1\}} f(n)=$
$\sum_{k \in B} f(n)$ where $B$ is a set with $N$ elements and each distinct element of $B$ is congruent to a distinct element of $\{0,1,2,....,N-1\}$.
And $\{m,m+1,....., m+(N-1)\}$ is precisely such a set.
End of proof.
A less number theory heavy and more mechanical proof:
By division thereom there is a distinct $k\in \mathbb Z$ and $r\in \mathbb Z; 0 \le r \le N-1$ so that $m = kN + r$.
$\sum_{n=m}^{m+(N-1)} f(n) =$
$\sum_{n= kN +r}^{kN+r +(N-1)=(k+1)N + (r-1)} f(n)=$
$\sum_{n=kN +r}^{(k+1)N-1} f(n) + \sum_{n=(k+1)N}^{(k+1)N+(r-1)}f(n) =$
$\sum_{n=kN +r}^{(k+1)N -1}f(n-kN) + \sum_{n=(k+1)N}^{(k+1)N+(r-1)}f(n-(k+1)N)=$
$\sum_{n'=r}^{N-1}f(n') + \sum_{n'=0}^{r-1} f(n')= \sum_{n'=0}^{N-1} f(n')$.
(If $r=0$ note that $\sum_{n=0}^{-1} a_n = \sum_{0\le n\le -1} a_n = \sum_{n\in \emptyset}a_n = 0$.)
For example: if $N = 5$ and $m = 23$ then $\sum_{n=23}^{23+4=27} f(n) = f(23)+f(24)+f(25)+f(26)+f(27)$
$= \underbrace{f(3) + f(4)} +\underbrace{f(0) + f(1) + f(2)}=$
$ \underbrace{f(0) + f(1) + f(2)}+\underbrace{f(3) + f(4)}=$
$\sum_{n=0}^{4} f(n)$.