Tricky customer
Charlie doesn't want his new house number to be divisible by 3 or 5. How many choices of house does he have?
Problem
Charlie wants to buy a new house but he doesn't like house numbers that are divisible by $3$ or by $5$.
If all the houses numbered between $100$ and $150$ inclusive are for sale, how many houses can he choose from?
If you liked this problem, here is an NRICH task that challenges you to use similar mathematical ideas.
Student Solutions
Answer: 27
Listing the mutliples
Multiples of 3: (99), 102, 105, ... , 150
Position relative to 99:(99), 99 + 1$\times$3, 99 + 2$\times$3, ..., 99 + 51 = 99 + 17$\times$3
Count: 1, 2, ... , 17
Multiples of 5: 100, 105, 110, ... , 150
Position relative to 100: 100, 100 + 1$\times$5, 100 + 2$\times$5, ... , 100 + 10$\times$5
Count: 1, 2, ... , 10
11
17 + 11 = 28 numbers not allowed
But some numbers (like 105 and 150) are in both lists! They are multiples of 3 and 5 ie multiples of 15
105, 120, 135, 150 are counted twice
28$-$4 = 24 numbers not allowed
Out of 51 houses altogether
51$-$24 = 27 houses allowed.
Counting the multiples
There are $51$ houses numbered from $100$ to $150$ inclusive. Of these, $17$ are multiples of $3$, eleven are multiples of $5$ and four are multiples of both $3$ and $5$. So the number of houses Charlie can choose from is $$51-(17+11-4) = 27.$$