I used Fermat's Little Theorem to find:
$$9^{45} \mod 23$$ What I have done so far: $$9^{45} = (9^2)^{22}9$$
$$9^{22} \equiv 1 \pmod{23}$$ According to Fermat's Little Theorem.
So, now I have: $$9^{45} \equiv (9^2)^{22}9 \equiv 1^2 9 \pmod{23}$$
So: $$9^{45} \mod 23 = 9$$
I am a bit uncertain about my notation etc. For example, in the last line, should it be a $\equiv$ or a $=$? Can someone please verify my method?
9 ** 45 % 23and the computer would spit out9. – Ben Grossmann Jul 20 '15 at 19:13