The number of 4-digit numbers which are neither multiple of 7 nor multiple of 3 is ______ .
Solution
Core idea. Numbers in neither of two sets are the total less the union.
Concept refresher. For two sets inside a universal set ,
and the number of elements in neither is .
Picture the situation. The four-digit numbers run from 1000 to 9999, which is 9000 numbers. Inside this collection are the multiples of 7 and the multiples of 3, which overlap in the multiples of 21. The numbers asked for are those outside both circles of the diagram.
Approach. Count each set and the overlap, find the union, and subtract from the total.
Step 1: The counts
There are 9000 four-digit numbers. The multiples of 7 run from 1001 to 9996, which is 1286; the multiples of 3 run from 1002 to 9999, which is 3000; the multiples of 21 run from 1008 to 9996, which is 429.
Step 2: The union
Counting the multiples of 21 once, the multiples of 7 or 3 number .
Step 3: Neither
So the numbers that are multiples of neither are .
Answer. 5143
Sanity check. The fraction of numbers that avoid both 7 and 3 is , and .
Common wrong answers
- 4714: Not adding back the multiples of 21 gives .
Key takeaway
The trap. The common multiples are removed twice unless they are added back once.
How toppers think. They check with the product of the fractions that avoid each divisor.
Remember. Neither:
More on Inclusion–Exclusion Principle
- The number of seven-digit numbers, that can be formed by using the digits 1, 2, 3, 5 and 7 such that each…
- The number of permutations, of the digits 1, 2, 3, …, 7 without repetition, which neither contain the string…
- The total number of 4-digit numbers whose greatest common divisor with 54 is 2, is
- All 7 on Inclusion–Exclusion Principle ›