<s>[INST] 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}$$
 [/INST] 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$.
</s>