Cotangent Fourier expansion (source code)

= Cotangent Fourier expansion
{title2=$\pi\cot(\pi z)=-\pi i-2\pi i\sum_{r\geq1}e^{2\pi irz}$}

For $\operatorname{Im}z>0$, writing <cotangent> as $i(e^{2\pi iz}+1)/(e^{2\pi iz}-1)$ and expanding a <geometric series> gives this <Fourier series>. Differentiating the <cotangent partial-fraction expansion> and this <Fourier series> $k-1$ times yields
$$
\sum_{n\in\mathbb Z}(z+n)^{-k}=\frac{(-2\pi i)^k}{(k-1)!}\sum_{r\geq1}r^{k-1}e^{2\pi irz},\qquad k\geq2.
$$