As the question stated, what is the remainder when ${13}^7$ is divided by 9? There are quite a few online questions similar to this. However, I do not really understand the concept of it.
I have attempted this question by looking for a pattern (as suggested in some online search):
${13}^1 / 9$ = 4 remainder
${13}^2 / 9$ = 7 remainder
${13}^3 / 9$ = 1 remainder
${13}^4 / 9$ = 4 remainder
...
There is clearly a pattern of 4, 7, 1 before it repeats itself in the power 4. For power 7, the remainder is therefore 4. I believe the answer to this question is 4 remainder.
My question is how will I approach if the power is much larger than power 7? Say, if we have ${13}^{100}$ divide by 9, is it right to find the remainder using this method:
$100 / 3 = 33.33333 $
Since $33 * 3 = 99$, for the remainder at the 100th power, it will be 4.
Is there a more elegant way of doing this?
Edit:
Actually, this method does not seem to work if the divisible value is larger than 13. Any idea?