Finding last two digits How to find the last two digits of $$(3^{1997})$$ ......  I tried to do $$(3^{1997})$$ (mod 100) . I reached on that $$3^{20}$$ is congruent to 1 (mod 100) .  But the calculation was getting very long after that . If anyone could correct me (or shorten) my method . Actually i have got the answer as 63 by this long process 
 A: We have $3^{20}\equiv 1 \pmod {100}$ and $1997=29.99+17$, so we deduce that $3^{1997}=(3^{20})^{99}\cdot 3^{17}$, thus $3^{1997}\equiv 3^{17}\pmod {100}$. Now, since $3^{17}\equiv 63\pmod {100}$, then $3^{1997}\equiv 63 \pmod {100}$, and   we get that the last two digits of $3^{1997}$ are $6$ and $3$.
A: $100 = 2^2 \cdot 5^2$, so $\varphi(100) = 2 \cdot 5 \cdot 4 = 40$.
That means if $a$ is coprime to $100$, $a^{40} \equiv 1 \mod 100$.
Since $1997 = 40 \cdot 50 - 3$, $$3^{1997} \equiv 3^{-3} \mod 100$$
Now $3^{-1} \equiv 67 \mod 100$ (i.e. $3 \cdot 67 = 201 \equiv 1 \mod 100$), 
and $67^3 = 300763 \equiv 63 \mod 100$, so we conclude 
$$ 3^{1997} \equiv 63 \mod 100$$
A: From Euler's Theorem, and the fact that $\phi(100)=40$, we have that $3^{40} \equiv 1 (\bmod{100}).$  So $3^{1997} \equiv 3^{2000}3^{-3} \equiv (3^{40})3^{-3} \equiv 3^{-3} (\bmod{100}).$
It's not to hard to get an inverse for $3$ modulo $100$, since $1\equiv 201 \equiv 3\cdot 67 (\bmod{100}).$  So $3^{1997} \equiv 67^3 \equiv 63 (\bmod{100}).$
