Sub topic 9
Least Common Multiple
Prerequisites: you should know prime factorization, factors, multiples, exponents, and the Highest Common Factor (HCF). You should also be comfortable dividing integers with remainders.
What LCM means
A multiple of a number is obtained by multiplying it by a positive integer. For example, the multiples of 6 are 6, 12, 18, 24, and so on.
The Least Common Multiple (LCM) of two or more positive integers is the smallest positive number that is a multiple of every number.
For 8 and 12:
- Multiples of 8: 8, 16, 24, 32, 40, ...
- Multiples of 12: 12, 24, 36, 48, ...
Therefore, LCM(8, 12) = 24.
The LCM is useful when separate cycles must occur together. If one bell rings every 8 minutes and another every 12 minutes, they ring together again after 24 minutes.
Three methods
Listing multiples
Listing is practical for small numbers. Stop when the first common value appears. It becomes slow when the numbers are large or have few obvious common multiples.
Prime factorization
Write each number as a product of prime powers. For every prime, keep the greatest exponent appearing in any factorization.
For example:
| Number | Prime factorization |
|---|---|
| 18 | 2 × 3² |
| 24 | 2³ × 3 |
The greatest power of 2 is 2³, and the greatest power of 3 is 3². Hence:
LCM(18, 24) = 2³ × 3² = 72
This method works because the LCM must contain enough copies of every prime to be divisible by each number.
Using HCF
For two positive integers a and b:
LCM(a, b) × HCF(a, b) = a × b
Thus:
LCM(a, b) = (a × b) / HCF(a, b)
For 252 and 105, HCF = 21, so:
LCM = (252 × 105) / 21 = 1260
When the numbers are large, find the HCF first with Euclid’s algorithm, then use this relation.
def gcd(a, b):
while b:
a, b = b, a % b
return a
def lcm(a, b):
return a // gcd(a, b) * b
print(lcm(252, 105)) # 1260The division is performed before multiplication to reduce the chance of overflow in languages with fixed-size integers.
Common CAT errors
- Choosing the greatest common factor instead of the least common multiple.
- Using the smaller number without checking divisibility.
- Taking the smaller exponent in prime factorization. Smaller exponents belong to HCF; greatest exponents belong to LCM.
- Forgetting that “again together” or “at the same time” usually signals an LCM question.
- Applying the two-number HCF-LCM product formula directly to three or more numbers. Factorize all numbers or combine them pairwise carefully.
Exercise
Three lights flash every 15, 20, and 24 seconds. After how many seconds will they flash together again?
Show answer
Factorizations are 15 = 3 × 5, 20 = 2² × 5, and 24 = 2³ × 3. The LCM is 2³ × 3 × 5 = 120 seconds.