Cotangent partial-fraction Fourier kernel (source code)

= Cotangent partial-fraction Fourier kernel
{title2=$\sum_{n\in\mathbb Z}(z+n)^{-k}$}

For an integer $k\geq2$ and $\operatorname{Im}z>0$, differentiating the partial-fraction expansion of $\pi\cot\pi z$ gives
$$
\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}.
$$
Both differentiated series converge locally uniformly. This kernel computes the <Fourier expansion of a modular form> for holomorphic <Eisenstein series>.