Learn / Library / Mental math
Cycling remainders of powers
Let . Find the remainder of on division by .
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Look for the first power that leaves remainder .
Solution
- , which leaves remainder on division by .
- , so .
- Modulo this is .
- The remainder is .
Answer: