# Calculating the last digit of exponent

I need to calculate the last digit of $723^n$.(For every positive integer $n$).

If it was to calculate the last digit of $a^b$ when I know the value of $a$ and $b$,then it was easy-

for example,If I was asked to calc the last two digis of $3^{1123}$,I calculate the Euler function of $100$, which is $40$.Then,since $gcd(3,100)=1$, We know that $3^{40}\equiv 1 \pmod {100}$ So:

$3^{1123} \equiv 3^{1120}\cdot 3^3 \equiv (3^{40})^28 \cdot 3^3\equiv 1\cdot 27 \pmod{100}.$ So it's 27.

But I'm not sure how to do it when I don't know the power...

• You can create cases as last digit ogle powers of three follow some pattern – Archis Welankar Jun 23 '16 at 10:06
• The last digit $\iff\pmod{10}$ and $\phi(10)=4$ – lab bhattacharjee Jun 23 '16 at 10:08
• The last digit of $723^n$ is the same as the last digit of $3^n$, obviously. Now write down the first few terms, $3^1,3^2,...$, and you will see a sequence. – TonyK Jun 23 '16 at 10:12

Note that $723 \equiv 3 \pmod {10} \implies 723^n \equiv 3^n \pmod {10}$. But also $\phi(10) = 4$, so we have that $3^{4k+t} \equiv 3^t \pmod {10}$. So eventually to find all possible residues you need to calculate the resudies of $3^0, 3^1, 3^2$ and $3^3$ modulo 10.