Suppose we want to find the last digit of some large number. For relatively small numbers like 2^{12}, this is rather easy to compute. However for large numbers such as 13^{23422293}, this is a rather difficult task.

# Last Digits as Remainders

Finding the last digit of a number if equivalent to finding the remainder of a number when divided by 10. This is for an integer n such that:

(1)then it follows that:

(2)## Lemma 1: For all integers n = d_{k}10^{k} + d_{k-1}10^{k-1} + … + d_{1}10^{1} + d_{0}10^{0}, the last digit, d_{0}, can be represented as by n (mod 10).

**Proof:**Let n be an integer represents in the fashion:

- Thus it follows that:

- 10 (mod 10) = 0, so it thus follows that:

- Thus the proof is complete. When n is divided by 10, the remainder is equal to the last digit of that number.

### Example 1

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

We will complete this by first finding a small number between 0, 1, 2, …, 8, 9 which is congruent 1 or -1 (mod 10). For example 9 ≡ -1 (mod 10) since 9 ≡ 9 (mod 10). It thus follows that 3^2 = 9, so then:

(6)We can now apply the division algorithm on 347 and 4 (our exponent) so that we obtain 347 = 4 * 86 + 3. Hence we can write that:

(7)So the last digit of 3^{347} is 7, since 27 (mod 10) is 7.