Determine how many positive integers are $\leq 500$ and divisible by at least one between $6$, $10$ and $25$.
I used sets to do this exercise.
$B_1 = 500/6 = 83$
$B_2 = 500/10 = 50$
$B_3 = 500/25 = 20$
$B_1 \cap B_2 = 16$
$B_1 \cap B_3 = 6$
$B_2 \cap B_3 = 10$
$B_1 \cap B_2 \cap B_3 = 3$
$|B_1| + |B_2| + |B_3| - 2|B_1 \cap B_2| -2|B_1 \cap B_3| -2|B_2 \cap B_3| +3|B_1 \cap B_2 \cap B_3| = 83 + 50 + 20 - 32 - 12 - 20 + 9 = 98$
Please tell me if I made mistakes, thank you.
Hint. By Inclusion–exclusion principle, it should be $$|B_1\cup B_2\cup B_3|=|B_1| + |B_2| + |B_3| - |B_1 \cap B_2| -|B_1 \cap B_3| -|B_2\cap B_3| +|B_1 \cap B_2 \cap B_3|.$$
P.S. Note that $|B_1\cap B_3|=\lfloor 500/\text{lcm}(6,25)\rfloor=\lfloor 500/150\rfloor=3$.