# The Last Digit of Powers

Previously, I had published a post about a general method of finding the last digit of enormous numbers, specifically those of some large number to a large power (e.g. $2016^{2016}$) which you can check out here.

In this post we shall be looking at a problem which at first glance, seems easier to determine but in reality requires a bit more work on the previous post. This time, we choose to ask:

What is the last digit of $2^{500}$?

To recapitulate, this is the method by which we solved the previous problem:

1. Use the ‘trick’ to reduce the base down (i.e the last digit of $2016^{2016}$ was the same as $6^{2016}$
2. Continually multiply 6 by itself and observe any patterns with the last digit (we noticed that when you multiply 6 by itself, it produces another number ending with a 6)

Also, to freshen up your memory, we had a handy, short hand version of writing things $52\equiv 2(mod10)$ which was equivalent to saying “2 is the remainder you get when you remove as many 10s as you can from the number 50”.

Knowing all of this, we can begin tackling $2^{500}$. Notice that in this case, we cannot use our little trick of simplifying the base any further since 2 is already less than 10. In other words, $2\equiv 2 (mod 10)$.

This immediately leads us to the next step, which is to multiply 2 by itself and observing whether any patterns occur with the last digit. Let us try to see what happens:

$\begin{array}{rcl} 2^1=\mathbf{2} &\equiv & \mathbf{2} (mod 10) \\ 2^2=\mathbf{4} &\equiv & \mathbf{4} (mod 10) \\ 2^3=\mathbf{8} &\equiv & \mathbf{8} (mod 10) \\ 2^4 =1\mathbf{6}&\equiv& \mathbf{6} (mod 10) \\ 2^5 =3\mathbf{2}&\equiv& \mathbf{2} (mod 10) \\ 2^6 =6\mathbf{4}&\equiv& \mathbf{4} (mod 10) \\ 2^7 =12\mathbf{8}&\equiv& \mathbf{8} (mod 10)\\ 2^8=25\mathbf{6} &\equiv& \mathbf{6} (mod 10) \end{array}$

#### Do you see the pattern in the last digit when we increase the power?

It appears that the last digit seems to follow the cycle $2,4,8,6$ whereby after 6, it wraps back to 2 and repeats indefinitely!

This is great, as it means that any power of 2, no matter how large, will always end in either a 2,4,8 or 6. We already saw that 5th power of 2 (i.e. $2^5$) lands on a 2 as its last digit. This can also be obtained by counting the cycle:

1. 2
2. 4
3. 8
4. 6
5. 2

A question we might also ask is with regards to our question is: where does 500 fit into this cycle? Clearly we can’t count 500 numbers by hand to check where we land on the cycle as we did before. We therefore need to find a more elegant and easier way of determining this position.

The powers of 2 that have a last digit of are $2^1,2^5,2^9,\cdots$. What do the numbers $1,5,9, \cdots$ have in common? They are obtained by adding 4 to the previous number. This can be written as:

$\begin{array}{rcl} 1 &=& 1 \\ 5 &=& 1+4 \\ 9 &=& 1+4+4\\13&=&1+4+4+4 \\ \cdots \end{array}$

Which can be written in short as $4k+1$ where $k$ may take the values $0,1,2,3,\cdots$.
We can check that this indeed matches:

$\begin{array}{rcl} 4(0)+1 &=& 1 \\ 4(1)+1 &=& 5 \\ 4(2)+1 &=& 9 \\4(3)+1 &=& 13 \\ \cdots \end{array}$

Similarly, we can have that for numbers that have a last digit of 4, we have the sequence $2,6,10,\cdots$ which can be written as $4k+2$ etc.

Thus we can categorize the last digit in terms of these groups as

Has last digit 2 if can be represented as $4k+1$
Has last digit 4 if can be represented as $4k+2$
Has last digit 8 if can be represented as $4k+3$
Has last digit 6 if can be represented as $4k$

Luckily for us, 500 is an exact multiple of 4 since $4(125)=500$. This means that in the cycle $2,4,8,6$ it lands exactly on 6! This means that the last digit of $2^{500}$ is 6 or $2^{500} \equiv 6 (mod 10)$.

We have seen how continually multiplying 2 by itself produces last digits which form a cycle $2,4,8,6$. What would happen to the last digit of other numbers like 3 or 7  to some power? Would they form cycles and if so, what would their cycles be?

These kind of extra investigations would also not only solve what the last digit of any number from 1-9 to any power would be such as $8^{156} \text{or} 3^{109}$. In conjunction with the ‘trick’ from the previous post, this would also solve what the last digit of  $1208^{346} \text{or} 1040243^{5345}$ or similar, without ever needing to work out what that number actually is!

The method by which this is done is very similar to what we have done already, so I shall leave it to you, the readers to make your own discoveries. I shall conclude this post by giving the respective cycles of last digits for each of the numbers 1-9 in case anyone wanted to compare 🙂 I have also included some exercises.

• Last digit of any power of 1 cycles: 1
• Last digit of any power of 2 cycles: 2,4,8,6
• Last digit of any power of 3 cycles: 3,9,7,1
• Last digit of any power of 4 cycles: 4,6
• Last digit of any power of 5 cycles: 5
• Last digit of any power of 6 cycles: 6
• Last digit of any power of 7 cycles: 7,9,3,1
• Last digit of any power of 8 cycles: 8,4,2,6
• Last digit of any power of 9 cycles: 9,1

Exercise 1: What is the last digit of $7^{210}$?

Exercise 2: What is the last digit of $4^{1201}$?

Follow this blog if you would like to read similar content, as well as Philosophy, Statistics and more Mathematics  :)!