What will be the remainder when (222)222 is divided by 7?

2026

What will be the remainder when (222)222 is divided by 7?

  1. A.

    6

  2. B.

    0

  3. C.

    1

  4. D.

    5

Attempted by 2183 students.

Show answer & explanation

Correct answer: C

To find the remainder of a very large power modulo a prime number: first reduce the base modulo that prime, then control the huge exponent with Fermat's Little Theorem — for a prime p and any integer a not divisible by p, a(p−1) ≡ 1 (mod p). This turns an unmanageable exponent into a small, cyclic one.

  1. Reduce the base 222 modulo 7: 217 = 7 × 31, and 222 − 217 = 5, so 222 ≡ 5 (mod 7).

  2. Substitute this residue: 222222 ≡ 5222 (mod 7).

  3. Since 7 is prime and 5 is not divisible by 7, Fermat's Little Theorem gives 56 ≡ 1 (mod 7).

  4. Express the exponent 222 as an exact multiple of this cycle length 6: 222 = 6 × 37.

  5. So 5222 = (56)37 ≡ 137 ≡ 1 (mod 7).

Cross-check independently by cycling the powers of 5 modulo 7: 51 ≡ 5, 52 ≡ 4, 53 ≡ 6, 54 ≡ 2, 55 ≡ 3, 56 ≡ 1 (mod 7) — confirming the cycle length of 6 used above. Since 222 is an exact multiple of 6, the power returns to 1 with nothing left over, matching the Fermat's Little Theorem result.

Hence, the remainder when 222222 is divided by 7 is 1.

Explore the full course: Tcs Preparation