Lemma › Techniques › Modular Thinking
Olympiad problem-solving technique
Modular Thinking
When the numbers are too big, shrink the universe.
Reduce everything modulo a well-chosen and infinite problems become finite. Powers cycle, squares hit only a few residues (; ), and impossible equations reveal themselves in a finite check.
Choosing the modulus is the art: mod 4 or 8 for squares, mod 9 for digit sums and cubes, mod with Fermat for large exponents.
Train it on Lemma
Modular Thinking unlocks at Level 4 of Lemma's eight-level ladder, with lessons that teach it and drills that make it stick. 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 levelMore techniques
- Double CountingCount it twice, set the answers equal.
- Ceva & MenelausConcurrency and collinearity are products of ratios.
- All 29 techniques →