Maths4U · Learning together
Advanced GCD Problems
Notes
Key Idea
Strong gcd problems are rarely just computations. The main technique is to replace a pair of numbers by a simpler pair with the same gcd: subtract multiples, take linear combinations, use polynomial remainders, and reduce exponents.
Basic Facts
We use , , and the fact that if divides two numbers, then divides every integer linear combination of them. If and , then . For powers, the key identity is .
When to Use This Method
Use gcd methods when a problem contains divisibility of two expressions, a condition like , powers , neighbouring terms of a sequence, or a request to find all parameters for which the common divisor is not one.
How to Recognise the Method
Look for a substitution by a remainder: if a divisor contains , replace by in the other expression. If powers have different exponents, apply the Euclidean algorithm to the exponents. If numbers are coprime, test whether a common prime divisor would be forced to divide both original numbers.
Typical Mistakes
Do not divide a congruence by a number before checking coprimality. Do not conclude from that or . In power problems, it is easy to prove only one direction; one must also show that the proposed gcd is maximal.
Mini-checklist
1. Which two expressions have a common divisor? 2. Can one expression be replaced by a linear combination? 3. Can a power or exponent be reduced? 4. What happens to a prime divisor? 5. Is there a coprimality condition? 6. Have all residues or parameters been checked?
Example 1. A Remainder Instead of Long Division
This teaches replacing a polynomial by its remainder modulo a linear expression.
Problem. Find all possible values of for positive integers .
Let . Since , we get . Hence . Only and are possible. Both occur: if is not divisible by , the gcd is , while gives .
Comment. A linear factor turns the polynomial into a constant remainder.
Example 2. GCD with a Neighbouring Linear Factor
This shows how to prove that a common divisor is bounded by a small number.
Problem. Prove that divides .
If , then . Therefore . Hence, if also divides , then . Thus .
Comment. We do not always need the exact gcd; often it is enough to restrict it.
Example 3. GCD of Numbers
A standard olympiad template: the Euclidean algorithm moves to the exponents.
Problem. Prove that .
Let . The number divides both expressions because and . Conversely, suppose . Then . Thus any common divisor of and also divides . Repeating the Euclidean algorithm on the exponents leads to .
Comment. The Euclidean algorithm is applied to the exponents, not to the huge numbers themselves.
Example 4. Common Divisors and Coprimality
This teaches excluding a prime divisor by contradiction with .
Problem. Let . Prove that divides .
Let a prime divide both and . From we get . Then . If , then , hence , impossible. Therefore the only possible prime divisor is , so the whole gcd divides .
Comment. Factoring is unnecessary; it is enough to study a prime divisor.
Example 5. A Common Divisor Becomes a Congruence
This shows how a condition turns into a congruence.
Problem. Find all positive integers such that .
Let be a common divisor. Then . Multiply the first expression by : . From , we get , so . Thus only the common prime divisor is possible. It appears exactly when , that is, . Answer: .
Comment. First the common divisor is severely restricted, then attainability is checked.
Example 6. Powers with Two Bases
This prepares for problems where one has to introduce an inverse element.
Problem. Let and . Prove that .
Let . The right-hand side divides both expressions. Conversely, let be a common divisor. Since , is invertible modulo . From and , we obtain and . Hence , so , and .
Comment. The hidden step is that division by is allowed only after coprimality is checked.
Example 7. GCD of Neighbouring Factorials
This shows how a linear combination gives a small number.
Problem. Prove that .
Let divide both numbers. Then . Hence . But and imply , so . Therefore .
Comment. The combination is chosen to eliminate the factorial.
Example 8. A Strong Prime-Divisor Argument
An olympiad-style example: instead of computing the gcd, we analyse a possible prime divisor.
Problem. Let . Find .
Consider an odd prime dividing both numbers. Since , put . Then and . Dividing the second congruence by the first gives , but then , impossible for odd . Thus there are no odd prime divisors. Now check : if are both odd, both expressions are even and , so the gcd is . If one of is even, both expressions are odd, so the gcd is .
Comment. This trains prime-divisor analysis and modular inverses.
Worked examples
No worked examples were provided.