<s>[INST] $\sum_{k=1}^{n-1}\left(1-e^{\frac{2\pi ki}{n}}\right)^{-1}$ How can I go about computing
$$
\sum_{k\ =\ 1}^{n - 1}
\left(1 - \mathrm{e}^{\large 2\pi k\mathrm{i}/n}\right)^{-1}\
{\Large ?}
$$
I originally thought that it was supposed to be the reciprocal of the sum, and I ended up with $1/n$, but now I realized that it is the sum of the reciprocals. I've tried using
$$e^{ix}=\cos x+i\sin x,$$
but I didn't get anywhere with that.
 [/INST] The answer is $\frac{n-1}{2}$. There are multiple ways to approach it, here is one way;
Let $\displaystyle \alpha_k = e^{i \frac{2\pi k}{n}}$ for $k = 1, \dots,  n-1$. We seek to evaluate,
$$\sum_{k=1}^{n-1} \frac{1}{1-\alpha_k}, \ \ (*) $$
We know that $\alpha_1, \dots , \alpha_{n-1}$ are roots of the polynomial,
$$P(z) = 1 + z+ \dots + z^{n-1}$$
This is because $1, \alpha, \dots, \alpha_{n-1}$ are the roots of the polynomial $1 - z^n$ (roots of unity), so when we take away $1$ as a root we obtain $P$. But $\alpha_k$ is a root of $P$ simply means that $P(\alpha_k) = 0$ for each $k$. Our goal now is to find a polynomial that has roots, 
$$\frac{1}{1-\alpha_k} = f(\alpha_k) $$
as roots instead of $\alpha_k$, with this polynomial, we find the sum of the roots of that polynomial to obtain $(*)$. Since $f$ is one-to-one we can find the inverse function,
$$f^{-1}(x) = 1 - \frac{1}{x} \Rightarrow f^{-1} \left(\frac{1}{1-\alpha_k} \right) = \alpha_k$$
Therefore the function,
$$Q(x) = P(f^{-1}(x)) = P \left(1 - \frac{1}{x}\right) $$
has roots $\displaystyle \frac{1}{1-\alpha_k}$ for each $k$ (this is the crux of the argument, please convince yourself of this!). Note that $Q$ as defined is not a polynomial yet, but we can use $Q$ as a function to find a polynomial that has the same roots. 
Now, we have that,
$$Q(x) = P \left(1 - \frac{1}{x} \right) = 1 + \left(1 - \frac{1}{x} \right) + \dots + \left( 1- \frac{1}{x} \right)^{n-1} $$
Summing this geometric series we obtain,
$$Q(x) = x\left(1 -  \left(1-\frac{1}{x} \right)^n\right) $$
With some manipulation we obtain that,
$$R(x) = x^{n-1}Q(x) = x^n - (x-1)^n = nx^{n-1} - \frac{n(n-1)}{2} x^{n-2} + \dots $$
Now we have a polynomial $R$ and I claim that $R$ has roots $\displaystyle \frac{1}{1-\alpha_k}$ for each $k$. This is because,
$$R \left(\frac{1}{1-\alpha_k} \right) = \frac{1}{(1-\alpha_k)^{n-1}} Q \left(\frac{1}{1-\alpha_k} \right) =\frac{1}{(1-\alpha_k)^{n-1}} P\left(f^{-1}\left(\frac{1}{1-\alpha_k} \right) \right) = \frac{1}{(1-\alpha_k)^{n-1}} P(\alpha_k) = 0 $$
Therefore to find $(*)$ we note that it is simply the sum of the roots of $R$, therefore,
$$ \sum_{k=1}^{n-1} \frac{1}{1-\alpha_k} = \frac{n(n-1)/2}{n} = \frac{n-1}{2}$$
This completes the proof.
</s>