Sub topic 3
HCF x LCM = product of two numbers
This chapter assumes you know multiples, factors, prime factorization, and basic fraction arithmetic.
The product relation
For any two positive integers a and b:
HCF(a, b) x LCM(a, b) = a x b
For 12 and 18, the HCF is 6 and the LCM is 36. Then 6 x 36 = 216, which equals 12 x 18. If you know three of the four values, you can find the fourth.
from math import gcd
def lcm(a, b):
return a * b // gcd(a, b)
a, b = 12, 18
print(gcd(a, b), lcm(a, b), gcd(a, b) * lcm(a, b) == a * b) # 6 36 True> The product relation works only for two numbers. For three numbers, you must compute the HCF and LCM directly.
Write the callout as a note:
HCF and LCM of fractions
Reduce each fraction first. Then:
- HCF of fractions = HCF of numerators / LCM of denominators
- LCM of fractions = LCM of numerators / HCF of denominators
For 2/3 and 4/9, the HCF is 2/9 and the LCM is 4/3.
Remainder problems
To find the largest number that divides a and b and leaves the same remainder r each time, compute HCF(a - r, b - r).
When the remainders differ, look at the shortfall, which is divisor minus remainder. If the shortfalls are equal, add that shortfall to the number. The result is a multiple of the LCM of the divisors. For example, 32 leaves remainder 2 when divided by 5 and remainder 4 when divided by 7. Both shortfalls equal 3, and 35 is the LCM of 5 and 7, so the answer is 35 - 3 = 32.
Word problems: bells, tiles and ropes
Read the question's wording before choosing a method:
| Question asks for | Use |
|---|---|
| Largest equal piece, tile, or rope length | HCF |
| When events happen together again | LCM |
Bells ringing every 6 and 8 minutes coincide every LCM(6, 8) = 24 minutes.
Powers of a prime in n! and trailing zeros
The power of a prime p in n! is the sum of floor(n/p) + floor(n/p²) + floor(n/p³) + and so on. Trailing zeros come from factors of 10, so the count equals the power of 5 in n!, because powers of 2 are more plentiful. For 100!, the count is 20 + 4 = 24.
CAT strategies and traps
- Check whether an answer must be at least the larger number (LCM) or at most the smaller number (HCF).
- Reduce fractions before taking HCF or LCM.
- Identify the question type before calculating. Most errors come from choosing HCF when LCM is needed.
- Aim for about one minute on routine questions during timed practice.
Exercises
Exercise
Two numbers have HCF 4 and LCM 60. One number is 12. What is the other number?
Show answer
4 x 60 = 240, and 240 / 12 = 20. The other number is 20.
Exercise
How many trailing zeros does 50! have?
Show answer
The power of 5 is floor(50/5) + floor(50/25) = 10 + 2 = 12.