What are some surprising appearances of $e$?

I recently came across the following beautiful and seemingly out-of-the-blue appearance of $e$:

$E[\xi]=e$, where $\xi$ is a random variable that is defined as follows. It's the minimum number of $n$ such that $\sum_{i=1}^n r_i>1$ and $r_i$ are random numbers from uniform distribution on $[0,1]$.

I can think of several more almost magical applications of $e$,$^\dagger$ but I would like to hear of some instances where you were surprised that $e$ was involved.

I would like to collect the best examples so as to be able to give some of the high-school students I tutor in math a sense of some of the deep connections between different areas of math that only really become apparent at the university level. These deep connections have always made me want to learn more about math, and my hope is that my students would feel the same way.

EDIT (additional question): A lot of the answers below come from statistics and/or combinatorics. Why is $e$ so useful in these areas? In general, I'd very much appreciate if answerers included some pointers as to how one can get an intuition about why $e$ appears in their case (or indeed, how they themselves make sense of it) - this would greatly help me in presenting these great examples.


$^\dagger$For instance that its exponential function is its own derivative, its relation to the trigonometric functions, its use in Fourier transformation, transcendence, etc., all of which I must admit I don't really understand (perhaps except for the first one, which I take to be the definition of $e$), as in "what is it about $e$ that makes it perfect for representing complex numbers, or changing from one basis to another, etc.?"


We have

$$e=\lim_{n\to\infty}\sqrt[\large^n]{\text{LCM}[1,2,3,\ldots,n]},$$

where LCM stands for least common multiple. The proof can be found here.


$e$ appears in the number of derangements

The formula for the number of derangements of length $n$ turns out to be $$n! \cdot \sum_{j=0}^n \frac{(-1)^j}{j!}$$

Since the second part is just the standard series for $e^{-1}$ this can also be written as $$\bigl[ \frac{n!}{e} \bigr]$$ where $[ . ]$ denotes the closest integer.

This also implies that the percentage of derangements among all permutations approaches, as $n \to \infty$ the number $\frac{1}{e}$.


My favourite, also in the area of probability, is the secretary problem. Copied (with editing) from the Wikipedia site:

The task is to hire the best of $n$ applicants for a position. The applicants are interviewed one by one in random order. A decision about each one must be made immediately after the interview. Once rejected, an applicant cannot be recalled. During the interview, the interviewer can rank the applicant among all those interviewed so far, but is unaware of the quality of yet unseen applicants.

If you interview all applicants, then you are obliged to pick the last one. Is there a better strategy?

The answer is yes: interview $n$/e of the candidates (to the nearest whole number) and then choose the first of the remaining candidates who is better than any of those interviewed before; if none of them are, up to candidate $n-1$, then you still have to choose candidate $n$.


An almost magical appearance of $e$ comes from Pascal's Triangle. Let $s_n$ be the product of the terms on the $n$-th row of the Pascal's Triangle, that is:

$$s_n=\prod_{k=0}^n\binom{n}{k}$$

Then

$$\lim_{n\to \infty}\frac{s_{n-1}s_{n+1}}{s_n^2}=e$$ A proof of this fact can be found here. I think it's one of the things that struck me the most about Pascal's Triangle, and nowadays, it stills surprises me.


Here's a nice (longish) one.

A sequence of numbers $x_1,x_2,...$ is generated randomly from $[0,1]$. This process is continued so long as the sequence is monotonically increasing or monotonically decreasing.

Q: What is the the expected length of the monotonic sequence?

The probability that the length $L$ of the monotonic sequence is greater than $k$ is given by $$P(L>k) = P(x_1<x_2<\cdots<x_{k+1})+P(x_1>x_2>\cdots>x_{k+1})$$

$$ = \frac{1}{(k+1)!} + \frac{1}{(k+1)!}$$

$$ = \frac{2}{(k+1)!}$$

If we now call $P(L=k)$ by $p_k$, the expected length of the monotonic sequence is $$E(L) = 2p_2+3p_3+\cdots+np_n+\cdots$$

We can write this as,

$$E(L) = 1+1+P(L>2)+P(L>3)+P(L>4)\cdots$$

$$ = 1+1+2\bigg(\frac{1}{3!}+\frac{1}{4!} +\frac{1}{5!} +\frac{1}{6!}+\cdots\bigg)$$

$$=1+1+2\bigg(e-\frac{5}{2}\bigg)$$

$$= 2e-3$$

Tada!