In how many ways can a number be chosen from 1 to 20 such that it is a multiple of 2 or 3

combinatorics

In how many ways can a number be chosen from $1$ to $20$ such that it is a multiple of $2$ or $3$?

Numbers that are multiple of $2=\{4,6,8,10,12,14,16,18,20\}$ $=>9$ choices

Numbers that are multiple of $3=\{6,9,12,15,18\}$ $=>5$ $=>5$ choices

Hence there are $14$ choices. But this answer is scored as the wrong answer. How to solve this problem correctly?

Best Answer

There are $10$ numbers,$[\frac{20}{2}]=10$, can divisible by $2$

There are $6$ numbers,$[\frac{20}{3}]=6$ can divisible by $3$

There are $3$ numbers,$[\frac{20}{6}]=3$, can divisible by $6=2\times 3$

by inclusion-exclusion princible

$n(A\cup B) = n(A)+n(B)-n(A \cap B)= 10+6-3=13$

Related Question