Hi, I am not sure what you mean. I guess there is a right tool for the right job kind of thing. Solving it logically is easier in this case. You will use "set" theory to include / remove overlap values or invalid values.
If I need numbers divisible by 2 & 3 = That means, Numbers divisible by 6
To find total number of integers divisible by 2 and 3 in 1000 = |1000 / 6| = 166
So not divisble by 2& 3 = 1000 - 166 = 834
Total Number of integers divisible by 2 or 3 => needs more explanation. Is it 2 or 3 but should not be divisible by 4,6, 8, 9 , 10? Or is it allowed? because it just depends on the question actually. Sorry.