Great progress so far in Finding the Lowest Common Multiple! We are already at lesson three of five in this course. Over the first two lessons, you explored common multiples and then learned how to find the LCM by listing multiples until the first shared value appeared. That listing method is clear and reliable, but it can become slow when numbers get larger. Today, you will learn a more efficient approach: finding the LCM using prime factorisation.
When Listing Reaches Its Limits
Consider trying to find LCM(48,72) by listing. You might need to write out many multiples of each number before spotting the first match. For even bigger numbers, the lists grow quickly and the process becomes tedious.
Prime factorisation gives us a shortcut that works directly with the structure of the numbers rather than scanning long lists. As you may recall from earlier in this learning path, every whole number greater than 1 can be written as a unique product of prime factors. That breakdown is exactly the tool we will use now.
The Core Idea
Here is the key insight: for a number to be a multiple of 12, it must contain at least the same prime factors that 12 has, each raised to at least the same power. Since 12=22×3, any multiple of needs at least two s and at least one among its prime factors. The same logic holds for any number.
The Method Step by Step
Let us find LCM(12,18) using prime factorisation. Imagine two rotating displays in a shop window: one completes a cycle every 12 seconds, the other every 18 seconds. To find when both displays first reset together, we need the LCM of 12 and 18.
Step 1 — Factorise each number.
A Worked Example with Different Primes
Things get especially interesting when two numbers do not share all of their prime factors. Let us try LCM(60,72).
Factorise:
60=22×3×
Extending to Three Numbers
The method scales naturally. Suppose three rotating shift schedules repeat every 8, 12, and 15 days. To find when all three schedules first align, we need LCM(8,12,15). Start by factorising all three:
Why Shared Primes Alone Are Not Enough
You might wonder: "Can I save time and use only the primes that the numbers have in common?" This is a natural question, especially if you recall that the Highest Common Factor (HCF) works by taking shared primes at their lowest powers. The LCM, however, goes in the opposite direction.
Consider 12=22×3 and 10=2×. The only shared prime is . If we built our result from shared primes alone, we would get (the HCF). Even if we took the highest power of that shared prime, , it would not be a common multiple. That product is far too small because it is missing the factors of and .
Conclusion and Next Steps
In this lesson, you learned a faster way to find the LCM: factorise each number into primes, select every prime that appears in any factorisation at its highest power, and multiply those together. We also explored why this approach requires all primes — omitting a prime that is unique to one number means the result cannot be a multiple of that number.
Now it is time to put this technique to work! The upcoming practice tasks will walk you through the method piece by piece: first selecting the correct highest powers, then computing full LCMs for pairs and trios of numbers, and finally explaining the reasoning in your own words. Let's build that confidence one step at a time.
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
12
2
3
So for a number to be a common multiple of two numbers, it must carry enough prime factors to cover both. The LCM is the smallest such number, which means we take every prime that appears in any of the factorisations, each at its highest power across the numbers — nothing more, nothing less.
12=22×3
18=2×32
Step 2 — Identify every prime that appears in any factorisation. The primes involved are 2 and 3.
Step 3 — For each prime, choose the highest power across both factorisations.
Prime
Power in 12
Power in 18
Highest power
2
22
21
22
3
31
32
3
Step 4 — Multiply the highest powers together.
LCM(12,18)=22×32=4×9=36
We can verify: 36÷12=3 and 36÷18=2. Both results are whole numbers, confirming that 36 is indeed a common multiple. Because we used only the minimum prime power needed to cover each number, it is the lowest common multiple. Back to our shop-window scenario — both displays first reset together after 36 seconds.
5
72=23×32
Collect every prime:2, 3, and 5. Notice that 5 appears only in the factorisation of 60. We still must include it, because the LCM must be a multiple of 60, and 60 contains a factor of 5.
Prime
Power in 60
Power in 72
Highest power
2
22
23
23
3
31
32
3
5
51
-
51
LCM(60,72)=23×32×5=8×9×5=360
Quick check: 360÷60=6 and 360÷72=5. Both whole numbers, so we are good.
8=23,12=22×3,15=3×5
The primes present are 2, 3, and 5. We pick the highest power of each across all three factorisations:
Prime
Power in 8
Power in 12
Power in 15
Highest
2
23
22
-
23
3
-
31
31
3
5
-
-
51
51
LCM(8,12,15)=23×3×5=8×3×5=120
All three schedules first coincide on day 120. The rule stays the same regardless of how many numbers you have: include every prime from every factorisation, each at its highest power.
5
2
2
22=4
3
5
The LCM must be divisible by each original number, so it needs every prime factor from every number — not just the ones they happen to share:
LCM(12,10)=22×3×5=60
Leaving out any prime that belongs to one of the numbers guarantees the result will fail to be a multiple of that number.