If we wish to count all numbers that have at least one 3 in them between 1 and 10,000, we can can do this and get the right answer:10^log(10000) - 9^log(10000) =10^4 - 9^4 =3,439 numbers with at least one 3 in them. But, if we wish to count the numbers between 1 and, say, 5,000 and use the above method:10^log(5000) - 9^log(5000) =~1,614, which is not accurate. The accurate number is 2,084 numbers with at least one 3 in them. Why does it work for 10,000 but not for 5,000? Thanks for any help.

Guest Apr 25, 2019

edited by
Guest
Apr 26, 2019

#1**0 **

I think the reason why it works for 10,000, but not for 5,000 is as follows:

1 - Each of the 10 digits[0 to 9] must be EQUALLY represented up to a 1000, since there are: 10 digits x 10 blocks of 100 numbers each =1000. As you can see in this breakdown of all the 10 digits between 1 and 1000:

[189, 300, 300, 300, 300, 300, 300, 300, 300, 300]. Zero(189) is an exception due to the peculiarity of the decimal system.

2- In order for all 10 digits to be equally distributed, you have to go up the numberline in powers of 10. Therefore, the next block will be:1000 x 10^1 =10,000, when all the 10 digits will be EQUALLY represented again. The following breakdown illustrates the case.

[2889, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000, 4000]. Again, zero is the exception.

3- To show the distribtion of all 10 digits up to limit that is NOT a power of 10, the following couple of example illustrates that very clearly: From 1 to 5000 you have the following: [1389, 2500, 2500, 2500, 2500, 1500, 1500, 1500, 1500, 1500]. As can be clearly seen, the distribution of the 10 digits is anything but equal, the first 5 being quite different from the last 5.

From 1 to 15,000 the distribution is skewed like this:

[5389, 11500, 6500, 6500, 6500, 5500, 5500, 5500, 5500, 5500]. Again, they are anything but equal.

4 - The next EQUAL distributions would be powers of 10, namely:10,000 x 10^1 =100,000 which has the following EQUAL distribution:[38889, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000]. And the last, for this pupose, would be:100,000 x 10^1 =1,000,000, which has the following EQUAL distribution: [488889, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000].

5- I hope that this is a satisfactory explanation to your question.

Guest Apr 27, 2019