Let $d$ be a nonzero integer and $u$ be an integer. Show that the sum $$\sum_{k\in\mathbb{Z}/d\mathbb{Z}} e^{\frac{2i\pi}{d}ku}$$ equals $d$ if $u\equiv 0\bmod d$ and $0$ otherwise.
Let $d$ be a nonzero integer and $u$ be an integer. Show that the sum
$$\sum_{k\in\mathbb{Z}/d\mathbb{Z}} e^{\frac{2i\pi}{d}ku}$$
equals $d$ if $u\equiv 0\bmod d$ and $0$ otherwise.