10,11 Let $z=e^{2 \pi i / n}=\cos 2 \pi / n+i \sin 2 \pi / n$. For any integer $a$ compute the sums

a) $1+z^{a}+z^{2 a}+\ldots+z^{(n-1) a}$

b) $1+2 z^{a}+3 z^{2 a}+\ldots+n z^{(n-1) a}$.
б) $1+2 t+3 t^{2}+\ldots+n t^{(n-1)}=\left(1+t+t^{2}+\ldots+t^{n}\right)^{\prime}$.

## Answer

a) $n$, if $a$ is a multiple of $n$; $0$ otherwise.

b) $\frac{1}{2} n(n-1)$, if $a$ is a multiple of $n$; $\frac{n}{2 \sin \frac{a \pi}{n}}\left(\sin \frac{a \pi}{n}-i \cos \frac{a \pi}{n}\right)$ otherwise.