Find $10^{5^{101}}$ modulo $21$

638 Views Asked by At

Most of the solutions to this question goes on by stating $10^{5^{101}}$ as $10^{505}$. But shouldn't this be thought as $5^{101}$, not $(10)^{5\cdot 101}$? Well if I do solve it as $10^{505}$, I get the answer as {10}.

1

There are 1 best solutions below

5
On BEST ANSWER

You're right, it would be no fun if it were $10^{505}$.

By Little Fermat, $10^6\equiv 1\mod 7$ and $10^2\equiv 1\mod 3$, hence the Chinese remainder theorem ensures $10^6\equiv 1\mod 21$. Thus $$10^n\equiv10^{n\bmod 6}\pmod{21}$$

Now $5$ is invertible modulo $6$, and has order $2$ in the group $(\mathbf Z/6\mathbf Z)^\times$, which means $5^{101}\equiv 5^{101\bmod2}=5\pmod6$. So, modulo $21$: $$10^{5^{101}}\equiv 10^5=(10^2)^2\cdot10\equiv(-5)^2\cdot10\equiv 40\equiv 19.$$

In case it would have to be interpreted as $10^{505}$, it is simpler: $$10^{505}\equiv10^{505\bmod6}=10^1=10.$$