# 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"?

• $13\equiv 1 \pmod {12}$...doesn't help with the units digit. Try $\pmod {10}$
– lulu
Oct 19, 2017 at 17:39
• HINT: $3^{29}+1^{12}+5$ Oct 19, 2017 at 17:41
• ohh I see, so you say that $10$ is better. or rather the only one since I cannot pick smaller than $10$ but greater neighter, right? Oct 19, 2017 at 17:41
• There is a mistake in your computations. It should be $3+1+5=9$. Oct 19, 2017 at 17:45
• You could work mod $20$ or in fact mod $10k$ for any positive integer $k$, but that would be more work. Working mod $10$ tells us the last digit of the result.
– robjohn
Oct 19, 2017 at 17:56

Work $\pmod {10}$

$$3^{29}+1^{12}+5$$

$$3\cdot3^{28}+1^{12}+5$$

$$3\cdot81^{7}+1^{12}+5$$

$$3\cdot1^{7}+1^{12}+5$$

$$3+1+5=9$$

Also, you should've chosen $\pmod{10}$ too. Why? The last digit is the remainder when the number is divided by $10$

Choose modulus 10. Also, your answer is wrong. The answer should be 9.

Here's how. $11^{12} \mod 10 \equiv 1^{12} \mod 10 \equiv 1 \mod 10$.

$3^{29} \mod 10 \equiv 3^{28} \cdot 3 \mod 10 \equiv 81^{7}\cdot 3 \mod 10 = 3 \mod 10$.

$15 \mod 10 \equiv 5 \mod 10$.

Adding you get 9.

$(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$.