Big Blackboard
Can you work out which numbers between 1 and 2016 have exactly two of 2, 3, 4 as factors?
Problem
The whole numbers from 1 to 2016 are written on a blackboard.
Moritz underlines all the multiples of two in red, all the multiples of three in blue, and all the multiples of four in green.
How many numbers does Moritz underline exactly twice?
This problem is taken from the UKMT Mathematical Challenges.
Student Solutions
Answer: 504
Underlined twice: multiples of 4 (i.e. 2 and 4) but not of 3 (red and green)
multiples of 6 (i.e. 2 and 3) but not of 12 (red and blue)
Multiples of 4 but not of 3 includes $\frac23$ of the multiples of 4, starting with the first two (4 and 8)
2016$\div$4 = 504 multiples of 4
504$\div$3 = 168 of those are also multiples of 3
504 $-$ 168 = 336 are underlined exactly twice
2016$\div$6 = 336 multiples of 6
336$\div$2 = 168 multiples of 12
Also 168 multiples of 6 which are not multiples of 12
168 + 336 = 504