<s>[INST] Last digit of $3^ {29}+11^{12}+15$ I found this exercise in Beachy and Blair: Abstract Algebra:
Find the units digit of
$$
3^{29}+11^{12}+15
$$
by choosing an appropriate modulus and reducing the sum.
I find $12$ being an appropriate one since
$$
3^{29}=3^2\cdot ((3^3)^3)^3
$$
and 
$$
3^3\equiv3\ \ (mod \ 12)
$$
so 
$$
3^{29}\equiv 3 \ (mod \ 12)
$$
furthermore
$$
11^{12}=(11^2)^{6}\equiv 1 \ (mod \ 12)
$$
finally 
$$
15\equiv 3 \ (mod \ 12).
$$ 
So the last digit should be 
$$
3+1+3=7.
$$
Is this right? And could I have chosen the modulus "more appropriately"?
 [/INST] $(10+r)^n=\underbrace{10^n+C_n^1\,10^{n-1}r+C_n^2\,10^{n-2}r^2+...}_\text{all this is divisible by 10}+r^n$ by binomial formula.
So we have the identity : $(10+r)^n\equiv r^n\pmod{10}$


*

*$15\equiv 5\pmod{10}$

*$11^{12}=(10+1)^{12}\equiv 1^{12}\equiv 1\pmod{10}$

*$3^{28}=9^{14}=(10-1)^{14}\equiv(-1)^{14}\equiv 1\pmod{10}$


Finally $3^{29}+11^{12}+15\equiv 3\times 1+1+5\equiv 9\pmod{10}$
So the last digit is a $9$.
</s>