Very accurate approximations for $\sum\limits_{n=0}^\infty \frac{n}{a^n-1}$ and $\sum\limits_{n=0}^\infty \frac{n^{2m+1}}{e^n-1}$

Apologies if this has been asked before, since it seems rather simple. I enjoy messing around with formal mathematics, and I once derived the following formula which holds for many functions (see my question here; no-one has yet responded to my request for criteria describing for which $q(x)$ it holds):

$$\sum_{n=0}^{\infty}q(n)=\int_{0}^{\infty}q(s)ds-\sum_{k=1}^{\infty}\frac{B_{k}q^{[k-1]}(0)}{k!}\tag{*}$$

where $B_n$ are the Bernoulli numbers. Using this formula with $q(x)=\frac{x}{e^x-1}$ and the identities $\int_0^\infty \frac{x^{s-1}}{e^x-1}=\Gamma(s)\zeta(s)$ and $\frac{x}{e^x-1}=\sum\limits_{n=0}^\infty \frac{B_n}{n!}x^n$, it was easy to show (since $\lim\limits_{n\rightarrow\infty}{\frac{n}{e^n-1}}=0$that:

$$\sum_{n=1}^\infty \frac{n}{e^n-1}=\frac{\pi^2}{6}-1-\sum_{n=0}^\infty \frac{B_n B_{n+1}}{n!(n+1)!}$$

But the odd Bernoulli numbers are zero past $n=3$ so that we get:

$$\sum_{n=1}^\infty \frac{n}{e^n-1}=\frac{\pi^2}{6}-\frac{11}{24}\tag{1}$$

Now this is very accurate indeed; Wolfram Alpha declares the error to be on the order of $10^{-16}$. Further, using $(*)$ for $q(x)=\frac{x^{2m+1}}{e^x-1}$ in a similar manner gives:

$$\sum_{n=1}^\infty \frac{n^{2m+1}}{e^n-1}=\Gamma(2m+2)\zeta(2m+2)-\sum_{n=0}^\infty \frac{B_n B_{2m+n+1}}{n!(2m+n+1)!}$$

which simplifies to:

$$\sum_{n=1}^\infty \frac{n^{2m+1}}{e^n-1}=(2m+1)!\zeta(2m+2)+\frac{B_{2m+2}}{2(2m+2)!}\tag{2}$$

For $m=1$ this gives:

$$\sum_{n=1}^\infty \frac{n^3}{e^n-1}=\frac{\pi^4}{15}-\frac{1}{1440}$$

which Wolfram Alpha declares to have an error on the order of $10^{-3}$. The $m=2$ case appears to also have an error on the order of $10^{-3}$.

If we use $q(x)=\frac{bx}{e^{bx}-1}$ in $(*)$ and then set $b=\ln{a}$ then I think we get the following purported identity:

$$\sum_{n=1}^\infty \frac{n}{a^n-1}=\frac{\pi^2}{6(\ln{a})^2}-\frac{1}{2\ln{a}}+\frac{1}{24}\tag{3}$$

The accuracy of $(3)$ appears extremely good; e.g. for $a=2$ it is $10^{-16}$, for $a=3$ it is $10^{-15}$, and for $a=6$ it is still $10^{-9}$. All of this makes me believe that these formula are not exactly correct, but their accuracy amazes me. I don’t know if what’s going on in this question has any relevance here.

My questions are: Can anyone confirm that all of the highlighted expressions are in fact only approximations, or are some of them actually correct? What in general are the error terms for $(2)$ and $(3)$? Can anyone explain why these expressions are in fact so accurate?

Solutions Collecting From Web of "Very accurate approximations for $\sum\limits_{n=0}^\infty \frac{n}{a^n-1}$ and $\sum\limits_{n=0}^\infty \frac{n^{2m+1}}{e^n-1}$"

Let $q = e^{-1}$ then $$\sum_{n = 1}^{\infty}\frac{n}{e^{n} – 1} = \sum_{n = 1}^{\infty}\frac{nq^{n}}{1 – q^{n}} = \frac{1 – P(q)}{24}$$ where $P(q)$ is a famous Ramanujan’s function. It is known from the theory of elliptic and theta functions that if $q = \exp(-\pi K’/K)$ then $$P(q) = \left(\frac{2K}{\pi}\right)^{2}\left(\frac{6E}{K} + k^{2} – 5\right)$$ Note that in your case $q = 1/e$ so that $K’/K = 1/\pi$ and hence there is no explicit known form for $k$ and thereby it is difficult to evaluate the sum in closed form.

Similarly if $s$ is an odd positive integer then the value of $$F(q) = \sum_{n = 1}^{\infty}\frac{n^{s}q^{n}}{1 – q^{n}}$$ is expressible in terms of $K, k, \pi$ where $q = \exp(-\pi K’/K)$. Evaluation of such sums in closed form is possible if $q = e^{-\pi\sqrt{r}}$ for some positive integer $r$ because in that case $k$ is algebraic and $K$ can be evaluated for at least some values of $r$. Also note that your sum uses $n = 0$ for which the denominator vanishes and it should be treated as $n \to 0$ instead of $n = 0$. Thus $n/(e^{n} – 1) \to 1$ as $n \to 0$.

The background material on elliptic and theta functions (including Ramanujan’s functions) is covered in my blog and it does require some patience to understand the theory completely. See some answers to similar questions here and here.