How to evaluate $\sum_{n=1}^\infty \frac{n^5}{e^{2\pi n}-1}$? I recently found the following result on Twitter.
$$\sum_{n=1}^\infty \frac{n^5}{e^{2\pi n}-1}=\frac{1}{504}$$
I know that $\int_0^\infty \frac{x^5}{e^{2 \pi x}-1} dx = \frac{5!}{(2\pi)^6}\zeta(6)=\frac{1}{504}$
How to show that the sum is also equal to the same number?
Can this be generalized to a class of functions where the sum (over positive integers) and the definite integral (from 0 to $\infty$) are the same?
 A: I'm not sure if it's more appropriate to post this here or elsewhere, but we can integrate the function $$f(z) = \frac{z^{5}e^{iz}}{\cosh(z) - \cos(z)} $$ around the contour $$\left[-\frac{(2N+1) \pi \sqrt{2}}{2}, \frac{(2N+1) \pi \sqrt{2}}{2}\right] \cup \frac{(2N+1) \pi \sqrt{2}}{2} e^{i[0, \pi]}.  $$
(For any positive integer $N$, the semicircular part of the above contour passes halfway between two adjacent poles of $f(z)$.)
As $N \to \infty$ through the positive integers, the magnitude of $f(z)$ decays exponentially to zero on the semicircle.  This is due to the fact that the magnitude of $e^{iz}$ decays exponentially to zero as $\Im(z) \to + \infty$, while the magnitude of $\cosh(z)$ grows exponentially as $\Re(z) \to \pm \infty$.
We therefore have $$\begin{align} \int_{-\infty}^{\infty} f(x) \, \mathrm dx &= 2 \pi i \left(\sum_{n=1}^{\infty}\operatorname{Res}\left[f(z), n \pi(1+i) \right]+ \sum_{n=1}^{\infty}\operatorname{Res}\left[f(z), n \pi(-1+i) \right] \right) \\ &= 2 \pi i \left(\sum_{n=1}^{\infty}\lim_{z \to n\pi(1+i)} \frac{z^{5}e^{iz}}{\sinh(z) + \sin (z)} + \sum_{n=1}^{\infty} \lim_{z \to n \pi(-1+i)} \frac{z^{5}e^{iz}}{\sinh(z) + \sin (z)} \right) \\&= 2 \pi i \left(\sum_{n=1}^{\infty} \frac{n^{5} \pi^{5}(1+i)^{5}(-1)^{n} e^{- n \pi}}{(-1)^{n}(1+i)\sinh(n \pi)} + \sum_{n=1}^{\infty} \frac{n^{5} \pi^{5}(-1+i)^{5}(-1)^{n}e^{-n \pi}}{(-1)^{n}(-1+i) \sinh(n \pi)} \right) \\ &= -16 \pi^{6} i \sum_{n=1}^{\infty} \frac{n^{5}e^{-n \pi}}{\sinh(n \pi)} \\ &=-32 \pi^{6} i \sum_{n=1}^{\infty} \frac{n^{5}}{e^{2 \pi n}-1}. \end{align} $$
Equating the imaginary parts on both sides of the equation, we get $$ \begin{align} \sum_{n=1}^{\infty} \frac{n^{5}}{e^{2 \pi n}-1} &= -\frac{1}{32 \pi^{6}} \int_{-\infty}^{\infty} \frac{x^{5} \sin(x)}{\cosh(x) - \cos(x)} \, \mathrm dx \\ &= -\frac{1}{16 \pi^{6}} \int_{0}^{\infty}\frac{x^{5} \sin(x)}{\cosh(x) - \cos(x)} \, \mathrm dx \\ &=  -\frac{1}{8 \pi^{6}} \, \Im \int_{0}^{\infty}x^{5} \sum_{n=1}^{\infty}  e^{-(1-i)nx} \, \mathrm dx \\ &= -\frac{1}{8 \pi^{6}} \, \Im  \sum_{n=1}^{\infty} \int_{0}^{\infty} x^{5} e^{-(1-i)nx} \, \mathrm dx \\ &= -\frac{1}{8 \pi^{6}} \, \Im \sum_{n=1}^{\infty} \frac{\Gamma(6)}{(1-i)^6n^{6}} \\ &= \frac{15}{8 \pi^{6}} \sum_{n=1}^{\infty} \frac{1}{n^{6}} \\ &= \frac{1}{504}. \end{align}$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{{\displaystyle #1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\sr}[2]{\,\,\,\stackrel{{#1}}{{#2}}\,\,\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$\ds{\sum_{n = 1}^{\infty}{n^{5} \over \expo{2\pi n} - 1} = {\LARGE ?}}$

The ${\ds{t^{5}} \over \ds{\expo{2\pi t} - 1}}$-
$\ds{Mellin\ Transform}$ is given by:
\begin{align}
& \left.\int_{0}^{\infty}t^{z - 1}
\,{t^{5} \over \expo{2\pi t} - 1}\dd t
\right\vert_{\Re\pars{z}\ >\ -4} =
\pars{2\pi}^{-z - 5}\,\,\,
\Gamma\pars{z + 5}\zeta\pars{z + 5}
\\[5mm] & \mbox{such that}
\\ &
{t^{5} \over \expo{2\pi t} - 1} =
\left.\int_{c\ -\ \infty\ic}^{c\ +\ \infty\ic}
\pars{2\pi}^{-z - 5}\,\,\,\Gamma\pars{z + 5}\zeta\pars{z + 5}t^{-z}\,\,{\dd z \over 2\pi\ic}
\right\vert_{\,\,c\ >\ -4}
\end{align}
Hereafter, I'll choose $\ds{c = 1^{+}}$ in order to
ensure the convergence of $\ds{\sum_{n = 1}^{\infty}n^{-z}}$.
Then,
\begin{align}
& \sum_{n = 1}^{\infty}{n^{5} \over \expo{2\pi n} - 1} \\[5mm] = &
\int_{1^{+}\ -\ \infty\ic}^{1^{+}\ +\ \infty\ic}\
\overbrace{\pars{2\pi}^{-z - 5}\,\,\,\Gamma\pars{z + 5}\zeta\pars{z + 5}\zeta\pars{z}}
^{\ds{\on{f}\pars{z}}}\,\,{\dd z \over 2\pi\ic}
\end{align}
I'll switch the integration to the path
$\ds{\braces{z \mid z = -2 + t\ic,\ t \in \mathbb{R}}}$:
\begin{align}
& \sum_{n = 1}^{\infty}{n^{5} \over \expo{2\pi n} - 1}  =
\int_{-\infty}^{\infty}\on{f}\pars{-2 + \ic t}
{\dd t \over 2\pi} +
\on{Res}\bracks{\on{f}\pars{z},z = 1}
\end{align}
The integral vanishes out: With
$\ds{Riemann\ Functional\ Equation}$ it's shown that the integrand is an $\ds{odd}$ function of $\ds{t}$.
Integration along $\ds{\pars{-2 \pm \ic R,1^{+} \pm \ic R}}$ vanishes out too as $\ds{R \to \infty}$.
Therefore,
\begin{align}
& \sum_{n = 1}^{\infty}{n^{5} \over \expo{2\pi n} - 1}  =
\on{Res}\bracks{\on{f}\pars{z},z = 1} =
\pars{2\pi}^{-6}\,\,\Gamma\pars{6}\zeta\pars{6}
\\[5mm] = &
{1 \over 64\pi^{6}}\times 120 \times {\pi^{6} \over 945} = \bbx{\color{#44f}{1 \over 504}} \approx
0.001984
\end{align}
