Britannica
Sources used in this answer
How can prime factorization be used to find a greatest common divisor?
Created from Britannica articles
using AI.
AI can make mistakes, so verify using Britannica articles.
To find the greatest common divisor (GCD) of a set of positive integers using prime factorization, follow these steps:
- Factorize each number: Express each integer as a product of its prime factors, indicating the number of times each distinct prime occurs as an exponent (e.g., ).
- Identify common primes: Determine which prime numbers appear in the factorization of every integer in the set.
- Select the smallest power: For each of these common primes, identify the smallest exponent (the fewest number of times it occurs) among all the factorizations.
- Calculate the product: Multiply these common primes together, each raised to its respective smallest exponent identified in the previous step. The resulting product is the GCD.1
For example, to find the GCD of () and (), you take the common primes and at their lowest powers ( and ), resulting in a GCD of .1