TITLE: Find The Last 3 digits of the number $2003^{2002^{2001}}$
QUESTION [15 upvotes]: Find The Last 3 digits of the number $2003^{2002^{2001}}$
BY number theory or otherwise, 
Also i would like to ask is there a property observed in the numbers of the form $k^n$, where for some $k, n$ is varied then the digits of $k^n$ are periodic,
for example,
$2^n$, 
its last digit is periodic with period 4,
its second last digit is periodic $4\cdot 5 = 20$
its third last digit is periodic with periodic with period $20\cdot 5 =100$
I have observed this property with other numbers as well, though period might vary,for different values of $k$.

REPLY [4 votes]: We have $\displaystyle2003^{(2002^{2001})}\equiv3^{(2002^{2001})}\pmod{1000}$
Using Carmichael Function, $\displaystyle\lambda(1000)=100$
So, $\displaystyle 3^{(2002^{2001})}\equiv3^{(2002^{2001}\pmod{100})}\pmod{1000}$
Now, $\displaystyle  2002^{2001}\pmod{100}\equiv2^{2001}\pmod{100}$
As  $\displaystyle(2^{2001},100)=2^2,$ we start with $\displaystyle2^{2001-2}\pmod{\frac{100}{2^2}}$ i.e., $\displaystyle2^{1999}\pmod{25}$
As $\displaystyle\phi(25)=20,2^{20}\equiv1\pmod{25},$
$\displaystyle2^{2000}\equiv1\pmod{25}\implies\displaystyle2^{1999}\equiv2^{-1}$
As $\displaystyle2\cdot13=26\equiv1\pmod{25},2^{1999}\equiv13$ 
$\displaystyle\implies2^{2001}=2^2\cdot2^{1999}=2^2\cdot13\pmod{2^2\cdot25}\equiv52$
$\displaystyle\implies3^{(2002^{2001})}\equiv3^{52}\pmod{1000}$
Now, $\displaystyle3^{52}=(3^2)^{26}=(10-1)^{26}=(1-10)^{26}\equiv1-\binom{26}110+\binom{26}210^2\pmod{1000}$
Again, $\displaystyle\binom{26}2=\frac{26\cdot25}2=13\cdot25=325\equiv5\pmod{10}$
$\displaystyle\implies(1-10)^{26}\equiv1-260+5\cdot10^2\pmod{1000}\equiv1-260+500$