Results 1 to 7 of 7

Math Help - Numbers less than a million containing the digit 2.

  1. #1
    Newbie
    Joined
    Apr 2009
    Posts
    4

    Numbers less than a million containing the digit 2.

    The question is, how many numbers less than 1,000,000 contain the digit 2?

    I am getting 600,000. It's too much to type out but I'm using this format.

    1 10 10 10 10 10 = 100,000
    10 1 10 10 10 10 = ""
    10 10 1 10 10 10 = ""
    10 10 10 1 10 10 = ""
    10 10 10 10 1 10 = ""
    10 10 10 10 10 1 = ""
    = 600,000
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,383
    Thanks
    1474
    Awards
    1
    Quote Originally Posted by Mohron View Post
    The question is, how many numbers less than 1,000,000 contain the digit 2?
    There are 9^6 - 1 positive integers less than 1,000,000 that do not contain the digit 2.
    So how many do?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2009
    Posts
    4
    Quote Originally Posted by Plato View Post
    There are 9^6 - 1 positive integers less than 1,000,000 that do not contain the digit 2.
    So how many do?
    OK, so 468,560? How do you know there are (9^6) - 1 positive integers that don't contain 2? Like any chance you have work to show?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,383
    Thanks
    1474
    Awards
    1
    Quote Originally Posted by Mohron View Post
    OK, so 468,560? How do you know there are (9^6) - 1 positive integers that don't contain 2? Like any chance you have work to show?
    Actually it is 468,559. 000000 is not a positive integer.
    There are six places that can be filled with nine non-2 digits.
    But we don't count 000000.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,546
    Thanks
    539
    Hello, Mohron!

    Sorry, your approach has a lot of duplication . . .


    How many numbers less than 1,000,000 contain the digit 2?
    I am including 6-digit numbers with leading zeros.
    After all, the number 003279 can represent the number 3279.

    I solved it two ways:
    . . [1] counting the numbers containg a 2
    . . [2] counting the numbers without a 2 and subtracting from 999,999.
    And my answers agreed!

    I'll do it head-on (Method 1) . . .


    Numbers with exactly one 2:
    There are 6 positions for the 2.
    The other five digits have 9 choices each: . 9^5 ways.
    . . There are: . 6\cdot9^5 \:=\:{\color{blue}354,\!294} numbers with one 2.

    Numbers with exactly two 2's:
    There are {6\choose2} = 15 positions for the two 2's.
    The other four digits have 9 choices each: . 9^4 ways.
    . . There are: . 15\cdot9^4 \:=\:{\color{blue}98,\!415} numbers with two 2's.

    Numbers with exactly three 2's:
    There are {6\choose3} = 20 positions for the three 2's.
    The other three digits have 9 choices each: . 9^3 ways.
    . . There are: . 20\cdot9^3 \:=\:{\color{blue}14,\!580} numbers with three 2's.

    Numbers with exactly four 2's:
    There are {6\choose4} = 15 positions for the four 2's.
    The other two digits have 9 choices each: . 9^2 ways.
    . . There are: . 15\cdot9^2 \:=\:{\color{blue}1,\!215} numbers with four 2's.

    Numbers with exactly five 2's:
    There are {6\choose5} = 6 positions for the five 2's.
    The other digit has 9 choices: . 9 ways.
    . . There are: . 6\cdot9 \:=\:{\color{blue}54} numbers with five 2's.

    Numbers with exactly six 2's:
    There is one number with six 2's (namely, 222,222).


    Therefore, the number of 6-digit numbers that contain a 2 is:

    . . 354,\!294 + 98,\!1415 + 14,\!580 + 1,\!215 + 59 + 1 \;=\;\boxed{468,\!559}

    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Apr 2009
    Posts
    4
    Quote Originally Posted by Plato View Post
    Actually it is 468,559. 000000 is not a positive integer.
    There are six places that can be filled with nine non-2 digits.
    But we don't count 000000.
    (9^6) = 531,441
    (9^6) - 1 = 531,440

    1,000,000 - 531,440 = 468,560

    So it is not 468,559 correct? I took into account the (- 1)

    Thanks for the help by the way. Greatly appreciated!
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,383
    Thanks
    1474
    Awards
    1
    Quote Originally Posted by Mohron View Post
    (9^6) = 531,441
    1,000,000 - 531,440 = 468,560
    There are only 999,999 positive integers less than 1,000,000.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Three-digit numbers
    Posted in the Number Theory Forum
    Replies: 0
    Last Post: June 6th 2011, 10:50 PM
  2. three digit numbers
    Posted in the Math Challenge Problems Forum
    Replies: 14
    Last Post: November 19th 2010, 12:06 PM
  3. Replies: 4
    Last Post: October 31st 2010, 03:06 PM
  4. six digit numbers...
    Posted in the Discrete Math Forum
    Replies: 8
    Last Post: September 15th 2010, 10:25 AM
  5. Four-Digit Odd Numbers
    Posted in the Statistics Forum
    Replies: 2
    Last Post: September 10th 2009, 12:50 PM

Search Tags


/mathhelpforum @mathhelpforum