I am a first year Mathematics and Physics student and am learning about complex numbers. We were given the question: if $z=e^{\frac{2\pi i}{5}}$ what do you think is the sum $1+z+z^2+z^3+z^4$. In the answers they explained that we know that $z^5-1=(z-1)(1+z+z^2+z^3+z^4)$. We also know that $z^5=e^{2\pi i}=0$. However, $z-1\neq0$ so $1+z+z^2+z^3+z^4=0$. I understand this reasoning.
I came up with a different approach which gave me an answer of 5. I split the $\frac{1}{5}$ from the exponential to get $z=(e^{2\pi i})^\frac{1}{5}$. This means that $$z^n=((e^{2\pi i})^\frac{1}{5})^n=(e^{2\pi i})^\frac{n}{5}=(e^{2n\pi i})^\frac{1}{5}, n\in\mathbb{N}$$ We know that $e^{2n\pi i}=1$ because $cos(2n\pi)+isin(2n\pi)=1+i\cdot0=1$. Brining it all together, since $e^{2n\pi i}=1$ it must be the case that $$e^{\frac{2n\pi i}{5}}=(e^{2n\pi i})^\frac{1}{5}=1^\frac{1}{5}=1$$Therefore, $$1+z+z^2+z^3+z^4=1+e^{\frac{2\cdot1\pi i}{5}}+e^{\frac{2\cdot2\pi i}{5}}+e^{\frac{2\cdot3\pi i}{5}}+e^{\frac{2\cdot4\pi i}{5}}=1+1+1+1+1=5$$
I can't understand why my answer would be wrong. If I had to guess it would have to do with the fact that I pulled out the $\frac{1}{5}$ and pulled in the n to get $(e^{2n\pi i})^\frac{1}{5}$. As far as I can see this is a legal move though.
You can use $e^{n \cdot z} = (e^{z})^n$ when n is an integer, this is called De Moivre's Theorem. But for non-integers like $\frac{1}{5}$, it will not hold.
More infomation about the theorem can be found here: https://brilliant.org/wiki/de-moivres-theorem/