s3.1.1
GCD and LCM
1,000 questions
Finding the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) is a common task.
GCD via Euclid's Algorithm: To find GCD(a, b) with , find the remainder when is divided by , let's call it . Now, GCD(a, b) = GCD(, a). Repeat this process until the remainder is 0. The last non-zero remainder is the GCD. For example, GCD(36, 60) GCD(24, 36) GCD(12, 24) = 12.
LCM Formula: Once the GCD is known, the LCM can be found easily using the formula: .
For example, .