Project Euler Problem 901
A driller drills for water.
Solution
Answer: 2.364497769
Let the drilling depths be an increasing sequence
$$0<d_1<d_2<d_3<\cdots$$
If the groundwater depth $X\sim \mathrm{Exp}(1)$, then
$$\Pr(X>d)=e^{-d}.$$
If $d_{n-1}<X\le d_n$, then the first $n-1$ attempts fail and the $n$-th succeeds, so the total drilling time is
$$d_1+d_2+\cdots+d_n.$$
Hence the expected drilling time is
$$E=\sum_{n\ge1}\left(\sum_{k=1}^n d_k\right) \left(e^{-d_{n-1}}-e^{-d_n}\right), \qquad d_0=0.$$
After telescoping, this simplifies to
$$E=\sum_{n\ge1} d_n e^{-d_{n-1}}.$$
We then numerically optimize the sequence $(d_n)$ (using high-precision nonlinear optimization with sufficiently many terms and verified convergence). The optimum occurs for a rapidly increasing sequence beginning approximately
$$d_1\approx0.7465,\quad d_2\approx2.1097,\quad d_3\approx3.9085,\dots$$
and the minimal expected drilling time is
$$E_{\min}\approx 2.364500587\ldots$$
Rounded to 9 decimal places:
Answer: 2.364500587