Determining the Last Digit of Large Numbers

# Determining the Last Digit of Large Numbers

Often times it is of great interest to determine the last digit of a very large number. We will now develop a rather simple method involving congruences for doing such.

Theorem 1: Let $n \in \mathbb{N}$ where $n = d_0 \cdot 10^0 + d_1 \cdot 10^1 + ... + d_k \cdot 10^k$ is the digit representation of $n$. Then $n \equiv d_0 \pmod {10}$, i.e., the last digit of $n$ is congruent to $n$ modulo $10$. |

**Proof:**Let $n \in \mathbb{N}$ and let $n = d_0 \cdot 10^0 + d_1 \cdot 10^1 + ... + d_k \cdot 10^k$. Then:

\begin{align} \quad n & \equiv (d_0 \cdot 10^0 + d_1 \cdot 10^1 + ... + d_k \cdot 10^k) \pmod {10} \\ \quad n & \equiv (d_0 \cdot (1) + d_1 \cdot 0 + ... + d_k \cdot 0) \pmod {10} \\ \quad n & \equiv d_0 \pmod {10} \quad \blacksquare \end{align}

Let's now look at a couple of examples of determining the last digit of a large number.

# Example 1

**Determine the last digit of $3^{347}$.**

We will use properties of congruences to solve this problem. We have that:

(2)\begin{align} \quad 3^{347} \equiv 3^{4(86)+3} \equiv (3^4)^{86} (3)^3 \equiv (81)^{86} (27) \equiv (1)^{86} (7) \equiv 7 \pmod {10} \end{align}

So the last digit of $3^{347}$ is $7$.

## Example 2

**Determine the last digit of $4^{210}$.**

Once again, by using the properties of congruences we have that:

(3)\begin{align} \quad 4^{30} \equiv 4^{3(10)} \equiv (4^3)^{10} \equiv (64)^{10} \equiv 4^{10} \equiv 4^{2(5)} \equiv (16)^{6} \equiv 6^5 \equiv 7776 \equiv 6 \pmod {10} \end{align}

So the last digit of $4^{30}$ is $6$.