The idea

Remainders behave like a clock: add, subtract and multiply the remainders, not the numbers. Powers settle into cycles; the cycle length divides for a prime modulus (Fermat) and in general. Modulo the remainder of a number is that of its digit sum, which is why Indore loves huge powers modulo .
Textbook vs exam method
Textbook method
Write . For : reduce , list until appears (cycle ), then . Fermat and Euler give or . For sums (factorials, geometric series) identify the terms that vanish modulo or the block that repeats. Wilson: .
Exam method
- Indore 2025 Q3. , with gives ; so ; remainder .Indore 2025
- Indore 2019 Q23. , , : remainder .Indore 2019
- Indore 2026 (memory). ; , , : .
- Indore 2023 Q8. onwards is a multiple of ; .Indore 2023
- Indore 2020 Q1. with : dividend .Indore 2020
- Wilson. because is prime.
Worked examples
, , remainder .
; , , ; total .
A number leaves on division by ; modulo it is
or .
last four digits , remainder .
blocks of three sum to ; terms, remainder .
Traps
- Cycle length confused with modulus; negative remainders left as such; towers vs products of exponents; forgotten; Wilson applied to composites.
Formulas
In the exam
- Reduce the base to its remainder (digit sum for ), find the smallest power that is , reduce the exponent by that cycle.
- A base one more than a multiple of always leaves ; one less leaves or by the parity of the exponent.
- For multiply the exponents; for reduce modulo the cycle length first.
- Sums of factorials: find the first with and add only the earlier terms.
- Successive division: rebuild the number from the last quotient upwards; the least such number has every intermediate quotient as small as possible.
- and give immediately; if list the possible remainders ( modulo is or ).
Before this
What the exams ask here
- remainder of a^n by 7, 9, 11, 13, 17
- 11^1011 + 1011^11 mod 9 (Indore 2025 Q3); (29^29)^29 mod 9 (Indore 2019 Q23); 7^103 + 7^101 mod 9 (Indore 2026)
- 1! + 2! + ... + 95! mod 15 (Indore 2023 Q8)
- quotient x remainder = 24, sum 10, divisor 5 -> dividend (Indore 2020 Q1); N = 36k + 14 -> N mod 24
- (p-1)! mod p (Wilson)
- 123456...4950 mod 16 / 9 / 11
- 1 + a + a^2 + ... + a^n mod m