Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to prove that $\displaystyle\sum_{\substack{n=1\\n\text{ odd}}}^{\infty}\frac{n}{e^{n\pi}+1}=\frac1{24}$.

I found a solution by myself 10 hours after I posted it, here it is:

$$f(x)=\sum_{\substack{n=1\\n\text{ odd}}}^{\infty}\frac{nx^n}{1+x^n},\quad\quad g(x)=\displaystyle\sum_{n=1}^{\infty}\frac{nx^n}{1-x^n},$$

then I must prove that $f(e^{-\pi})=\frac1{24}$. It was not hard to find the relation between $f(x)$ and $g(x)$, namely $f(x)=g(x)-4g(x^2)+4g(x^4)$.

Note that $g(x)$ is a Lambert series, so by expanding the Taylor series for the denominators and reversing the two sums, I get


where $\sigma$ is the divisor function $\sigma(n)=\sum_{d\mid n}d$.

I then define for complex $\tau$ the function $$G_2(\tau)=\frac{\pi^2}3\Bigl(1-24\sum_{n=1}^{\infty}\sigma(n)e^{2\pi in\tau}\Bigr)$$ so that $$f(e^{-\pi})=g(e^{-\pi})-4g(e^{-2\pi})+4g(e^{-4\pi})=\frac1{24}+\frac{-G_2(\frac i2)+4G_2(i)-4G_2(2i)}{8\pi^2}.$$

But it is proven in Apostol "Modular forms and Dirichlet Series", page 69-71 that $G_2\bigl(-\frac1{\tau}\bigr)=\tau^2G_2(\tau)-2\pi i\tau$, which gives $\begin{cases}G_2(i)=-G_2(i)+2\pi\\ G_2(\frac i2)=-4G_2(2i)+4\pi\end{cases}\quad$. This is exactly was needed to get the desired result.

Hitoshigoto oshimai !

I find that sum fascinating. $e,\pi$ all together to finally get a rational. This is why mathematics is beautiful!

Thanks to everyone who contributed.

share|cite|improve this question
See the article on the odd divisor function on MathWorld. According to this article, your function $f(x)$ is $1/24$ multiplied by the sum of the fourth powers of two Jacobi theta functions. – Jim Belk May 12 '13 at 7:09
@danodare: If you found an answer by yourself, you are welcome to answer your own question. – JavaMan May 12 '13 at 22:30
Whence did this question come? – robjohn Aug 21 '13 at 21:34
That is a great solution! Wow. – Akiva Weinberger Aug 31 '14 at 17:39
are you sure ?than the sum is equal to $$\frac{1}{24}$$ when x=1 look – antonio asis Dec 29 '15 at 19:44
up vote 77 down vote accepted

We will use the Mellin transform technique. Recalling the Mellin transform and its inverse

$$ F(s) =\int_0^{\infty} x^{s-1} f(x)dx, \quad\quad f(x)=\frac{1}{2 \pi i} \int_{c-i \infty}^{c+i \infty} x^{-s} F(s)\, ds. $$

Now, let's consider the function

$$ f(x)= \frac{x}{e^{\pi x}+1}. $$

Taking the Mellin transform of $f(x)$, we get

$$ F(s)={\pi }^{-s-1}\Gamma \left( s+1 \right) \left(1- {2}^{-s} \right) \zeta \left( s+1 \right),$$

where $\zeta(s)$ is the zeta function . Representing the function in terms of the inverse Mellin Transform, we have

$$ \frac{x}{e^{\pi x}+1}=\frac{1}{2\pi i}\int_{C}{\pi }^{-s-1}\Gamma \left( s+1 \right) \left( 1-{2}^{-s} \right) \zeta \left( s+1 \right) x^{-s}ds. $$

Substituting $x=2n+1$ and summing yields

$$\sum_{n=0}^{\infty}\frac{2n+1}{e^{\pi (2n+1)}+1}=\frac{1}{2\pi i}\int_{C}{\pi}^{-s-1}\Gamma \left( s+1 \right)\left(1-{2}^{-s} \right) \zeta\left( s+1 \right) \sum_{n=0}^{\infty}(2n+1)^{-s}ds$$

$$ = \frac{1}{2\pi i}\int_{C}{\pi }^{-s-1}\Gamma \left( s+1 \right) \left(1-{2}^{-s} \right)^2\zeta\left( s+1 \right) \zeta(s)ds.$$

Now, the only contribution of the poles comes from the simple pole $s=1$ of $\zeta(s)$ and the residue equals to $\frac{1}{24}$. So, the sum is given by

$$ \sum_{n=0}^{\infty}\frac{2n+1}{e^{\pi (2n+1)}+1}=\frac{1}{24} $$

Notes: 1)

$$ \sum_{n=0}^{\infty}(2n+1)^{-s}= \left(1- {2}^{-s} \right) \zeta \left( s \right). $$

2) The residue of the simple pole $s=1$, which is the pole of the zeta function, can be calculated as

$$ r = \lim_{s=1}(s-1)({\pi }^{-s-1}\Gamma \left( s+1 \right) \left({2}^{-s}-1 \right)^2\zeta\left( s+1 \right) \zeta(s))$$

$$ = \lim_{s\to 1}(s-1)\zeta(s)\lim_{s\to 1} {\pi }^{-s-1}\Gamma \left( s+1 \right) \left({2}^{-s}-1 \right)^2\zeta\left( s+1 \right) = \frac{1}{24}. $$

For calculating the above limit, we used the facts

$$ \lim_{s\to 1}(s-1)\zeta(s)=1, \quad \zeta(2)=\frac{\pi^2}{6}. $$

3) Here is the technique for computing the Mellin transform of $f(x)$.

share|cite|improve this answer
Very nice. +1. $ $ – Potato May 12 '13 at 7:27
I have seen you use similar techniques many times before. Where did you learn them? You are quite good with integrals. – Potato May 12 '13 at 7:32
@Potato: These techniques for summing infinite series are known in the literature as applications of integral transforms such as Mellin and Fourier transform. I have been learning them over the years. They are very effective techniques. See here for a Fourier transform technique for summing a series. – Mhenni Benghorbal May 12 '13 at 7:48
Good job Mhenni (+1) – Ron Gordon May 12 '13 at 23:27
Is it just me or is there an error in the signs of $$\sum_{k\ge 0} \frac{1}{(2k+1)^s} = \zeta(s) (1 - 2^{-s})$$ This error is repeated twice and canceled by the square, so that you still get the right answer. – Marko Riedel May 13 '13 at 0:06

Let's start with $$ \sum_{n=0}^\infty x^n=\frac1{1-x}\tag{1} $$ Differentiating $(1)$ and multiplying by $x$, we get $$ \sum_{n=0}^\infty nx^n=\frac{x}{(1-x)^2}\tag{2} $$ Taking the odd part of $(2)$ yields $$ \sum_{n=0}^\infty(2n+1)x^{2n+1}=\frac{x(1+x^2)}{(1-x^2)^2}\tag{3} $$ Using $(3)$, we get $$ \begin{align} \sum_{n=0}^\infty\frac{2n+1}{e^{(2n+1)\pi}+1} &=\sum_{n=0}^\infty\sum_{k=1}^\infty(-1)^{k-1}(2n+1)e^{-(2n+1)k\pi}\\ &=\sum_{k=1}^\infty\sum_{n=0}^\infty(-1)^{k-1}(2n+1)e^{-(2n+1)k\pi}\\ &=\sum_{k=1}^\infty(-1)^{k-1}\frac{e^{-k\pi}\left(1+e^{-2k\pi}\right)}{\left(1-e^{-2k\pi}\right)^2}\\ &=\frac12\sum_{k=1}^\infty(-1)^{k-1}\frac{\cosh(k\pi)}{\sinh^2(k\pi)}\tag{4} \end{align} $$

