Steply

Last digit of 8^123

Step by step, with the reason for every step · Powers mod n, last digits · Discrete Math

Step by step

The question

Question: find the last digit of 8¹²³.

last digit of 8123

8 to the power 123 has 112 digits.

Too big to work out by hand.

8123 has 112 digits!

The last digit is the remainder after dividing by 10.

So we work mod 10.

last digit = the remainder after ÷ 10

1 Small powers first

Let's make a table of small powers.

Each one is the one before times 8.

We only keep the remainder: the big part never matters.

only the remainder matters

8 to the 1 is 8.

8
8

Then 8 times 8 is 64.

8 × 8 = 64

64 mod 10 is 4.

And so on.

4
4 × 8 = 32
2
2 × 8 = 16
6
6 × 8 = 48
8

2 Find the pattern

At k = 5 we are back to 8.

From here everything repeats.

So the pattern 8, 4, 2, 6 repeats every 4 powers.

repeats every 4: 8, 4, 2, 6, 8, 4, 2, 6, ...

3 Where 123 lands

123 divided by 4: 30 full patterns, and 3 left over.

123 = 4 × 30 + 3

Careful!

The pattern is all we need.

The full number is far too big.

Careful: never work out 8¹²³ itself

So 8 to the 123 is like k = 3.

So the last digit of 8¹²³ is 2.

last digit of 8123 = 2

4 Check

A computer can work out all 112 digits: 120245, and so on, 7712.

computer: 8123 = 120245...7712

It ends in 2, the same as our pattern.

Right!

last digit: 2

Let's look back.

First: small powers first.

Then: find the pattern.

Then: where 123 lands.

Last: check.

Answer
last digit of 8123 = 2

Your turn

Try this one yourself, then check:

last digit of 443
Show the answer
the last digit of 4⁴³ = 4

More from Powers mod n, last digits

The whole lesson: Powers mod n, last digits →