Let $$S= \sum_{n=1}^\infty \frac{n!}{n^n}$$

(Does anybody know of a closed form expression for $S$?)

It is easy to show that the series converges.

Prove that $S$ is irrational.

I tried the sort of technique that works to prove $e$ is irrational, but got bogged down.

  • 5
    $\begingroup$ As an aside, $$\sum_{n=0}^\infty \frac{n!}{n^n} \quad = \quad \int_0^\infty \frac{E(x)}{e^x} dx$$ where $\displaystyle\lim_{n \to 0} n^n = 1,$ and $$E(x) = \sum_{n=0}^\infty \frac{x^n}{n^n} \qquad \text{and} \qquad e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$$ $\endgroup$
    – Lucian
    Commented Mar 11, 2015 at 20:49
  • 5
    $\begingroup$ Also note that: $$\int_{0}^1 n(-x\log(x))^{n-1} dx=\frac{n!}{n^n}$$ $$\int_{0}^1\frac{1}{(x\ln(x)+1)^2}dx=\int_{0}^1 \sum_{n=1}^\infty n(-x\log(x))^{n-1} dx=\sum_{n=1}^\infty\frac{n!}{n^n}$$ $\endgroup$ Commented Mar 11, 2015 at 21:15
  • 5
    $\begingroup$ Continued fraction: $\displaystyle\DeclareMathOperator*{\K}{K}S=b_0+\K_{n=1}^{\infty}\frac{a_n}{b_n}$ where $b_0=1$, $b_1=2$, $a_1=2$, and for $n\geq 2$, $a_n=-n^{2n-1}$ and $b_n=n^n+(n+1)^n$. $\endgroup$
    – GPhys
    Commented Jun 16, 2017 at 16:58
  • 3
    $\begingroup$ Is there any context to this problem, i.e. is it well known that the series is an irrational number? $\endgroup$
    – Ivan
    Commented Jun 17, 2017 at 17:39
  • 1
    $\begingroup$ Computation seems to suggest a simple approach based on a Liouville approximation theorem is actually hopeless regardless of how clever your approximations are (at least when using the series as given): Table[N[Sum[n!/n^n,{n,m+1,Infinity}]-c/Denominator[Sum[n!/n^n,{n,1,m}]]],{m,1,20}] $\endgroup$
    – GPhys
    Commented Jun 18, 2017 at 14:08

2 Answers 2


I couldn't mimic the proof of irrationality of $e$ but here goes my atempt ...

To prove the irrationality of $S=\sum_{n=0}^{\infty}\frac{n!}{n^n}$ it would be enough to find an infinite continued fraction expansion. For convenience, I am redefining $S$ adding a 0th term equal to one $\frac{0!}{0^0}:=1$

We first write $S$ in the form $S=\sum_{n=0}^{\infty} a_0 \cdot a_1 \cdot a_2 \cdots a_n $. If we calculate the ratio of two consecutive terms in the original definition of $S$ we find that, for $n\ge 2$ $$\frac{\frac{n!}{n^n}}{\frac{(n-1)!}{(n-1)^{n-1}}}=(1-\frac{1}{n})^{n-1}$$

So we can write $$\frac{n!}{n^n}=(1-\frac{1}{n})^{n-1} \cdot (1-\frac{1}{n-1})^{n-2} \cdots (1-\frac{1}{2})^1$$

Seting $a_0:=1, a_1:=1$ and $a_n=(1-\frac{1}{n})^{n-1}$ for $n\ge 2$ we find that $$ S=\sum_{n=0}^{\infty} a_0 \cdot a_1 \cdot a_2 \cdots a_n $$ Now we make use of Euler's continued fraction formula: $$a_0 + a_0a_1 + a_0a_1a_2 + \cdots + a_0a_1a_2\cdots a_n = \cfrac{a_0}{1 - \cfrac{a_1}{1 + a_1 - \cfrac{a_2}{1 + a_2 - \cfrac{\ddots}{\ddots \cfrac{a_{n-1}}{1 + a_{n-1} - \cfrac{a_n}{1 + a_n}}}}}}\,$$

But this is not yet a proper continued fraction $b_0 + \cfrac{1}{b_1 + \cfrac{1}{b_2 + \cfrac{1}{ \ddots + \cfrac{1}{b_n} }}}$ and we can't make use of the result of irrationality stated above.

We can apply an equivalence transformation: $$\cfrac{x_1}{y_1 + \cfrac{x_2}{y_2 + \cfrac{x_3}{y_3 + \cfrac{x_4}{y_4 + \ddots\,}}}} = \cfrac{z_1x_1}{z_1y_1 + \cfrac{z_1z_2x_2}{z_2z_2 + \cfrac{z_2z_3x_3}{z_3z_3 + \cfrac{z_3z_4x_4}{z_4z_4 + \ddots\,}}}}$$ (which holds if all the x's, y's and z's are nonzero)

by setting $x_1:=a_0,y_1=1$ and, for $n \ge 1$ $x_n:= -a_{n-1}, y_n:=1+a_{n-1}$ and choosing the sequence of z's satisfy the relation $z_{n+1}=\frac{1}{x_{n+1} z_n}$.

So, at the end we get an infinite proper continued fraction expansion.

Hope this helps.

  • $\begingroup$ This looks promising but I'm trying to see if there are flaws. The first thing that comes to mind is: If $r\in \Bbb R$ can be expressed as an infinite continued fraction, why does that imply that $r$ is irrational? Perhaps it is possible for $r$ to be expressed as a finite continued fraction, or in some other rational form, as well as the infinite continued fraction. Of course, if $r$ can be expressed as a finite continued fraction then $r$ is rational but that is not the same as the statement you have used. $\endgroup$ Commented Sep 9, 2017 at 20:31
  • $\begingroup$ True. The assertion that a number is irrational if a contitued fraction expansion is infinite is not completely true. It only holds if the expansion is obtained by a certain method that involves finding the integer part of the reciprocal of the residue of the last aproximation. Thats why I tried to give it the standard form [b0;,b1,b2,...] with the b's being positive integers. $\endgroup$ Commented Sep 10, 2017 at 17:13
  • $\begingroup$ To be more precise, if $x$ is a positive real number and we define $x_1=x, b_1=[x_1]$ and, for $n \ge 1$, $b_{n+1}=[x_n], x_{n+1}=\frac{1}{x_n-b_n}$ then the sequence of b's becomes eventually equal to one if and only if $x$ is rational; and these b's are the terms of the contiuned fraction expansion of $x$. $\endgroup$ Commented Sep 10, 2017 at 17:24
  • $\begingroup$ If the $b_n$ are eventually equal to $1$ doesn't that give an infinite CF expansion (related to $\sqrt{2}$)? At any rate, I'd be interested to see how this statement was proven, although perhaps it requires advanced methods. $\endgroup$ Commented Sep 11, 2017 at 16:59

This doesn't answer the question.


Wolfy calculates it as


and the inverse symbolic calculator doesn't know, so I would be surprised if there is a reasonable formula.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .