1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding the integers

  1. Jan 8, 2005 #1
    We have a question that asks to find the number of integers between 1 and 100 that are divisible by 2,3 or 5.
    So i use the sum rule

    let E,F and G be the the integers. so,
    n(EUFUG) = n(E) + n(F) + n(G) - n(EnF) - n(EnG) - n(FnG)
    but this doesn't work. it gives me the answer of 70 but the actual answer is 74. Since I know the answer is 74 this one doesn't matter but the next question asks to find the number of integers between 1 and 100000. So it's obvious that I cant count them.
    just to make sure I did the above part right
    n(EUFUG) would be 100/2 + 100/3 + 100/5 - 100/6 - 100/10 - 100/15 correct?
    I hope somone can figure out where i've gone wrong.
     
  2. jcsd
  3. Jan 8, 2005 #2
    you forget to add the number divisible by both 2,3,5, in your notation, it is n(EnFnG)
    2*3*5=30, so, you gotta add 3 in your final answer, one more thing,n(E) + n(F) + n(G) - n(EnF) - n(EnG) - n(FnG)=71 instead of 70, you made a arithmatic mistake, also
     
  4. Jan 8, 2005 #3

    ShawnD

    User Avatar
    Science Advisor

    I'm not familiar with what you are doing, but wouldn't you also need to subtract 100/30? 100/6 would be the ones common between 2 and 3, 100/10 would be the ones common between 2 and 5, 100/15 would be the ones common between 3 and 5, and 100/30 would be the ones common between 2, 3, and 5.
    Of course it would make you even farther from the "correct" answer, but I'm just saying.
     
  5. Jan 8, 2005 #4
    the ones that are common to 2, 3, and 5 were taken care of when you took account for the other combinations. Not only that, but it was subtracted twice. Thats why you have to add it again.
     
  6. Jan 8, 2005 #5
    I still dont get it. when using the sum rule, you add the parts together, the subract the overlaping sections. I don't see why n(EnFnG) needs to be added. and thanks for the arithemtic point out. I was adding the exact values and not rounding each section which actually makes the answer more wrong (unlike most math problems)
     
  7. Jan 8, 2005 #6

    ShawnD

    User Avatar
    Science Advisor

    I was going to challenge you on that, but I guess you're right. Try it with 1, 2, and 3 between 1 and 10. The real answer is obviously 10, so it's easy to check the method.
    Here are each of em:
    10/1 = 10, 10/2 = 5, 10/3 = 3. Sum: 18
    The common between 2:
    10/2 = 5, 10/3 = 3, 10/6 = 1. Sum: 9
    The common between 3:
    10 / 6 = 1
    Subtract the ones common between 2 from from the single ones:
    18 - 9 = 9. We're trying to get to 10, so add the one common between all 3 to get 10 :biggrin:
     
  8. Jan 8, 2005 #7
    ok I get it now. I just had to reread ur post parth dave.
    thanks
    :)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Finding the integers
  1. Definite Integ (Replies: 5)

  2. Little integer problem (Replies: 3)

Loading...