Solution (source code)

= Solution

The normalized <log-uniform distribution> here has density $1/(x\log10)$. A leading digit $i$ corresponds to $i\le X<i+1$, so
$$
\boxed{\mathbb P(D=i)=\frac1{\log10}\int_i^{i+1}\frac{dx}{x}
=\log_{10}(1+1/i),\qquad i=1,\ldots,9.}
$$
These are exactly the <Benford law> probabilities. Continuous densities make endpoint conventions immaterial.