Doubt regarding closed form of $\sum_{k=1}^{n}\text{exp}\left(k\left(\frac{2\pi i}{n}\right)\right)$ 
Value of the SUM $$\sum_{k=1}^{n}\text{exp}\left(k\left(\frac{2\pi i}{n}\right)\right)$$

We can rewrite it as $$\sum_{k=1}^{n}\text{exp}\left((2\pi i)\frac{k}{n}\right)\Rightarrow \sum_{k=1}^{n}\left(e^{2\pi i}\right)^{\frac{k}{n}}$$

Now , as $$e^{\pi i}=-1$$ squaring both sides $$\color{red}{e^{2\pi i}=1}$$

So finally $$\sum_{k=1}^{n}1^{\frac{k}{n}}=n$$
Is this correct ? and what'll be the value of $$\mathfrak{Re}\left(\sum_{k=1}^{n}\text{exp}\left(k\left(\frac{2\pi i}{n}\right)\right)\right)$$
 A: No, we can not do that. For example $(-1) = e^{i\pi} = (e^{2i\pi})^{\frac12} \ne 1$.
In general for a complex number $z$, $$1^z \ne 1$$
Here in your case
the equation $z^n = 1$ has exactly $n$ solutions and one of the solution is $z_1 =e^{\frac{2 \pi i}{n}}$ (ofcourse $z_0=1$ is a solution). So when you write
$$1^{\frac1n}$$ in $\mathbb{C}$, it is not clear to which root that you are referring to.
To solve the above problem you need to recognise that the summation is in the form $$\sum_{k =1}^{n} r^k$$  where $r =e^{\frac{2 \pi i}{n}}$
which is a finite geometric series.
A: This way is not correct since $\left(e^{2\pi i}\right)^{\frac1n}$ has multiple solutions, we need to use instead
$$\sum_{k=1}^{n}\left(e^{\frac{2\pi i}n}\right)^{k}$$
then by geometric series, for $n > 1$ we obtain
$$\frac{e^{\frac{2\pi i}n}-e^{\frac{2\pi i(n+1)}n}}{1-e^{\frac{2\pi i}n}}= e^{\frac{2\pi i}n} \frac{1-e^{2\pi i}}{1-e^{\frac{2\pi i}n}}=0$$
See the related

*

*Sum of nth roots of unity
A: Consider the polynomial $x^{n} -1$.
The roots of this polynomial are precisely $\exp(\frac{2ki\pi}{n})$
For $k=1,2,....n$.
So what is the sum of roots of this polynomial?.
By vieta's formula it is $\frac{-\text{coefficient of}\, x^{n-1}}{\text{coefficient of}\,x^{n}}$.
As you can see the coefficient of $x^{n-1}$ is $0$.
So sum is $0$.
