Monday, October 16, 2017

Almost All Numbers Contain the Digit Three

My mind was blown today when I came across the assertion (and proof!) that almost all numbers contain the digit '3'.

For small numbers of a given length of digits, you can count the ones that contain the digit '3'. You can see these values in the following table:

Number of digits Examples % Containing 3
1 (0-9) 3 10% (1)
2 (0-99) 3,13,23,30,31,32,33,34,35,36,37,38,39,43,53,... 19% (19)
3 (0-999) 3,13,...,30-39,...,300-399,430-439,... 27% (271)

You can count them by hand, but the count 'C' for any given number of digits 'n' is given by the following formula:

C = 10^n - 9^n

Thus the percentage is given by:

% = (10^n - 9^n) / 10^n
% = (10^n / 10^n) - (9^n / 10^n)
% = 1 - (9/10)^n

Taking the limit of this a n -> inf and you see that % = 1.

James Grimes does an excellent job of explaining it in this video:
https://www.youtube.com/watch?v=UfEiJJGv4CE

No comments:

Post a Comment