<s>[INST] Sum of $\frac{z^{k+1}}{(1-z)^2}$ over the roots of $x^n+1=0$ equals $\frac{n}{2}(k-\frac{n}{2})$ The problem is to show that for every $k \in \{1,2,...,n\}$ if we sum $\frac{z^{k+1}}{(1-z)^2}$ over the roots $z$ of $x^n+1=0$, we obtain the result $\frac{n}{2}(k-\frac{n}{2})$.
One idea I had is to consider the polynomial $P(t)=(1-t)^n+1$. We can easily calculate the sum of roots of $P$ and the sum of their squares. By considering the polynomial $Q(t)=t^nP(1/t)$ we can easily compute the the sum of the reciprocals and sum of the squares of the reciprocals. Hence for $k=0,1,2$ we can compute the sum in question quite easily and we get the intended result. However this method doesn't really generalise because the formulas for the symmetric sums lead to really messy computations.
 [/INST] We have with
$$f(z) = \frac{z^{k+1}}{(1-z)^2} \frac{nz^{n-1}}{z^n+1}
= \frac{1}{(z-1)^2} \frac{nz^{n+k}}{z^n+1} $$
and $\zeta_{n,q} = \exp(\pi i/n+ 2\pi i q/n)$
$$\sum_{x^n+1=0} \frac{x^{k+1}}{(1-x)^2}
= \sum_{q=0}^{n-1} 
\mathrm{Res}_{\large z=\zeta_{n,q}} f(z).$$
This is also given by (residues sum to zero)
$$-\mathrm{Res}_{z=1} f(z)
-\mathrm{Res}_{z=\infty} f(z).$$
For the first of these we differentiate to obtain
$$\frac{n(n+k) z^{n+k-1}}{z^n+1}
- \frac{nz^{n+k}}{(z^n+1)^2} n z^{n-1}$$
Evaluate at $z=1$ to get
$$\frac{1}{2} n(n+k) - \frac{1}{4} n^2
= \frac{1}{2} nk + \frac{1}{4} n^2.$$
For the residue at infinity we get
$$-\mathrm{Res}_{z=0} \frac{1}{z^2}
\frac{1}{(1/z-1)^2} \frac{n/z^{n+k}}{1/z^n+1}
\\ = -\mathrm{Res}_{z=0}
\frac{1}{(1-z)^2} \frac{n}{z^{n+k}+z^k}
\\ = -\mathrm{Res}_{z=0} \frac{1}{z^k}
\frac{1}{(1-z)^2} \frac{n}{z^{n}+1}$$
This is 
$$-[z^{k-1}] \frac{1}{(1-z)^2} \frac{n}{z^{n}+1}.$$
With $k\le n$ only the constant term from $\frac{n}{z^{n}+1}$
contributes and we get
$$-[z^{k-1}] \frac{n}{(1-z)^2} = -nk.$$
Adding the contributions from the residues at one and at infinity
and flipping the sign we thus obtain
$$-\left(\frac{1}{2} nk + \frac{1}{4} n^2
- nk\right)
= -\left(-\frac{1}{2} nk + \frac{1}{4} n^2\right)
= -\frac{1}{2} n \left(\frac{1}{2}n - k\right).$$
This is 
$$\bbox[5px,border:2px solid #00A000]{
\frac{1}{2} n \left(k - \frac{1}{2} n\right)}$$
as claimed.
</s>