The statistics of occurence of a digit (say 0) in a number of n digits in base b is $\frac{n}{b}$. If we count these occurences using combinatorics, we find that : $\frac{n}{b}=\frac{\sum _{p=0}^{n}p{\left(b-1\right)}^{n-p}{C}_{n}^{p}}{{b}^{n}}$