DIOPHANTINE EQUATIONS
Finding integer solutions to equations using divisibility, factoring tricks, and bounding arguments.
Overview
A Diophantine equation is an equation (usually polynomial) where we require the solutions to be integers. The name honors the ancient Greek mathematician Diophantus of Alexandria, but the ideas appear throughout AMC 10 problems whenever a question asks "in how many ways" or "find all positive integer pairs."
The simplest type is the linear Diophantine equation . It has integer solutions if and only if divides . When solutions exist there are infinitely many — they form an arithmetic progression — and you only need to find one particular solution by inspection or the extended Euclidean algorithm, then write the general form.
Beyond linear equations, AMC problems frequently feature factoring tricks: rearrange the equation so the left side factors as a product of two integer expressions, then list all factor-pair cases. Simon's Favorite Factoring Trick (SFFT) is the most common version. A third family uses bounding: show one variable must lie in a small range, then check each case by hand.
Key facts
- Linear solvability: has integer solutions .
- General solution of : If is one solution, all solutions are where .
- Simon's Favorite Factoring Trick (SFFT): For an equation of the form , add to both sides to factor: Then each factorization of gives a candidate integer pair .
- Difference of squares / sum trick: . Write as a product of two integers of the same parity (both even or both odd if is even; both odd if is odd).
- Chicken McNugget Theorem (Frobenius, two coprime values): If , then the largest integer that cannot be represented as with is .
- Bounding: If one factor must be positive and the product is fixed, each factor is at most the product itself. Use this to reduce the search to finitely many cases.
- Parity / mod checks: Before hunting for solutions, a quick mod-2 or mod- check can prove no solutions exist (e.g., has no solutions since squares are or mod , so mod ).
Worked example 1
Find all positive integer solutions to .
First check solvability: divides 47, so solutions exist.
Find one solution by inspection. Try : , so . That works: .
General solution:
For positive solutions we need and :
- , so .
- , so .
Values: ; ; .
There are 3 positive integer solutions.
Worked example 2
How many ordered pairs of positive integers satisfy ?
Apply SFFT. Rewrite: Add to both sides: Factor:
Since and are positive integers, and . The product equals 11 (prime), so the integer factor pairs of 11 are , , , .
- . Both positive. ✓
- . Both positive. ✓
- . negative. ✗
- . negative. ✗
There are 2 ordered pairs.
Common traps
- Forgetting . Before solving , check this condition; if it fails, stop — there are no integer solutions.
- Missing negative factor pairs. When factoring , list all integer factor pairs, including negative ones. Restricting to positive factors loses valid solutions.
- SFFT sign errors. The trick adds to both sides where and are the coefficients of and after one variable is factored. Mis-identifying these gives the wrong constant on the right.
- Not checking the positivity / naturality constraint. After writing down all algebraic solutions, discard those where or is not a positive integer (or not an integer at all).
- Chicken McNugget off-by-one. The formula gives the largest non-representable number; every integer strictly larger is representable. Don't apply the formula when — it only works for coprime pairs.