SOLUTION: How many counting numbers less than one million contain the digit 2?

Algebra.Com
Question 934680: How many counting numbers less than one million contain the digit 2?
Answer by Edwin McCravy(20054)   (Show Source): You can put this solution on YOUR website!
From the 999999 positive integers less than 1 million,
we must subtract: 

the number of non-negative integers that 
consist only of the 9 digits 0,1,3,4,5,6,7,8,9:

To find the number to subtract we will do it as if we could include 0,
and then subtract 1

If we include 0, we can consider these all to be the 6-digit numbers: 

000000, 000001, 000003, 000004, ..., 999999.

There are 9 ways to choose the first digit, 9 ways to choose
the second digit, etc., and 9 ways to choose the sixth digit.

That's 96 = 531441, including 0, and 531440, not including 0.

Answer: 999999-531440 = 468559

Edwin

RELATED QUESTIONS

How many numbers less than 1 million do not contain the digit... (answered by KMST)
how many 5 digit counting numbers contain at least one 6 (answered by MathLover1,Sonny12345,ikleyn)
How many three-digit counting numbers are there that are less than 300 such that all the... (answered by Zoop)
How many three-digit counting numbers that are less than 300 are there such that all the... (answered by 303795)
How many three-digit counting numbers less than 500 have digits that are all... (answered by Boreal,ikleyn)
How many three-digit counting numbers do not contain any of the digits 1, 5, 7, 8, or... (answered by stanbon)
A.)How many odd three-digit counting numbers less than 300 can be found given that the... (answered by stanbon)
how many counting numbers between 100 and 1000 have at least one 2 as a... (answered by stanbon)
How many 5-digit numbers contain at least one... (answered by Edwin McCravy)