Learn / Library / Combinatorics
Multiples of either number
How many integers from to are divisible by or by (or by both)?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Add both counts of multiples, then fix the overlap.
Solution
- There are multiples of and multiples of in this range.
- A number divisible by both is a multiple of , and there are of those, counted in both lists.
- The answer is .
Answer: