Question on multiples of 3 as well as multiples of either 4 or 5? I was looking through the textbook and came across this question.
How many positive integers not exceeding 2000 are multiples of 3 as well as multiples of either
4 or 5?
Not sure if I did it right, kindly advise
multiple of 3: 2000/3 = 666
"" 4: 500
"" 34: 166
"" 35: 133
"" 45: 100
"" 34*5: 33
Answer: 666 + 500 - 166 - 133 - 100 + 33 = 800
Please advise.
 A: Let $A_n$ denotes the set of all numbers below (and including) $2000$ which are multiples of $n$. By definition, we have $A_i\cap A_j = A_{\mathrm{lcm}(i,j)}$. Now
\begin{align}
|A_3\cap(A_4\cup A_5)|&=|(A_3\cap A_4)\cup(A_3\cap A_5)|\\
&=|A_{12}\cup A_{15}|\\
&=|A_{12}|+|A_{15}|-|A_{12}\cap A_{15}|\\
&=|A_{12}|+|A_{15}|-|A_{60}|\\
&=\left\lfloor\dfrac{2000}{12}\right\rfloor+\left\lfloor\dfrac{2000}{15}\right\rfloor-\left\lfloor\dfrac{2000}{60}\right\rfloor\\
&=166+133-33\\
&=\boxed{266}
\end{align}
A: You have it almost correct. But doesn't it seem weird that the resulting answer 800 is greater than 666, i.e. there are more numbers that are multiples of 3 as well as multiples of either 4 or 5,   than just numbers that are multiples of 3? :D
The correct summands should be 166 + 133 - 33=266. Why? because you add those that are divisible by 3&4, then add those which are divisible by 3&5. But you counted twice some numbers. Which? Those that are divisible by both 3&4&5.
Hope it helps :)
A: Since we are interested in the multiples of ($3$ and $4$) and ($3$ and $5$) we have to sum up all the multiples of $12$ (least common multiple of $3$ and $4$) and all the multiples of $15$ (least common multiple of $3$ and $5$). Moreover we have to subtract all the multiples of $60$ (least common multiple of $12$ and $15$) since the multiples of $60$ would be counted twice (e.g. $60$ is both divisible by ($3$ and $4$) and by ($3$ and $5$).
So I'd say that the solution is something like
$$
n = 2000//12 + 2000//15 - 2000//60
$$
Where $//$ is an integer division.
A: Let $A$ and $B$ be the sets of multiples of $12$ less than or equal to $2000$ and of $15$ less than or equal to $2000$ respectively.
Then, $\vert{A}\vert=\lfloor\frac{2000}{12}\rfloor=166$ and $\vert{B}\vert=\lfloor\frac{2000}{15}\rfloor=133$. Also, $\vert{A \cap B}\vert=\lfloor\frac{2000}{\operatorname{lcm}(12,15)}\rfloor=\lfloor\frac{2000}{60}\rfloor=33$.
So, $\vert{A \cup B}\vert=166+133-33=266$.
