TITLE: Solve $2^{99}$ mod $101$
QUESTION [6 upvotes]: My number theory is a bit rusty, so i am trying to recall how to work this problem out. 
I know that the euler theorem would state that $2^{\phi(101)} \equiv 1$ mod $101$
But in this case, $\phi(101)$ is $100$ so i only know how to calcuate $2^{100}$ mod $101$

REPLY [3 votes]: Note that $$2^9=512 \equiv 7 \pmod {101}$$
So we have that $$2^{99}\equiv 7^{11} \pmod {101}$$
Can you do it now?