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. 78 lessons, 624 curated problems and unlimited generated practice at six difficulties. Free to start — no card, no trial clock.
Find your levelMore techniques
- Double CountingCount it twice, set the answers equal.
- InductionTwo finite steps climb an infinite ladder.
- All 26 techniques →