Steply

Last digit of 4^777

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 4⁷⁷⁷.

last digit of 4777

4 to the power 777 has 468 digits.

Too big to work out by hand.

4777 has 468 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 4.

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

only the remainder matters

4 to the 1 is 4.

4
4

Then 4 times 4 is 16.

4 × 4 = 16

16 mod 10 is 6.

And so on.

6
6 × 4 = 24
4

2 Find the pattern

At k = 3 we are back to 4.

From here everything repeats.

So the pattern 4, 6 repeats every 2 powers.

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

3 Where 777 lands

777 divided by 2: 388 full patterns, and 1 left over.

777 = 2 × 388 + 1

Careful!

The pattern is all we need.

The full number is far too big.

Careful: never work out 4⁷⁷⁷ itself

So 4 to the 777 is like k = 1.

So the last digit of 4⁷⁷⁷ is 4.

last digit of 4777 = 4

4 Check

A computer can work out all 468 digits: 631848, and so on, 1984.

computer: 4777 = 631848...1984

It ends in 4, the same as our pattern.

Right!

last digit: 4

Let's look back.

First: small powers first.

Then: find the pattern.

Then: where 777 lands.

Last: check.

Answer
last digit of 4777 = 4

Your turn

Try this one yourself, then check:

last digit of 361
Show the answer
the last digit of 3⁶¹ = 3

More from Powers mod n, last digits

The whole lesson: Powers mod n, last digits →