HCF (gcd) finds the largest common divisor; LCM finds the smallest positive common multiple.
- a
- Positive integers unless a method states otherwise.
- b
- Positive integers unless a method states otherwise.
- g
- HCF or gcd.
- L
- LCM of the given numbers.
Prime-factor method
Treat a missing prime as having exponent zero.
Two-number identity
For two positive integers only.
Euclidean algorithm
Repeat until remainder 0; the last nonzero remainder is the HCF.
Coprime numbers
Coprime numbers need not be prime.
Repeating events
All events start together; express periods in the same unit.
Equal remainders
For a stated remainder r, use HCF of the numbers minus r; divisor > r.
Explanations and worked examples
Open a method when you need more detail.
Full notation guide
- a
- Positive integers unless a method states otherwise.
- b
- Positive integers unless a method states otherwise.
- g
- HCF or gcd.
- L
- LCM of the given numbers.
- pᵢ
- A prime in the combined prime factorisation.
- r
- A common remainder; the divisor must exceed r.
1. Choose minimum or maximum prime exponents
A common divisor cannot use more copies of a prime than any given number contains. A common multiple must contain enough copies for every number.
Worked example
Find the HCF and LCM of 72 and 120.
- 72 = 2³ × 3²; 120 = 2³ × 3 × 5.
- HCF = 2³ × 3 = 24.
- LCM = 2³ × 3² × 5 = 360.
HCF 24; LCM 360.
Remember
- A prime absent from one number has exponent zero and cannot appear in the HCF.
2. Use repeated division for large numbers
Replacing a pair by the smaller number and the remainder preserves their common divisors. Continue until the remainder is zero.
Worked example
Find gcd(252,198).
- 252 = 198 + 54.
- 198 = 3 × 54 + 36.
- 54 = 36 + 18; 36 = 2 × 18.
- The last nonzero remainder is 18.
18.
Remember
- When the first remainder is zero, the smaller number is already the HCF.
3. Connect HCF, LCM and product
For each prime in two numbers, the minimum exponent plus the maximum equals the sum of the exponents. This proves the two-number product identity.
Worked example
Two numbers have HCF 12 and LCM 180. One is 36. Find the other.
- Other number = 12 × 180/36 = 60.
- Check: gcd(36,60) = 12 and lcm(36,60) = 180.
60.
Remember
- Do not extend gL = product to three or more numbers. Always verify recovered numbers satisfy both HCF and LCM.
4. Use HCF for the largest equal-sized unit
Cutting lengths into the largest equal pieces without waste requires a piece length dividing every original length. The largest such length is their HCF.
Worked example
Ropes 84 cm, 126 cm and 210 cm long are cut into the longest equal pieces without waste. Find the piece length and count.
- HCF = 42 cm.
- Counts = 84/42 + 126/42 + 210/42 = 2 + 3 + 5.
42 cm; 10 pieces.
Remember
- Convert all lengths to the same unit before taking the HCF.
5. Use LCM for simultaneous repetitions
When events start together and repeat at fixed periods, the next common occurrence must be a multiple of every period. The least positive one is the LCM.
Worked example
Three bells ring together now and repeat every 12, 18 and 30 minutes. When will they next ring together?
- 12 = 2² × 3; 18 = 2 × 3²; 30 = 2 × 3 × 5.
- LCM = 2² × 3² × 5 = 180 minutes.
After 3 hours.
Remember
- Different starting offsets require congruence conditions; the LCM of periods alone is not enough.
6. Find a divisor from equal remainders
If N₁ and N₂ leave the same remainder on division by d, their difference is a multiple of d. For several distinct numbers, the greatest possible such divisor is the HCF of their differences. If the remainder r is specified, instead calculate the HCF of Nᵢ−r and require d > r.
Worked example
Find the greatest divisor that leaves the same remainder when dividing 43, 91 and 183.
- Differences from 43 are 48 and 140.
- gcd(48,140) = 4.
- 43, 91 and 183 each leave remainder 3 modulo 4.
4, with common remainder 3.
Remember
- If all compared numbers are identical and the remainder is unspecified, there is no greatest divisor. If every number equals the stated remainder r, every divisor greater than r works, so again there is no greatest divisor. Otherwise, reject a candidate not larger than r.