HINTS ABOUT
LEAST COMMON MULTIPLES
(and also PRIME NUMBERS)



1. Use the % or "remainder" operation:
A % B = remainder when A is divided by B,
so A % B = 0 whenever A is exactly divisible by B.

2. Suppose one of the numbers is 6.
Then LCM (6, Y) must be a multiple of 6,
either 6, 12, 18, 24, . . .

3. Therefore, using principle (1), you can find
LCM (X, Y) by testing whether X is divisible by Y,
whether 2*X is divisible by Y, whether 3*X is divisible by Y, and so on.

4. A prime number has no exact divisor except itself and 1. So, test whether it is exactly divisible by 2, then 3, then 5, then 7, etc.
(If it's not divisible by 2, then you don't need to test any more even-number divisors.) SO:
Test if it is exactly divisible by 2;
Then test if it is divisible by any ODD DIVISOR
(3, 5, 7, etc.) smaller than itself.