Find the number of integers between 1 and 250 both inclusive that are divisible by any of the integers 2, 3, 5
Answers
Answered by
4
Step-by-step explanation:
I'll denote {x|n} be the set of integers x <= 250 that divide n.
By inclusion-exclusion principle, the number of integers is {x|2} + {x|5} + {x|7} - {x|2,5} - {x|2,7} - {x|5,7} + {x|2,5,7} (this is so that we don't overcount or undercount certain numbers like 10 or 140).
Hence, the number of integers is 125 + 50 + 35 - 25 - 17 - 7 + 3 = 164.
Similar questions