I'm trying to find the last two digits of ${2012}^{2012}$. I know you can use (mod 100) to find them, but I'm not quite sure how to apply this. Can someone please explain it?


$\phi(25) = 20$ so $2012^{2012} \equiv 2012^{12} \pmod {25}$.

Then $2012^{12} \equiv 12^{12} \equiv 144^6 \equiv 36^3 \equiv 6 \pmod {25}$.

Then solving the system $N \equiv 6 \pmod {25}, \equiv 0 \pmod 4$ gives $n \equiv 56 \pmod {100}$.


Finding the last two digits of $a$ essentially $\displaystyle a\pmod{100}$

Now as $\displaystyle2012\equiv12, 2012^{2012}\equiv12^{2012}\pmod{100}$

Again as $\displaystyle(12,100)=4$ let us find $\displaystyle12^{2012-1}\pmod{\frac{100}4}$ i.e., $\displaystyle12^{2011}\pmod{25}$

Now using Carmichael function or Totient function $\displaystyle\lambda(25)=\phi(25)=20,2011\equiv11\pmod{20}\implies12^{2011}\equiv12^{11}\pmod{25}$

Method $\#1:$

Again, $\displaystyle12^2=144\equiv-6\pmod{25}\implies12^3\equiv-6\cdot12\equiv3$

$\displaystyle\implies12^9\equiv3^3\equiv2\implies12^{11}\equiv2\cdot(-6)\equiv-12\pmod{25}$

Method $\#2:$

$\displaystyle12^2=144=(145-1)\implies12^{10}=(-1+145)^5$ $\displaystyle=-1+\binom51\cdot145-\binom52145^2+\cdots+145^5$ $\displaystyle12^{10}\equiv-1\pmod{25}\ \ \ \ (1)$ as the rest of terms are divisible by $5^2=25$

As $\displaystyle a\equiv b\pmod m\implies a\cdot c\equiv b\cdot c\pmod{m\cdot c}\ \ \ \ (2)$

Using $(1),(2)$ with $c=12$ $\displaystyle12^{11}=12\cdot12^{10}\equiv-1\cdot12\pmod{12\cdot25}\equiv-12\pmod{300}\equiv-12\pmod{25}$

So, by any of the two methods $\displaystyle12^{11}\equiv-12\pmod{25}$

Using $(2)$ again with $c=12$, $\displaystyle\implies12^{12}\equiv-12\cdot12\pmod{25\cdot12}\equiv-144\equiv156\pmod{300}$

$\displaystyle\implies12^{12}\equiv156\pmod{300}\equiv156\pmod{100}\equiv56$