Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Deceptively Simple Integer Problem

  1. Oct 5, 2010 #1
    [b


    2. Relevant equations

    none

    3. The attempt at a solution


    1. The problem statement, all variables and given/known data



    2. Relevant equations



    3. The attempt at a solution
     
    Last edited: Oct 6, 2010
  2. jcsd
  3. Oct 5, 2010 #2

    Mark44

    Staff: Mentor

    You're forgetting to add 71, 72, 73, ...,76, 78, 79 and 171, 172, 173, ...,176, 178, 179
     
  4. Oct 6, 2010 #3
    Well you know that for the hundreds it does not appear once, since the problem does not go up to 700. As for the tens you get all the all the 70's (70 through 79) and all the 170's (170 through 179). As for the ones you get one every 10 digits (7, 17, 27...187, 197).


    I do not get why the answer is 38 instead of 40. Like you said, there are 1 7 every 10 numbers, which gives you 20 7's, But if you add 70...79 and 170...179 together, you get 20 more 7's, which gives you a grand total of 40 7's.
     
  5. Oct 6, 2010 #4

    Mark44

    Staff: Mentor

    You counted two numbers twice: 77 and 177.

    Every tenth number starting with 7: {7, 17, 27, 37, ..., 77, 87, ...,167, 177, 187, 197}
    70's group: {70, 71, 72, ... , 76, 77, 78, 79}
    170's group: {170, 171, 172, ... , 176, 177, 178, 179}
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook