In a class of 120 students numbered 1 to 120, all even numbered students opt for Physics, whose numbers are divisible by 5 opt for Chemistry and those whose numbers are divisible by 7 opt for Math. How many opt for none of the three subjects?
Rephrase: "How many integers from 1 to 120 are not divisible by 2, 5 or 7?"
We start with 120 integers. Let's remove those that are divisible by any of the 3 factors above
Remove all multiples of 2 (60 evens). This leaves us with 60 odds. These are 1, 3, 5...119.
Of these, we should remove all odd multiples of 5. These are 5*1, 5*3, 5*5, 5*7...5*23 (115). There are 12 of them. Removing these leaves us with 120-60-12 integers left.
Of the 60 odds, we should also remove all odd multiples of 7. These are 7*1, 7*3, 7*5...7*17 (119). There are 9 of them. However, not all 9 need to be removed. We've already removed the multiples of 5 (7*5, 7*10, 7*15) so we cannot remove them twice. This means that we only remove 6 additional integers. Of the original 120 integers there are 120-60-12-6 left. These numbers are not multiples of 2, 5 or 7.
The answer is 42.













