Geometric series and Fourier transform In my book solution example, I have this signal
discrete square wave
I don't understand how the right hand side is attained from the expression on the left
$$\sum_{m=p-M}^{p-1}e^{-imk\omega_0}=e^{iMk\omega_0}\sum_{m=0}^{M-1}e^{-imk\omega_0}$$
Where the last step is accomplished by changing variables and simplifying using the fact that
$$\omega_0 = \frac{2\pi}{p}$$
Is there some book can I read to understand things like that?
 A: Starting with the last expression
$$e^{iMk\omega_0}\sum_{m=0}^{M-1}e^{-imk\omega_0}$$
$$=\sum_{m=0}^{M-1}e^{iMk\omega_0}e^{-imk\omega_0}$$
$$=\sum_{m=0}^{M-1}e^{-i(m-M)k\omega_0}$$
Here we can shift the index by $p-M$ and now we have
$$\sum_{m=p-M}^{M-1+p-M}e^{-i(m-M-p+M)k\omega_0}$$
$$=\sum_{m=p-M}^{p-1}e^{-i(m-p)k\omega_0}$$
$$=\sum_{m=p-M}^{p-1}e^{-imk\omega_0}e^{ipk\omega_0}$$
Since $\omega_0=\frac{2\pi}{p}$, we have
$$\sum_{m=p-M}^{p-1}e^{-imk\omega_0}e^{2\pi ik}$$
$$=\sum_{m=p-M}^{p-1}e^{-imk\omega_0}$$
Therefore,
$$\sum_{m=p-M}^{p-1}e^{-imk\omega_0}=e^{iMk\omega_0}\sum_{m=0}^{M-1}e^{-imk\omega_0}$$
A: Using index shifting property that states:
$$\sum_{s=p}^{N}f(x)=\sum_{s=p+M}^{N+M}f(x-M)$$
Beginning from the R.H.S and using shift of $(M-p)$:
$$R.H.S=\sum_{m=p-M}^{p-1}e^{-imk\omega_0}=\sum_{m=p-M+\bf{M-p}}^{p-1+\bf{M-p}}e^{-ik\omega_0(m-(\bf{M-p}))}=\sum_{m=0}^{M-1}e^{-imk\omega_0}e^{iMk\omega_0}e^{-impk\omega_0}$$
$\because e^{iMk\omega_0}$ is a constant and $e^{-impk\omega_0}=e^{-i2\pi mk}=1$
$$\therefore L.H.S=\sum_{m=p-M}^{p-1}e^{-imk\omega_0}=e^{iMk\omega_0}\sum_{m=0}^{M-1}e^{-imk\omega_0}=R.H.S $$
