The Last Digit of a Colossal Power
The problem
What is the remainder when is divided by ? Give the answer as an integer between and .
- You may not compute — it has digits.
- Only remainders are needed at each step.
Take a minute
Reveal hint 1
Reducing the base modulo is always allowed: .
Reveal hint 2
Powers of modulo repeat with period : .
Solution
Answer.
Derivation
-
Reduce the base.
-
Find the cycle length of powers of .
-
Reduce the exponent modulo the cycle length.
-
Justify the shortcut.
-
State the answer in the required range.