The statistics of occurence of a digit (say 0) in a number of n digits in base b is nb. If we count these occurences using combinatorics, we find that : nb=p=0npb-1n-pCnpbn