The primes common to one or the other are 2, 2, 2, 3, 3, 5. The least common multiple is then 2 × 2 × 2 × 3 × 3 × 5 = 360.
Another method lists the multiples of both numbers until the first common multiple is found. To use this method efficiently, write down multiples of the first number until the result is larger than the second. Then write down multiples of the second until they are larger than the largest multiple of the first. Continue with this alternating procedure. For example, to find lcm(12, 20), we would write down the multiples
| 12 | 20 |
|---|---|
| 24 | 40 |
| 36 | |
| 48 | |
| 60 | |
| 60 |
A third method is to use the formula
To use this formula we can compute a gcd with the calculator method we saw in the assignment Greatest Common Divisors and then do the multiplication and division. For example, once we see that gcd(40, 45) = 5, we get lcm(40, 45) = 40 × 45 / 5 = 360.
Problem 1. Illustrate the formula lcm(a, b) = a × b / gcd(a, b) by calculating the following examples by using the formula and by calculating the lcm in some other manner and seeing that you get the same value by both methods.
It makes perfect sense to talk about the least common multiple of three or more integers. The prime factorization method works for find the lcm of any number of integers. For example, to find lcm(6, 20, 36), we have
The primes common to one or more are 2, 2, 3, 3, 5. Therefore, lcm(6, 20, 36) = 2 × 2 × 3 × 3 × 5 = 180.
Alternatively, the lcm of three or more integers can be found recursively. For three, the following formula turns calculating the lcm into two other lcm calculations.
Problem 2. Illustrate the formula lcm(a, b, c) = lcm(a, lcm(b, c)) by calculating the following least common multiples both with the formula and with another method, each time seeing that both methods give the same value.