# Why is this function equal to zero?

Say that I have a primitive root of unity $$\omega$$. Given $$p \neq 0$$, and $$1-\omega^p \neq 0$$, the following function is supposed to equate to zero, but I could not understand it. $$$$\sum_{k=0}^{N}\omega^{pk} \times \frac{1-\omega^p}{1-\omega^p}=\frac{1-\omega^{pN}}{1-\omega^p}=0$$$$ How does the numerator of the middle term become such?

• The "$\dfrac{1-\omega^p}{1-\omega^p}$" factor is unnecessary. – Blue Sep 25 '18 at 9:08

The numerator is the sum:

$$\omega^{0}(1-\omega^p) + \omega^p(1-\omega^p) + \cdots + \omega^{Np}(1-\omega^p)$$

which you can rewrite as $$1-\omega^p + \omega^p - \omega^{2p} + \omega^{2p}-\omega^{3p} + \cdots + \omega^{Np} - \omega^{(N+1)p}$$

as you can see, the middle factors all cancel out (second and third, fourth and fifth, ...), leaving $$1-\omega^{p(N+1)}$$ (not, as it's written, $$\omega^{Np}$$)

Alternatively, you can use the well known result for sums of geometric progressions:

$$\sum_{k=0}^N a^k = \frac{1-a^{N+1}}{1-a}$$ where $$a=\omega^p$$ to get the result instantly.

First apply the formula for a geometric series. Then note that a primitive root to the power of $N$ equals $1$.

That gives the result.