If $z^{23}=1$ then evaluate $\sum^{22}_{z=0}\frac{1}{1+z^r+z^{2r}}$ 
If $z$ is any complex number and $z^{23}=1$ then evaluate $\displaystyle \sum^{22}_{r=0}\frac{1}{1+z^r+z^{2r}}$

Try: From $$z^{23}-1=(z-1)(1+z+z^2+\cdots  +z^{22})$$
And our sum $$\sum^{22}_{r=0}\frac{1}{1+z^r+z^{2r}}=\frac{1}{3}+\frac{1}{1+z+z^2}+\frac{1}{1+z^2+z^4}+\cdots  +\frac{1}{1+z^{22}+z^{44}}$$
Now i did not understand how can i simplify it.
Could some help me. Thanks. 

If $z^{23}=1$ and $z\not=1$ (otherwise the sum is trivially equal to $23/3$) then $z^k$ is a primitive $23$-th root of unity for any $k=1,2\dots,22$  (note that $23$ is a prime number). Hence
$$\begin{align}
\sum^{22}_{r=0}\frac{1}{1+z^r+z^{2r}}&=\frac{1}{3}+\sum_{r=1}^{22}\frac{1}{1+z^r+z^{2r}}\\
&=\frac{1}{3}+\sum_{r=1}^{22}\frac{1}{1+z^{8r}+z^{16r}}\\
&=\frac{1}{3}+\sum_{r=1}^{22}\frac{z^{8r}-1}{(1+z^{8r}+z^{16r})(z^{8r}-1)}\\
&=\frac{1}{3}+\sum_{r=1}^{22}\frac{z^{8r}-1}{z^{24r}-1}
=\frac{1}{3}+\sum_{r=1}^{22}\frac{z^{8r}-1}{z^{r}-1}\\
&=\frac{1}{3}+\sum_{r=1}^{22}(1+z^r+z^{2r}+z^{3r}+z^{4r}+z^{5r}+z^{6r}+z^{7r})\\
&=\frac{1}{3}+22+7\sum_{r=1}^{22}z^r.
\end{align}$$
Can you take it from here?
