How many 5-digit numbers have at least one 2 or one 3 among their digits?

ANotSmartPerson
Oct 18, 2018

#1**+2 **

There are 99,999 - 10,000 + 1 = 90,000 five digit numbers

This equals 90,000 less the integers that contain no 2's or 3's

We have 7 ways to pick the leading digit [ since 0 cannot lead ] and 8 ways to pick each of the other 4 digits

So 7 * 8^4 = 28,762

So 90,000 - 28,762 = 61328 integers

CPhill
Oct 18, 2018

#3**0 **

Of all the numbers between 10,000 and 99,999 =90,000 numbers, there are 300 2s in every 1,000 numbers. From this 300 will subtract repeats of which there are 10 per 1,000, namely:22, 122, 222, 322, 422, 522, 622, 722, 822, 922. That leaves us with 300 - 10 =290 numbers with 2s in them. So, **290 x 90,000/1,000 =26,100 **

In the 4th position, we have 1,000 2s x 9 =**9,000 2s.** Such as:12,000, 22,000, 32,000, 42,000, 52,000, 62,000, 72,000, 82,000, 92,000.

In the 5th position, we have** 10,000 2s**, namely:20,000 to 29,999. So, in total, we have:

**26,100 + 9,000 + 10,000 =45,100 numbers with 2s between 10,000 and 99,999.** This is in accord with the following computer count of ALL digits between 10,000 and 99,999, which adds 900 repeated(or 10 x 90,000/1,000) 2s to the count:

**(0=36 000, 1=46 000, 2=46 000, 3=46 000, 4=46 000, 5=46 000, 6=46 000, 7=46 000, 8=46 000, 9=46 000) The above applies exactly the same to 3s =45,100.**

Guest Oct 19, 2018