Real Numbers: HCF and LCM
Euclid's division algorithm
To find the HCF of two positive integers and (with ), repeatedly apply where , replacing and with and each time, until the remainder is 0. The divisor at that final step is the HCF.
Worked example: HCF by Euclid's algorithm
Find the HCF of 867 and 255.
Solution: Since :
As the remainder is now 0, the HCF of 867 and 255 is 51.
Worked example: a proof using the division lemma
Show that any positive odd integer is of the form , , or , for some integer .
Solution: Euclid's division lemma says any positive integer can be written as for some , where , so is one of .
Of these six forms, , , and are all even, since every term is a multiple of 2. That leaves exactly , , and as the only forms an odd integer can take.
HCF and LCM by prime factorization
Break both numbers into prime factors. The HCF is the product of the smallest power of each common prime factor; the LCM is the product of the greatest power of every prime factor that appears in either number. For any two positive integers, these always satisfy:
Worked example: HCF, LCM, and verification
Find the HCF and LCM of 336 and 54, and verify the relationship above.
Solution: Prime factorizing both numbers:
The HCF takes the lowest power of each shared prime ( and ), and the LCM takes the highest power of every prime seen:
Verification: , and too, so the relationship holds.