What is the cardinality of the set of integers X defined below? X = {n | 1 ≤ n…
2006
What is the cardinality of the set of integers X defined below? X = {n | 1 ≤ n ≤ 123, n is not divisible by either 2, 3 or 5}
- A.
28
- B.
33
- C.
37
- D.
44
Attempted by 275 students.
Show answer & explanation
Correct answer: B
We want the number of integers n with 1 ≤ n ≤ 123 that are not divisible by 2, 3, or 5. Two short methods are shown.
Method 1: Inclusion–exclusion
Count multiples of each prime: floor(123/2)=61, floor(123/3)=41, floor(123/5)=24.
Subtract multiples of pairwise lcms: floor(123/6)=20, floor(123/10)=12, floor(123/15)=8.
Add back multiples of lcm(2,3,5)=30: floor(123/30)=4.
Total divisible by 2, 3, or 5 = 61 + 41 + 24 − 20 − 12 − 8 + 4 = 90.
So numbers not divisible by 2, 3, or 5 = 123 − 90 = 33.
Method 2: Use blocks of 30
In each block of 30 consecutive integers, exactly φ(30)=8 integers are not divisible by 2, 3, or 5.
There are floor(123/30)=4 full blocks, giving 4 × 8 = 32 such numbers.
Remainder after 4 blocks: 123 − 4×30 = 3. Among the numbers 1, 2, 3 of the next block only 1 is not divisible by 2, 3, or 5, so add 1.
Total = 32 + 1 = 33.
Therefore the cardinality of X is 33.
A video solution is available for this question — log in and enroll to watch it.