Skip to content

Lesson 4 of 11 · Remainders

Fermat's Little Theorem

Number System · for IPMAT Indore, IPMAT Rohtak and JIPMAT

Video lesson: Fermat's Little Theorem

Sign in to watch · 4 min video

Formulas you need

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.

How Remainders is asked

  • 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

Picked from the Remainders note for this micro-concept automatically. The whole note: Remainders.

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

Start free