We can use the formula proven in this answer $$ \pi\cot(\pi z)=\sum_{k\in\mathbb{Z}}\frac1{z+k}\tag{5} $$ to derive $$ \begin{align} \pi\csc(\pi z) &=\pi\cot(\pi z/2)-\pi\cot(\pi z)\\[9pt] &=\sum_{k\in\mathbb{Z}}\frac2{z+2k}-\sum_{k\in\mathbb{Z}}\frac1{z+k}\\ &=\sum_{k\in\mathbb{Z}}\frac{(-1)^k}{z+k}\\ \pi^2\frac{\cos(\pi z)}{\sin^2(\pi z)} &=\sum_{k\in\mathbb{Z}}\frac{(-1)^k}{(z+k)^2}\tag{6} \end{align} $$ then rotate coordinates with $z\mapsto iz$ to get $$ \pi^2\frac{\cosh(\pi z)}{\sinh^2(\pi z)}=\sum_{j\in\mathbb{Z}}\frac{(-1)^j}{(z+ij)^2}\tag{7} $$

Now plug $(7)$ into $(4)$: $$ \begin{align} \sum_{n=0}^\infty\frac{2n+1}{e^{(2n+1)\pi}+1} &=\frac1{2\pi^2}\sum_{k=1}^\infty\sum_{j\in\mathbb{Z}}(-1)^{j+k-1}\frac1{(k+ij)^2} \\ &=\frac1{2\pi^2}\sum_{k=1}^\infty(-1)^{k-1}\frac1{k^2}\\ &+\frac1{2\pi^2}\sum_{k=1}^\infty\sum_{j=1}^\infty(-1)^{j+k-1}\left(\frac1{(k+ij)^2}+\frac1{(k-ij)^2}\right)\\ &=\frac1{2\pi^2}\frac{\pi^2}{12}\\ &+\frac1{2\pi^2}\sum_{k=1}^\infty\sum_{j=1}^\infty(-1)^{j+k-1}\frac{2(k^2-j^2)}{(k^2+j^2)^2}\\ &=\frac1{24}+0\tag{8} \end{align} $$

share|cite|improve this answer
My bad; I didn't use the Mellin Transform. I just assumed $(1)$ and $(5)$ :-) – robjohn Aug 21 '13 at 21:30
...or we could just notice that $\dfrac{\cosh}{\sinh^2}=-\bigg[\dfrac1{\sinh}\bigg]'$ – Lucian Jan 23 '15 at 20:37
robjohn are you sure that the sum is equal 1/24 look – antonio asis Dec 29 '15 at 19:47
@antonioasis: Both Mhenni and Mathematica seem to agree. Where am I supposed to look? – robjohn Dec 29 '15 at 20:13
look the post link – antonio asis Dec 29 '15 at 20:22

The calculation of the Mellin transform of $f(x)$ is not present in the above answer, so I will show it here.

$$\mathfrak{M}\left(\frac{1}{e^{\pi x}+1};s \right) = \int_0^\infty \frac{1}{e^{\pi x}+1} x^{s-1} dx = \int_0^\infty \frac{1}{e^{\pi x}} \frac{1}{1+e^{-\pi x}} x^{s-1} dx \\= \int_0^\infty \frac{1}{e^{\pi x}} \sum_{q\ge 0} (-1)^q e^{-\pi q x} x^{s-1} dx = \int_0^\infty \sum_{q\ge 0} (-1)^q e^{-\pi (q+1) x} x^{s-1} dx \\ = \Gamma(s) \sum_{q\ge 0} (-1)^q \frac{1}{\pi^s (q+1)^s} = \frac{1}{\pi^s} \Gamma(s) (\zeta(s) - 2 \times 2^{-s} \times \zeta(s)) = \frac{1}{\pi^s} \Gamma(s) (1 - 2\times 2^{-s}) \zeta(s).$$ It now follows from the definition of the Mellin transform that $$\mathfrak{M}\left(\frac{x}{e^{\pi x}+1};s \right) = \frac{1}{\pi^{s+1}} \Gamma(s+1) (1 - 2^{-s}) \zeta(s+1).$$

