The Proof-Level Toolkit
The order of mod divides and divides any with . Use CRT to compute orders mod composite numbers: . A primitive root exists mod , , — and its existence converts multiplicative questions into additive ones on exponents.
For odd prime , : ; for and odd : . The case adds for even . Example: . LTE turns "how many times does divide" into arithmetic.
For a symmetric quadratic Diophantine equation, take the solution with minimal; Vieta gives a second root that yields a smaller solution unless a boundary case holds — which then proves the required structure. The IMO 1988 classic: forces to be a perfect square.
becomes ; positive solutions correspond to the divisor pairs. Simon's Favorite Factoring Trick — add the constant that completes the product — is the first thing to try on any equation with an term.
Orders and Prime Divisors of
Let be a prime with , and let be the least with . Then:
- if and only if ; in particular ;
- if is odd and , then but , so contains exactly one more factor of than — the order is even;
- a primitive prime divisor of , one with , satisfies .
Zsigmondy's theorem (citable at the USAMO): for and , has a primitive prime divisor except when , or and is a power of .
Divide by : with . Then , so forces , and the minimality of forces . Fermat's little theorem gives , hence . For the second item, gives , so , while (as is odd) gives . A divisor of that does not divide must carry the full power of in . The third item is just . Every problem in this section is these three lines applied to a well-chosen prime.
Show that every prime factor of is congruent to modulo , and use this to find a factor. (Euler, 1732)
Step 1 — let ; then is odd and , so . The order of divides but not ; the divisors of are powers of , and the only one not dividing is itself. So .
Step 2 — gives .
Step 3 — search that one residue class: for is , and the primes among them are . Trial division rejects the first four, and , where is prime — as Step 2 requires. This is how Euler refuted Fermat's guess that every is prime. (With quadratic residues one gets more: makes a square mod , so , and ; indeed .)
How to find it. "Prime factors of " is a question about the order of . When is a power of the order is forced completely, turning a factoring problem into a short search along one residue class.
Find all pairs of primes such that divides . (folklore)
Step 1 — both factors are odd, so and are odd. By Fermat, , so only when .
Step 2 — suppose . Then ; this rules out (it would divide ), so and are invertible mod . Put : then and (as ). The order of divides the prime and is not , so it is , and ; in particular .
Step 3 — by symmetry, would give . Both cannot hold, so or ; say .
Step 4 — . If , then and the pair works. If , Step 1 says , so and ; and , so works. The answer is , , .
How to find it. The same prime in the exponent and in the modulus calls for Fermat; a prime modulus with a different prime exponent calls for the order. Two primes each dividing something indexed by the other give and , which cannot both happen.
Find all integers with
(IMO Shortlist 2006 N5)
Step 1 — the left side is . It is positive for every integer ( and have the same sign), so , , and both factors of are positive divisors of .
Step 2 — every prime is or . Indeed , so is or . Order gives . Order means , and then , so .
Step 3 — a positive divisor of is a product of such primes, hence or . Apply this to : or .
Step 4 — then (for ) or (for ) modulo , which is neither nor . Contradiction: there are no solutions.
How to find it. is a cyclotomic value, and the prime divisors of are pinned by orders: 's own prime or . The right side factors, so both factors inherit the restriction — and the table shows that no residue of lets both factors have it.
Tempting: ", so the order of is , so ." With , : , yet neither nor is .
The failing step is "the order is ": gives only . Here and — both primes already divide the smaller numbers and . A prime of order exactly is primitive, and has none: this is the exceptional case of Zsigmondy's theorem. A correct argument names the order , proves (or disposes of each smaller ), and only then concludes .
Show that every odd prime factor of is , and use this to factor completely.
Show the answerHide the answer
If an odd prime divides , then and , so divides but not : it is , and . Now . If is composite it has a prime factor at most , and the only prime below is . Indeed , and is prime. So .
Vieta Jumping in Full
To prove something about a symmetric equation that is quadratic in each variable (such as ), suppose it fails and take a solution in positive integers with minimal and . Fix and read the equation as a quadratic in , say . Its other root is
The first form shows is an integer, the second shows its sign and size. If , then is a smaller solution — a contradiction — so the minimal solution must be a boundary case (, , or ), and the boundary case carries the answer.
The descent is well-ordering: a nonempty set of positive integers has a least element, so there is no infinite chain of solutions with strictly decreasing. Vieta's formulas make each jump free. From one root of the other root is , visibly an integer, and also , visibly small when is small compared with . Two expressions for one number supply integrality and size at once, and the jump keeps the equation because it only swaps the two roots of the same quadratic. Geometrically the solutions are lattice points on a conic, and the jumps are horizontal and vertical chords between them, walking toward the axes.
Find all positive integers for which has a solution in positive integers. (folklore)
Step 1 — fix such a and take a solution with minimal and . If , the equation reads , so : and .
Step 2 — if , fix : is a root of , whose other root is (an integer) and also (positive).
Step 3 — size: since , . So is a solution in positive integers with , contradicting minimality.
Step 4 — so the minimal solution is and ; conversely has the solution . The only value is .
How to find it. A symmetric equation, quadratic in each variable, with a free parameter : jump from a minimal solution. The boundary case is where the parameter gets pinned.
Positive integers are such that divides . Prove that is a perfect square. (IMO 1988/6)
Step 1 — let and suppose is not a perfect square. Among all pairs of positive integers with , take one with minimal and .
Step 2 — as a quadratic in it reads , so the other root is , an integer by the first formula.
Step 3 — , since otherwise is a square.
Step 4 — : if , then , yet has a positive left side.
Step 5 — : . So is a positive solution with a smaller sum, a contradiction; hence is a perfect square.
Step 6 — the same jumps describe all solutions: descent from any solution ends at a pair with a zero coordinate, and there . For the chain is drawn on the curve .
How to find it. " divides " is symmetric and quadratic in each variable, so jump. The descent can only stop at , and that exit is exactly the statement "".
A common write-up of IMO 1988/6 says: "the other root is a positive integer smaller than , so is a smaller solution — infinite descent, contradiction." That argument never uses the assumption that is not a square, so it would prove that there are no solutions at all.
And there are solutions: gives . The jump from is , which is not positive, so it leaves the set of positive solutions and the descent stops there. The case is exactly where the conclusion lives (), and a proof must treat , and separately. A descent proof that never uses the negation of the conclusion is wrong somewhere.
Show that has infinitely many solutions in positive integers, and list every solution with and .
Show the answerHide the answer
Jump upward. If is a solution with , fix and read the equation as a quadratic in : the other root is , so is a solution with a larger top coordinate. Starting from this gives , , , , , , and so on without end. Conversely the descent from the worked example () takes every solution with to a smaller one and ends at , so this chain contains every solution. With : , , , , , — pairs of alternate Fibonacci numbers.
Factoring: Divisor Pairs and Coprime Pieces
- Divisor pairs. If an equation can be written with integer expressions and fixed, then runs over the divisors of , negative ones included — a finite check. Simon's trick produces this form.
- Coprime pieces. If with positive integers and , then and are both -th powers.
The first is just the finiteness of the set of divisors. The second is unique factorization: each prime appears in with an exponent that is a multiple of , and coprimality sends all of those copies of to the same factor, so every prime exponent of (and of ) is a multiple of . Without coprimality this fails (), so compute the gcd first — it usually divides a small number, and each possible gcd is a separate case. Most "find all integer solutions" equations of olympiad size are driven into one of these two forms, often after a size argument has bounded one factor.
Find all integer solutions of .
Step 1 — complete the product: , so the equation is .
Step 2 — is prime, so is one of , , , .
Step 3 — the solutions are . Check one: .
How to find it. One term plus linear terms is always Simon's trick; the constant to add is the product of the two shifts. Over the integers the negative divisor pairs are half of the answer, and forgetting them is the usual loss.
Find all positive integers with .
Step 1 — factor: . Put , a positive divisor of .
Step 2 — size: , so and ; the divisors of in that range are .
Step 3 — in each case . For : and , so , whose discriminant is not a square. For : and , so , giving , . For : , not a multiple of .
Step 4 — the only solution is , and .
How to find it. A difference of cubes always factors, and the second factor dwarfs the first. That imbalance bounds the small factor and leaves a handful of divisors to test.
Prove that has no solution in positive integers. (Fermat)
Step 1 — suppose there are solutions and take one with minimal. Then : a common prime would give , so , and would be a smaller solution.
Step 2 — is a primitive Pythagorean triple, so (swapping and if necessary) is odd, is even, and there are coprime of opposite parity with , , .
Step 3 — is again primitive with odd, so is even and , with .
Step 4 — coprime pieces: , and , , are pairwise coprime, so each is a square: , , .
Step 5 — then is a positive solution with , contradicting the minimality of .
How to find it. A sum of two squares equal to a square is a Pythagorean triple; its parametrization produces a product equal to a square; coprime pieces make each piece a square; and the same equation reappears in smaller numbers — infinite descent. As a corollary has no solutions, the case of Fermat's Last Theorem.
Find all positive integers for which is a perfect square. Tempting: "the product of and is a square, so both are squares; the only squares apart are and , so ."
This misses : . The factors and are not squares because can be or , and coprime pieces needs gcd . Either split into cases by the gcd, or avoid it: , so becomes . The divisor pairs and give exactly and ; the pair gives .
Find all pairs of positive integers with .
Show the answerHide the answer
Multiply by and add : . Both factors are odd and at least , so they form a divisor pair of other than : , , and their reverses. Hence — six ordered pairs.