First occurrence of a decimal digit (source code)

= First occurrence of a decimal digit

Under uniform length on $[0,1]$, the position $K$ of the first occurrence of a fixed decimal digit has
$$
\Pr(K=k)=\frac1{10}\left(\frac9{10}\right)^{k-1}.
$$
The set of expansions in which the digit never occurs has length zero, and
$$
\mathbb E K=\sum_{k\geq1}\frac{k}{10}\left(\frac9{10}\right)^{k-1}=10.
$$