Finding unit's digit in exponentiation Could someone please explain to me how to find the unit's digit in the following expression:
$$7^{95} - 3^{58}$$
 A: Unit Digit means $\pmod{10}$
Observe that $7\equiv7\pmod{10},7^2=49\equiv9,7^3\equiv9\cdot7\equiv3,7^4\equiv3\cdot7\equiv1$
$3\equiv3\pmod{10},3^2=9\equiv9,3^3=27\equiv7,3^4=81\equiv1$
So, both $3,7$ have a cycle with period $=4$ which can be also confirmed using Euler's Totient Theorem with $\phi(10)=\phi(2)\phi(5)=4$ and $(3,10)=(7,10)=1$
As $95=23\cdot4+3$ and $58=4\cdot14+2,$
$7^{95}=(7^4)^{23}\cdot7^3\equiv1^{23}\cdot3\pmod{10}$
and $3^{58}=(3^4)^{14}\cdot3^2\equiv1^{14}\cdot9\pmod{10}$
A: If you calculate the powers of $7$, the unit digit repeats $7,9,3,1,7,9,3,1...$. As they repeat after $4$ steps, the 95th step is....
If you calculate the powers of $3$, the unit digit repeats $3,9,7,1,3,9,7,1...$. As they repeat after $4$ steps, the 58th step is....
This way you can calculate the unit digit of $7^{95}$ and $3^{58}$, and then of their difference.
A: Note that $7^2$ "ends" in a $9$. So $7^4=7^2\cdot 7^2$ ends in a $1$, So $7^8=7^4\cdot 7^4$ ends in a $1$, and therefore $7^{12}=7^8\cdot 7^4$ ends in a $1$, and therefore $7^{16}$ ends in a $1$, and so on. In general, if $n$ is divisible by $4$, then $7^n$ ends in a $1$.
It follows that $7^{92}$ ends in a $1$. We are almost there. Just multiply by $7$ three more times. The result ends in a $3$.
Similarly, $3^2$ ends in a $9$, so $3^4$ ends in a $1$, Thus $7^{36}$ ends in a $1$, and therefore $7^{38}$ ends in a $9$. 
Now we are subtracting a number that ends in $9$ from a number that ends in $3$. The result ends in $4$.
