For each positive integer $n$, consider a cinema with $n$ seats in a row, numbered left to right from 1 up to $n$. There is a cup holder between any two adjacent seats and there is a cup holder on the right of seat $n$. So seat 1 is next to one cup holder, while every other seat is next to two cup holders. There are $n$ people, each holding a drink, waiting in a line to sit down. In turn, each person chooses an available seat uniformly at random and carries out the following.
- If they sit next to two empty cup holders, then they place their drink in the left cup holder with probability $\frac{1}{2}$ or in the right cup holder with probability $\frac{1}{2}$.
- If they sit next to one empty cup holder, then they place their drink in that empty cup holder.
- If they sit next to zero empty cup holders, then they hold their drink in their hands.

Let $p_{n}$ be the probability that all $n$ people place their drink in a cup holder.
Determine $p_{1}+p_{2}+p_{3}+\cdots$
Let us set $p_{0}=1$ and observe that $p_{1}=1$. We can also calculate that $p_{2}=\frac{3}{4}$. Indeed, if $n=2$ and the first person occupies seat 1 , then both people manage to place their drink in a cup holder. If the first person occupies seat 2 , then with probability $\frac{1}{2}$ they will place their drink to their right, leaving the other cup holder free for the other person. So the probability of success is
$$
\frac{1}{2} \times 1+\frac{1}{2} \times \frac{1}{2}=\frac{3}{4} .
$$

Now we derive a recurrence relation for $p_{1}, p_{2}, p_{3}, \ldots$. Consider the case of $n+1$ seats and suppose that the first person to arrive occupies seat $k$.
- If $k=1$, then there is only one cup holder available to the first person and thereafter, the same process starts again with the remaining $n$ people and $n$ seats. So in this case, the probability of success is $p_{n}$.
- If $k>1$ and the first person places their drink in the cup holder to their left, then the $k-1$ seats to their left have access to only $k-2$ cup holders. So it is impossible for everyone to place their drink in a cup holder. So in this case, the probability of success is 0 .
- If $k>1$ and the first person places their drink in the cup holder to their right, then the $k-1$ seats to their left and the $n-k+1$ seats to their right will become two independent versions of the same processes. So in this case, the probability of success is $p_{k-1} \times p_{n-k+1}$.

Since the probability that the first person occupies a particular seat is $\frac{1}{n+1}$, we obtain the following.
$$
\begin{aligned}
p_{n+1} & =\frac{1}{n+1} \times p_{n}+\frac{1}{n+1} \times \frac{1}{2} \times \sum_{k=2}^{n+1} p_{k-1} \times p_{n-k+1} \\
& =\frac{1}{n+1} \times p_{n}+\frac{1}{n+1} \times \frac{1}{2} \times \sum_{k=1}^{n} p_{k} \times p_{n-k} \\
& =\frac{1}{2(n+1)} p_{n}+\frac{1}{2(n+1)} \sum_{k=0}^{n} p_{k} p_{n-k}
\end{aligned}
$$

Now consider the formal power series
$$
P(x)=\sum_{n=0}^{\infty} p_{n} x^{n} .
$$

From the recurrence relation for $p_{n}$, we know that it satisfies the following equation.
$$
\begin{aligned}
\frac{\mathrm{d} P}{\mathrm{~d} x} & =\sum_{n=0}^{\infty}(n+1) p_{n+1} x^{n} \\
& =\sum_{n=0}^{\infty} \frac{1}{2} p_{n} x^{n}+\sum_{n=0}^{\infty} \frac{1}{2} \sum_{k=0}^{n} p_{k} p_{n-k} x^{n} \\
& =\frac{1}{2} P(x)+\frac{1}{2} P(x)^{2}
\end{aligned}
$$

This ordinary differential equation may be solved by separation of variables and combined with the initial condition $P(0)=1$ to obtain the solution
$$
P(x)=\frac{e^{x / 2}}{2-e^{x / 2}} .
$$

Therefore, we obtain
$$
\sum_{n=1}^{\infty} p_{n}=P(1)-1=\frac{2 \sqrt{e}-2}{2-\sqrt{e}} .
$$

Comments
A formal power series that stores a sequence of numbers as its coefficients - such as $P(x)$ in the solution above - is usually referred to as a generating function.

The answer $\frac{2 \sqrt{e}-2}{2-\sqrt{e}}$ is $3.69348450 \ldots$.