Three strategies for integer problems: factorization, modular arithmetic, and bounds
What you will learn
Three useful starting points for integer problems, when to use each one, and how to write complete solutions.
How do you start an integer problem?
Integer problems can seem to depend on a flash of inspiration. I struggled with them as a high-school student too. A more practical starting point is to ask which of the following approaches the conditions suggest:
- Factorization: turn an equation into a product and use its divisors.
- Modular arithmetic: compare the possible remainders of both sides.
- Bounds: reduce infinitely many candidates to a finite list.
These are useful strategies rather than an exhaustive classification of number theory. A single problem may require more than one.
Factorization: exploit divisors
Factorization is especially promising when primes, prime powers, or coprime integers appear. A prime has only the positive divisors and . If a product equals a power of a prime, each positive factor must itself be a power of that prime.
For example, an equation of the form reduces to checking factor pairs of . Remember to include negative factors when the original variables are allowed to be negative.
Modular arithmetic: exploit remainders
When factorization does not help, look for a modulus that restricts one side strongly. An integer square is congruent to either or modulo , and to either or modulo . These small observations are often enough to rule out whole families of candidates.
The symbol means that is divisible by .
Bounds: make the search finite
An inequality or the condition that a variable must be real can impose an upper bound on an integer. Once only finitely many possibilities remain, check them carefully.
For a symmetric expression, it is often useful to order the variables first. Then ask: which variable cannot be too large? If the smallest variable is already large, all the others are at least as large, which may contradict the required inequality.
Example 1: similar equations, different starting points
Find all pairs of positive integers satisfying each equation:
- .
- .
The first equation has a sum of cubes on the right, suggesting factorization. The second involves a square; working modulo will make factorization possible later.
Solution to part 1
Factorizing gives
Since is a positive divisor of , write
Substitute into the second factor:
The integer in parentheses is congruent to modulo , so this factor is divisible by exactly once. Comparing powers of in the product gives . Consequently,
so . Hence , , and .
Conversely, . Therefore the only solution is
Solution to part 2
Work modulo . If were even, , whereas or . Thus is odd. Then , so must be even.
Write , where is a positive integer. Now the equation factorizes:
Since , we have . Both factors are therefore positive and even, with the second larger than the first. The only possibilities are
The first gives and , hence . The second gives and , hence . Both satisfy the original equation. Thus
The key lesson is that modular arithmetic and factorization can work together: the remainder calculation exposes a difference of squares.
Example 2: a parity proof using squares modulo 4
Problem. Let be positive integers with
Prove that at least two of are even.
Choosing a method
The conclusion concerns parity, while the equation contains squares. Modulo is more informative than modulo : every even square has remainder , and every odd square has remainder .
Complete solution
Modulo , each term among is or , and is also or .
If exactly two of were odd, the left side would have remainder . If all three were odd, it would have remainder . Both are impossible.
Therefore at most one of is odd. Equivalently, at least two are even.
Example 3: count integer triples by bounding the smallest variable
Problem. How many ordered triples of distinct positive integers satisfy
Choosing a method
The inequality is symmetric. First assume , count the increasing triples, and then account for their permutations. If were too large, every reciprocal would be small, so bound first.
Complete solution
For ,
which gives . Since is a positive integer, . Hence
Since , the left side is less than , so . Therefore or .
- If , then , so . There are seven possibilities: .
- If , then , so . There is no integer in that interval.
There are seven increasing triples. Each has three distinct entries and therefore different permutations. The required number of ordered triples is
The word ordered matters: if permutations were considered the same, the answer would be seven.
A checklist for your next problem
Look for a product when primes or divisibility appear. Try a small modulus when powers or parity appear. If neither immediately resolves the problem, look for inequalities that force a finite search. Always substitute the surviving candidates into the original conditions to establish that they really are solutions.
For a different kind of method selection, see how symmetry simplifies probability recurrences.
Related articles
- Equating rational and irrational parts: proof and worked problems
- How to simplify nested square roots, with three worked examples
- Conditional probability: the formula, information protocols, and worked examples
- Integration by parts: formulas, proof, and four useful patterns
- Triple-angle identities: remember, derive, and apply them
About the author
Koki Saito
Physician and graduate of the University of Tokyo Faculty of Medicine. Drawing on his entrance-exam experience, he explains how to choose mathematical methods and construct complete solutions.
Full profile →Have a question or spotted an error? Contact us.