Nontrivial characters of $(\Bbb{Z}_m)^{\ast}$ I was reading the book of Marcus on Number field page 196. I could not understang the highlighted equality. It will be helpful if someone gives me a proof. 
Thanks in advance for the computation!
 A: On the l.h.s. in the red box, we have the summation index $n \geq 1$ with the addtional condition $n \equiv a \mod m.$ On the r.h.s in the red box, there is the sum
$$
Q(n) := \frac{1}{m}\sum_{k=0}^{m-1}\omega^{(a-n)k} \quad for \quad n \geq 1.
$$
We are going to show that $(Q(n) = 1$ iff $n \equiv a \mod m)$ and $(Q(n) = 0$ otherwise$).$ This implies that the l.h.s and the r.h.s in the red box are the same.
On to the proof of our claim about $Q(n).$ $\omega$ is a primitive $m$-th root of unity, so $\omega^{(a-n)} = 1$ iff $ n \equiv a \mod m.$ Otherwise we have that $\omega^{(a-n)} \neq 1$ is just some $m$-th root of unity.
Now consider the polynomial
$$
P(X) := \frac{X^m-1}{X-1} = \sum_{k=0}^{m-1}X^k.
$$
The zeroes of $P$ are all the $m$-th roots of unity, except $1.$ So, with the preceding remark about $\omega^{(n-a)},$ we calculate $P(\omega^{(n-a)}) = m$ iff $n\equiv a \mod m,$ and $P(\omega^{(n-a)}) = 0$ otherwise.
Finally, note that $Q(n) = \frac{1}{m}P(\omega^{(n-a)}).$
All this proves our claim about $Q(n).$
The above calculations are "well known", and you should be able to find them in a good book on number theory or field theory, or elsewhere on the Internet, but I don't have a reference handy right now.
