Skip to content

Remainders

12 lessons · 37 questions · 32 PYQs · ~60 s per question

The idea

Remainders behave like a clock: add, subtract and multiply the remainders, not the numbers. Powers settle into cycles; the cycle length divides p−1p-1 for a prime modulus (Fermat) and φ(m)\varphi(m) in general. Modulo 99 the remainder of a number is that of its digit sum, which is why Indore loves huge powers modulo 99.

Textbook vs exam method

Exam method

  1. Indore 2025 Q3. 11≡211\equiv2, 210112^{1011} with 1011≡3(mod6)1011\equiv3\pmod6 gives 88; 1011≡3(mod9)1011\equiv3\pmod9 so 311≡03^{11}\equiv0; remainder 88.Indore 2025
  2. Indore 2019 Q23. 2984129^{841}, 29≡229\equiv2, 841≡1(mod6)841\equiv1\pmod6: remainder 22.Indore 2019
  3. Indore 2026 (memory). 7103+7101=50⋅71017^{103}+7^{101}=50\cdot7^{101}; 73≡17^3\equiv1, 7101≡72≡47^{101}\equiv7^2\equiv4, 50≡550\equiv5: 20≡220\equiv2.
  4. Indore 2023 Q8. 5!5! onwards is a multiple of 1515; 1+2+6+24=33→31+2+6+24=33\to3.Indore 2023
  5. Indore 2020 Q1. {q,r}={4,6}\{q,r\}=\{4,6\} with r<5r<5: dividend 5⋅6+4=345\cdot6+4=34.Indore 2020
  6. Wilson. 150! mod 151=150150!\bmod151=150 because 151151 is prime.

Worked examples

Example 1Sitter

2100 mod 72^{100}\bmod7

Example 2Easy

1250+5012 mod 1112^{50}+50^{12}\bmod11

Example 3Easy

A number leaves 1414 on division by 3636; modulo 2424 it is 36k+14≡12k+1436k+14\equiv12k+14

Example 4Typical

123456…4950 mod 16123456\ldots4950\bmod16

Example 5Typical

1+3+32+⋯+3200 mod 131+3+3^2+\dots+3^{200}\bmod13

Traps

  • Cycle length confused with modulus; negative remainders left as such; towers vs products of exponents; 3k≡0(mod9)3^k\equiv0\pmod9 forgotten; Wilson applied to composites.

Formulas

Division algorithm

N=dq+r,0≤r<dN=dq+r,\quad 0\le r<d

Indore 2020 Q1: quotient x remainder = 24, sum 10, divisor 5 -> the remainder must be below 5, so r = 4, q = 6, dividend 34.
Remainders of sums and products

(a±b) mod m=((a mod m)±(b mod m)) mod m,(ab) mod m=((a mod m)(b mod m)) mod m(a\pm b)\bmod m=((a\bmod m)\pm(b\bmod m))\bmod m,\quad (ab)\bmod m=((a\bmod m)(b\bmod m))\bmod m

Reduce every factor first; use negative remainders (288 = 17 x 17 - 1) to keep numbers tiny.
Bases congruent to plus or minus one

a≡−1(modm) ⇒ an≡(−1)n;a≡1 ⇒ an≡1a\equiv-1\pmod m\ \Rightarrow\ a^{n}\equiv(-1)^{n};\qquad a\equiv1\ \Rightarrow\ a^{n}\equiv1

Indore 2025 Q3 / 2026: 11 = 9 + 2, 1011 has digit sum 3; 7^103 + 7^101 = 7^101 x 50 with 7^3 = 1 mod 9.
Fermat's little theorem and Euler's theorem

ap−1≡1(modp) (p prime, p∤a);aφ(m)≡1(modm) (gcd⁡(a,m)=1)a^{p-1}\equiv1\pmod p\ (p\text{ prime},\ p\nmid a);\qquad a^{\varphi(m)}\equiv1\pmod m\ (\gcd(a,m)=1)

Reduce the exponent modulo p - 1 (or the actual cycle length, which divides p - 1); 2^2025 mod 7: 2025 = 3 x 675, 2^3 = 1.
Wilson's theorem

(p−1)!≡−1(modp),(p−2)!≡1(modp)(p prime)(p-1)!\equiv-1\pmod p,\quad (p-2)!\equiv1\pmod p\quad(p\text{ prime})

150! mod 151 = 150; 149! mod 151 = 1; n! mod (n+1) = 0 when n + 1 is composite and at least 6.
Remainders modulo 9 through digit sums

N≡S(N)(mod9);26≡1(mod9);3k≡0(mod9) (k≥2)N\equiv S(N)\pmod 9;\quad 2^{6}\equiv1\pmod 9;\quad 3^{k}\equiv0\pmod 9\ (k\ge2)

Indore 2019 Q23: (29^29)^29 = 29^841, 29 = 2 mod 9, cycle 6, 841 = 1 mod 6 -> 2.
Sums of factorials modulo m

n!≡0(modm) once n! contains every prime power of m ⇒ ∑k=1Nk!≡∑k<k0k!(modm)n!\equiv0\pmod m\ \text{once }n!\text{ contains every prime power of }m\ \Rightarrow\ \sum_{k=1}^{N}k!\equiv\sum_{k<k_0}k!\pmod m

Indore 2023 Q8: 1! + ... + 95! mod 15 = (1 + 2 + 6 + 24) mod 15 = 3; modulo 40 the cut-off is 6!.
Geometric sums modulo m

1+a+⋯+an: group in blocks of the cycle length t of a mod m; each block has a fixed residue1+a+\dots+a^{n}:\ \text{group in blocks of the cycle length }t\text{ of }a\bmod m;\ \text{each block has a fixed residue}

QC Final 30: 3^0 + ... + 3^200 mod 13: cycle 3, block sum 1 + 3 + 9 = 13 = 0, so only the leftover terms count.

In the exam

Shortcuts
  • Reduce the base to its remainder (digit sum for 99), find the smallest power that is ±1\pm1, reduce the exponent by that cycle.
  • A base one more than a multiple of mm always leaves 11; one less leaves 11 or m−1m-1 by the parity of the exponent.
  • For (ak)k(a^{k})^{k} multiply the exponents; for abca^{b^{c}} reduce bcb^{c} modulo the cycle length first.
  • Sums of factorials: find the first kk with m∣k!m\mid k! and add only the earlier terms.
  • Successive division: rebuild the number from the last quotient 00 upwards; the least such number has every intermediate quotient as small as possible.
  • N≡r(modm)N\equiv r\pmod m and d∣md\mid m give N≡r(modd)N\equiv r\pmod d immediately; if d∤md\nmid m list the possible remainders (36k+1436k+14 modulo 2424 is 1414 or 22).
~60 s per question at exam speed
When to skip: Skip a remainder question with a composite modulus above 100100 and no ±1\pm1 pattern in sight; everything modulo 55, 77, 99, 1111, 1313 is a 40-second item.

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
Next sub-topicUnit and Last Digits

Practise this free. Every mistake is saved and comes back until you fix it.

Start free