Steply

Last digit of 3^99

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 3⁹⁹.

last digit of 399

3 to the power 99 has 48 digits.

Too big to work out by hand.

399 has 48 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 3.

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

only the remainder matters

3 to the 1 is 3.

3
3

Then 3 times 3 is 9.

3 × 3 = 9

9 mod 10 is 9.

And so on.

9
9 × 3 = 27
7
7 × 3 = 21
1
1 × 3 = 3
3

2 Find the pattern

At k = 5 we are back to 3.

From here everything repeats.

So the pattern 3, 9, 7, 1 repeats every 4 powers.

repeats every 4: 3, 9, 7, 1, 3, 9, 7, 1, ...

3 Where 99 lands

99 divided by 4: 24 full patterns, and 3 left over.

99 = 4 × 24 + 3

Careful!

The pattern is all we need.

The full number is far too big.

Careful: never work out 3⁹⁹ itself

So 3 to the 99 is like k = 3.

So the last digit of 3⁹⁹ is 7.

last digit of 399 = 7

4 Check

A computer can work out all 48 digits: 171792, and so on, 0667.

computer: 399 = 171792...0667

It ends in 7, the same as our pattern.

Right!

last digit: 7

Let's look back.

First: small powers first.

Then: find the pattern.

Then: where 99 lands.

Last: check.

Answer
last digit of 399 = 7

Your turn

Try this one yourself, then check:

last digit of 985
Show the answer
the last digit of 9⁸⁵ = 9

More from Powers mod n, last digits

The whole lesson: Powers mod n, last digits →