Practice bank

Remainders of powers repeat in cycles

QuantNumber propertiesHard

What is the remainder when 7^23 is divided by 5?

  • A0
  • B2
  • C3
  • D4
  • E1

Try it before you scroll. Two minutes on the clock, then commit to an answer.

Correct answer: C

Nobody computes 7^23. Remainders of powers cycle, so find the cycle instead.

Work mod 5. Since 7 ≡ 2 (mod 5), the powers of 7 mod 5 behave like powers of 2:

  • 7^1 ≡ 2
  • 7^2 ≡ 4
  • 7^3 ≡ 8 ≡ 3
  • 7^4 ≡ 6 ≡ 1
  • 7^5 ≡ 2 again, so the cycle has length 4: 2, 4, 3, 1.

Now place 23 in the cycle. 23 = 4 × 5 + 3, so 7^23 lands on the 3rd position of the cycle, which is 3.

The remainder is 3.

Why the traps exist: (A) would require the power to be a multiple of 5, impossible since 7 and 5 share no factor. (B), (D), and (E) are the other three positions in the cycle, which you get if you misplace the exponent (for example using 23 mod 4 = 3 but reading the cycle one slot off). Write the cycle out with its indices before you match.