centenes of $7^{999999}$ 
What is the value of the hundreds digit of the number $7^{999999}$?

Equivalent to finding the value of $a$ for the congruence $$7^{999999}\equiv a\pmod{1000}$$

Use Euler's theorem: $7^{\phi (1000)} ≡ 1 \mod 1000 $.
By Euler's product formula: $\phi(1000) = 1000\cdot(1-\frac{1}{2})\cdot(1-\frac{1}{5})=400$
So $7^{400}≡1 \mod 1000 $.
$999999=400\cdot 2500-1$. So it suffices to find $7^{399}\mod 1000$.
