Basel sum from exponential poles (source code)

= Basel sum from exponential poles
{c}
{title2=$\sum_{r\ge1}r^{-2}=\pi^2/6$}

The meromorphic function $(e^z-1)^{-1}$ has simple poles of residue one at $2\pi i\mathbb Z$. Subtracting $1/z+\sum_{r=1}^n2z/(z^2+4\pi^2r^2)$ removes all poles inside radius $2(n+1)\pi$. Comparing its inner Taylor coefficients with the outer Laurent expansion gives annular coefficient $a_1=1/12-\sum_{r=1}^n1/(2\pi^2r^2)$. On circles of radius $(2n+1)\pi$, the function is uniformly bounded: outside the strip $|\operatorname{Re}z|\le1$ use the exponential modulus, and inside it the imaginary part stays near an odd multiple of $\pi$. The Laurent coefficient integral bounds $|a_1|\le C/[(2n+1)\pi]\to0$, proving the sum.