This is a exam question, something related to network security, I have no clue how to solve this!

Last two digits of $7^4$ and $3^{20}$ is $01$, what is the last two digits of $14^{5532}$?


By the Chinese remainder theorem, it is enough to find the values of $14^{5532}\mod 4$ and $\bmod25$.

Now, clearly $\;14^{5532}\equiv 0\mod 4$.

By Euler's theorem, as $\varphi(25)=20$, and $14$ is prime to$25$, we have: $$14^{5532}=14^{5532\bmod20}=14^{12}\mod25.$$ Note that $14^2=196\equiv -4\mod25$, so $14^{12}\equiv 2^{12}=1024\cdot 4\equiv -4\mod25$.

Now use the C.R.T.: since $25-6\cdot4=1$, the solutions to $\;\begin{cases}x\equiv 0\mod 4\\x\equiv -4\mod 25\end{cases}\;$ are: $$x\equiv \color{red}0\cdot25-6\cdot{\color{red}-\color{red}4}\cdot 4= 96\mod 100$$ Thus the remainder last two digits of $14^{5532}$ are $\;96$.


Finding the last two digits necessarily implies $\pmod{100}$

As $(14^n,100)=4$ for $n\ge2$

Let use start with $14^{5532-2}\pmod{100/4}$ i.e., $14^{5530}\pmod{25}$

As $14^2\equiv-2^2\pmod{25}$

Now $2^5\equiv7,2^{10}\equiv7^2\equiv-1\pmod{25}$

$\implies14^{10}=(14^2)^5\equiv(-2^2)^5=-2^{10}\equiv-1(-1)\equiv1$

As $5530\equiv0\pmod{10},14^{5530}\equiv14^0\pmod{25}\equiv1$

Now use $a\equiv b\pmod m\implies a\cdot c\equiv b\cdot c\pmod {m\cdot c} $

$\displaystyle14^{5530}\cdot14^2\equiv1\cdot14^2\pmod{25\cdot14^2}$

As $100|25\cdot14^2,$

$\displaystyle14^{5530+2}\equiv14^2\pmod{100}\equiv?$


${\rm mod}\,\ \color{#c00}{25}\!:\, \ 14\equiv 8^{\large 2}\Rightarrow\, 14^{\large 10}\equiv \overbrace{8^{\large 20}\equiv 1}^{\rm\large Euler\ \phi}\,\Rightarrow\, \color{#0a0}{14^{\large 1530}}\equiv\color{#c00}{\bf 1}$

${\rm mod}\ 100\!:\,\ 14^{\large 2}\, \color{#0a0}{14^{\large 1530}} \equiv 14^{\large 2} (\color{#c00}{{\bf 1}\!+\!25k}) \equiv 14^{\large 2} \equiv\, 96$


The OP quickly realizes that we can't write $14^k \equiv 1 \pmod{100}$ with $k \gt 0$, but there are still relations to be found in (multiplicative) semigroups.

If the last digit of integers $a$ and $b$ end in $6$, then the last digit of the product ends in $6$. This motivates us to write

$\quad 14^2 \equiv 96 \equiv -4 \pmod{100}$

and

$\quad 96^2 \equiv 16 \pmod{100}$
$\quad 96^3 \equiv 36 \pmod{100}$
$\quad 96^4 \equiv 56 \pmod{100}$
$\quad 96^5 \equiv 76 \pmod{100}$
$\quad 96^6 \equiv 96 \pmod{100}$

and

$\quad 96^{36} \equiv 96 \pmod{100}$
$\quad 96^{216} \equiv 96 \pmod{100}$
$\quad 96^{1296} \equiv 96 \pmod{100}$

So

$\; 14^{5532} = (14^2)^{2766} \equiv 96^{2766} \equiv (96^{1296})^2 (96^{174}) \equiv 96^{176} \equiv (96^{36})^4 (96^{32}) \equiv 96^{36} \equiv 96 \pmod{100}$