# Powers and remainders

Over on Reddit, a couple of “last digit” puzzles crossed my path, and I thought I’d share the tricks I used, as much for my reference as anything else.

## 1. Show that the last digit of $6^k$ is 6, for any positive integer $k$.

There’s a standard way to prove this using induction (it’s true for 6, and $6(10k+6) = 60k + 36$, which ends in 6, so every power of 6 must end in 6). However, I prefer a different way:

- Consider $(5 + 1)^k$
- The binomial expansion of this is $5^k + \nCr{k}{1} 5^{k-1} + \dots + \nCr{k}{k-1} 5 + 1$
- Every term except the last is a multiple of 5, so $6^k$ is one more than a multiple of 5.
- Therefore it ends with 1 or 6.
- It’s even, so it must end in 6. $\blacksquare$

## 2. Show that $4^n \equiv 4 \pmod{6}$, for any positive integer $k$.

Again, induction is a lovely way to show this. And again, I’m going to do it differently.

- Consider $4^n - 4$, which is $2^{2n} - 2^2$
- Factorise as $\left(2^n - 2\right)\left(2^n + 2\right)$
- $2^n$ is not a multiple of 3, so either $2^n - 2$ is or $2^n + 2$ is.
- Therefore $4^n - 4$ is a multiple of 3.
- It’s also even, so it’s a multiple of 6 ((and, for that matter, 12)).
- So $4^n - 4$ is a multiple of 6, which means $4^n \equiv 4 \pmod{6}$.