Last digit of power explanation

78 Views Asked by At

This question follows up on an example from brilliant.org

Look at the example of finding the last three digits of $4^{2^{42}}$

Euler's totient function is used, but I think incorrectly so I want to clear my doubts. The author uses it for reducing the exponent. Concretely this is the issue:

$2^{42} \equiv 2^2 \equiv 4$ (mod 100)

How is it possible to use Euler's theorem to reduce this exponent if $2$ and $100$ are not coprime?

1

There are 1 best solutions below

1
On

$100 = 2^2 \cdot 5^2$, so any value mod $100$ depends on that value mod $2^2$ and mod $5^2$. Mod $2^2$ is easy: $2^j \equiv 0 \mod 2^2$ if $j \ge 2$. Mod $5^2$ you use Euler.