Tuesday, 10 March 2026

Exercise (5.2).6

Find the last three digits of $27^{1 000 000}$.


Since $\gcd(27,1000)=1$, Euler's Theorem tells us

$$ 27^{\phi(1000)} \equiv 1 \pmod {1000} $$

Using $\phi(1000) = 400$ gives us

$$ 27^{400} \equiv 1 \pmod {1000} $$

Noting that $1000000 = 400 \times 2500$, we have

$$ 27^{1000000} \equiv (27^{400})^{2500} \equiv 1^{2500} \equiv 1 \pmod {1000} $$

And so the last three digits of $27^{1000000}$ are $001$.