Number theory problems that look like algebra, and how to tell
5 October 2026
Most students can tell a geometry problem from a combinatorics problem at a glance. The confusion is between algebra and number theory, because the number theory problems that cause the most trouble look like algebra. There is an equation, or a fraction, or a polynomial, and the instinct is to rearrange, substitute and solve. Then the rearranging goes nowhere, because the problem was never asking you to solve anything.
The difference is one word. When the unknowns are integers, an equation stops being something you solve and becomes a constraint you squeeze. Algebra asks what is x. Number theory asks which whole numbers survive, and the tools for that are different: factoring into a product, dividing out a remainder, and reducing modulo something small.
So this is a recognition drill: how to see, in the first minute, that an algebra-looking problem is really a number theory problem.
Five signals
- "Integer" sitting next to an equation with more unknowns than equations. Algebra says has infinitely many solutions. Integers say it has four positive ones. Too many unknowns plus the word integer means the answer is a finite list, and you will find it by factoring, not by solving.
- A fraction that has to be a whole number. "Find all such that divides " is a fraction problem in disguise, and the method is to divide the polynomial out until the remainder stops depending on .
- "Prime" or "composite" applied to a polynomial. The question looks like it is about primes. It is usually about an algebraic factorisation that someone hid.
- Digits. Any problem that moves, reverses or sums the digits of a number becomes an equation the moment you write the number in place value. After that it is a divisibility problem.
- A divisibility condition on two variables that are tangled together. A quotient like is a quadratic in disguise, and a quadratic with integer roots hands you a second root for free.
The three moves that follow
Once you have recognised it, there are three moves, and almost every problem of this kind uses one of them.
- Factor into a product equal to a constant. Integers that multiply to 6 can only be a few things. Move everything to one side and add whatever constant makes it factor: becomes . Now is a divisor of 6, and the positive solutions are . Check the negative divisors too; here they all give a non-positive or .
- Divide out and look at the remainder. For dividing , write . Whatever divides and must divide 2, so and is the only positive answer. That is modular thinking in its plainest form: modulo , is .
- Bound, then check a short list. Once the factor is fixed or the remainder is small, the size of the unknowns is capped, and a finite search finishes it. Bounding is what turns "find all" into "check these".
Watching it work
The hidden factorisation. Prove that is composite for every integer . It looks like a question about primes, so people start testing small cases and looking for a prime that always divides it. None does. The problem is algebra wearing number theory's clothes, the reverse of everything above: . Both factors are at least 2 once , and you are done. The restriction matters, since gives 5, which is prime.
The digits problem. Find the smallest number ending in 6 that becomes four times larger when the 6 moves to the front (IMO 1962). Write with having digits. Moving the 6 gives , and setting that equal to gives . Now it is pure number theory: you need . The powers of 10 modulo 13 run , so is the first that works, , and . Check: .
The same move cracks the three-digit multiples of 11 equal to eleven times their digit-square sum (IMO 1960): place value, then the divisibility rule for 11 splits it into two cases, and each case is a small equation with a short list of candidates. The answers are 550 and 803.
The tangled divisibility. If divides , the quotient is a perfect square (IMO 1988). Call the quotient and read as a quadratic in . The other root is , an integer, so a solution with produces a smaller one until that root reaches zero. Follow the chain for : jumps to , then to , then to , where . That descent to the bottom is the whole proof, and it is the reason the method is filed under infinite descent and Vieta jumping.
When it really is algebra
The signals cut both ways. If the problem says real numbers, or asks for an exact value, or the unknowns can be fractions, the integer moves are worthless and you should solve, substitute and simplify. The problem is the useful reminder that some problems need both: an algebraic identity to produce the factors, and a number theory question to make the factors matter.
The quickest practice is to take ten number theory problems from the problem archive and, before solving any, write one line for each: which signal fired and which of the three moves it calls for. Recognition is the skill you are short of, and it trains faster than solving does. The daily problem is a cheap way to keep it warm.
Related guides
- gcd(2^m − 1, 2^n − 1): the proof, and how to spot itWhy gcd(2^m − 1, 2^n − 1) = 2^gcd(m,n) − 1: run Euclid's algorithm on the exponents. A full proof, a second proof by orders, and where it turns up.
- How to build a problem-solving notebook that actually worksMost problem notebooks are copied solutions nobody reopens. Index yours by the clue in the statement, not by topic, and test it from the clue side.
- What separates a Level 5 problem from a Level 7, side by sideTwo IMO inequalities, both rated 5 out of 6, sit two rungs apart on the ladder. What actually separates a Level 5 problem from a Level 7, and how to cross.
- How to revise a topic you understand but keep missingRereading a topic you already understand fixes nothing. Find the one step that keeps breaking, revise that step, and test it cold. Worked on mods and bounds.
Train it on Lemma
Every technique here is taught explicitly, in order. 125 lessons, 1206 curated problems and unlimited generated practice at six difficulties. Free to start, no card, and every paid plan opens with 3 free days.
Find your level