Finding Integers Divisible by 2, 3 or 5 - Solve Here!

  • Thread starter Thread starter Physics is Phun
  • Start date Start date
  • Tags Tags
    Integers
AI Thread Summary
The discussion focuses on calculating the number of integers between 1 and 100 that are divisible by 2, 3, or 5 using the sum rule. The initial calculation resulted in an incorrect total of 70 instead of the correct answer, 74. Participants clarify that the overlap of integers divisible by all three numbers (2, 3, and 5) must be accounted for, specifically by adding back the count of those divisible by 30. The importance of accurate arithmetic and proper application of the inclusion-exclusion principle is emphasized. The conversation concludes with participants gaining clarity on the method after reviewing examples.
Physics is Phun
Messages
100
Reaction score
0
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 can't 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.
 
Physics news on Phys.org
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 got to 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
 
Physics is Phun said:
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
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.
 
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.
 
I still don't 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)
 
Parth Dave said:
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.
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:
 
ok I get it now. I just had to reread ur post parth dave.
thanks
:)
 
Back
Top