share|cite|improve this answer
There is more material here and here and here. – Marko Riedel May 12 '13 at 23:31
One more thing -- another interesting example can be found here. – Marko Riedel May 12 '13 at 23:39
I apologize -- changed it. – Marko Riedel May 12 '13 at 23:53
(+1) nice work. – Mhenni Benghorbal May 13 '13 at 23:52
doesn't "above answer" not always the above for everyone? – ADG Dec 28 '14 at 5:52

Actually the above is not quite complete, the missing piece is the proof that we can drop the contribution from the pole at $s=-1,$ which is $x/24.$ To verify this we have to show that $$\int_{-i\infty}^{i\infty} \frac{1}{\pi^{s+1}} \Gamma(s+1) (1-2^{-s})^2 \zeta(s+1)\zeta(s) ds = 0.$$ Now from the functional equation of the Riemann Zeta function we see that this integral is equal to $$-\int_{-i\infty}^{i\infty} \frac{\zeta(-s)}{\sin(1/2s\pi)} (2^s-1) (1-2^{-s}) \zeta(s) ds$$ Actually doing the accounting we find that the kernel $$ g(s) = \frac{\zeta(-s)}{\sin(1/2s\pi)} (2^s-1) (1-2^{-s}) \zeta(s) $$ of this integral has the property that $g(s) = - g(-s)$ on the imaginary axis, so the integral is zero.

To see this consider what effect negation has on the individual terms. $$\zeta(-s)\zeta(s) \to \zeta(s)\zeta(-s),$$ $$(2^s-1)(1-2^{-s}) \to (2^{-s}-1)(1-2^s) = (2^s-1)(1-2^{-s}),$$ $$\sin(1/2 s\pi) \to \sin(1/2 (-s)\pi) = -\sin(1/2 s\pi).$$ The first two terms are even and the last one is odd, QED.

Note that we have taken advantage of the fact that $x=1$ ... for other values of $x$ this trick will not go through. Also relevant is that negation (rotation by 180 degrees about the origin) takes the imaginary axis to itself (this is not the case when we are integrating along some other line parallel to the imaginary axis in the right half plane).

share|cite|improve this answer
So the closed contour is a tall rectangle? – Random Variable May 15 '13 at 20:16
Yes, exactly, the two vertical sides are the lines $\Re(s)=3/2$ and $\Re(s) = 0.$ – Marko Riedel May 15 '13 at 22:17
Let me rephrase my questions. 1) Can the right side of the rectangle be any vertical line to the right of the line $\Re(s) =1$? 2) There is a simple pole at the origin (albeit with residue 0). Does the contour technically need to be indented? 3) Does the integral go to zero along the top and bottom of the rectangle since $|\Gamma(s)|$ decays quickly as $\Im(s)$ increases? – Random Variable May 16 '13 at 0:10
1) Owing to the convergence of $\sum_{k\ge 0} \frac{1}{(2k+1)^s}$ in the half plane $\Re(s)>1$ and the fact that there are no additional poles the Mellin inversion integral can indeed be along any vertical line in that half plane. 2) The simple pole is cancelled by the $(1-2^{-s})$ term, no indentation necessary. 3) This is correct, the decrease is exponential. Finally, let me refer you to one of the experts on this one -- the paper "Mellin Transform and Its Applications" by Szpankowski on contains many examples and is highly readable. (For some reason SE won't let me add a link.) – Marko Riedel May 16 '13 at 1:21
Thanks. If you have time, I started a related thread earlier today.… – Random Variable May 16 '13 at 1:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.