# Polygamma Poles

> Step the order m from 1 to 8 and count the colors: around each pole of the polygamma function the color wheel turns m + 1 times.

In 1734 Leonhard Euler found that $1 + \frac{1}{4} + \frac{1}{9} + \dots = \frac{\pi^2}{6}$, answering the Basel problem, posed by Pietro Mengoli in 1650. That sum is $\psi^{(1)}(1)$, a value of this plot's function.

The polygamma function $\psi^{(m)}(z)$ is the $m$-th derivative of the digamma function $\psi(z) = \Gamma'(z)/\Gamma(z)$, where the gamma function $\Gamma$ extends the factorial: $\Gamma(n + 1) = n!$. It is a Hurwitz zeta value: $\psi^{(m)}(z) = (-1)^{m+1}\, m!\, \zeta(m + 1, z)$, where $\zeta(s, z) = \sum_{n=0}^{\infty} (n + z)^{-s}$, the sum over $n = 0, 1, 2, \ldots$. Each term $(n + z)^{-m-1}$ has a pole of order $m + 1$ at $z = -n$, where it grows without bound, so $\psi^{(m)}$ has a pole at $0, -1, -2, \ldots$.

The plot colors the plane of the complex number $z = x + iy$: hue shows the argument of $\psi^{(m)}(z)$, its direction as a point, and lightness its modulus, its size. Around a pole of order $m + 1$ the color wheel repeats $m + 1$ times: step $m$ from 1 to 8 and count them. Far from the real axis the small values are dark. In general $\psi^{(m)}(1) = (-1)^{m+1}\, m!\, \zeta(m + 1)$, a value of the Riemann zeta function; Euler's sum is the case $m = 1$.

The formula is the Euler–Maclaurin form of $\zeta(m + 1, z)$: the first 16 terms, the integral of the rest, and two corrections with Bernoulli numbers, with a relative error of at most about $10^{-6}$. The digamma function, $m = 0$, is left out: its series diverges, and the integral term divides by $m$.

- [Open the interactive version](https://graph-paper.io/showcase/en/polygamma-poles)
- [Learn more on Wikipedia](https://en.wikipedia.org/wiki/Polygamma_function)
