Math Detours · Grade 8 · Around the corner · 5

The last digit of 7²⁰²⁴

Last digits of powers go round in cycles. Find the cycle, use the remainder, and answer in seconds.

Name ____________________Date ____________

Tonight's idea

What is the last digit of \(7^{2024}\)? The number itself has 1,711 digits. You will never write it down, but its last digit takes ten seconds.

The key fact: the last digit of a product depends only on the last digits of the factors. \(23 \times 47\) ends like \(3 \times 7 = 21\), in 1. Reason: \(23 \times 47 = (20 + 3)(40 + 7)\), and the pieces \(20 \times 40\), \(20 \times 7\) and \(3 \times 40\) are all multiples of 10. Only \(3 \times 7\) touches the units.

So to follow the last digit of \(7, 7^2, 7^3, \ldots\) you never need the whole number. Start at 7. Times 7: 49, last digit 9. Then \(9 \times 7 = 63\), last digit 3. Then \(3 \times 7 = 21\), last digit 1. Then \(1 \times 7 = 7\): back at the start.

×7 ×7 ×7 ×7 7 9 3 1
Powers of 7 end in 7, 9, 3, 1, 7, 9, 3, 1, … The cycle has length 4.

The position in the cycle is set by the remainder of the exponent on dividing by 4: remainder 1 gives 7, 2 gives 9, 3 gives 3, and 0 (the end of a lap) gives 1.

Watch one: \(7^{2024}\) and \(7^{2023}\)

Divide 2024 by 4: \(2024 = 4 \times 506\), remainder 0, the end of a lap, where the last digit is 1. So \(7^{2024}\) ends in 1. Another way: \(7^4 = 2401\) ends in 1, and \(7^{2024} = (7^4)^{506}\) is 2401 multiplied by itself, which can only end in 1.

2023 leaves remainder 3, the third spot, so \(7^{2023}\) ends in 3. Check: \(7 \times 7^{2023}\) should end like \(7 \times 3 = 21\). It does.

Remainders as positions on a clock: clock arithmetic. Why cycles of remainders modulo a prime \(p\) always have length dividing \(p - 1\): Fermat's little theorem (grade 10).

Your turn

  1. Write out the cycle of last digits for the powers of 2, of 3, of 4 and of 9. How long is each cycle?
  2. Find the last digit of \(3^{100}\), of \(2^{2025}\) and of \(9^{99}\).
  3. Find the last digit of \(2024^{2024}\) and of \(13^{2024}\). Only one digit of the base matters.
  4. Find the last digit of \(1^1 + 2^2 + 3^3 + \cdots + 10^{10}\).

Stretch: a tower

What is the last digit of \(7^{(7^7)}\)? You need the remainder of the exponent \(7^7\) on dividing by 4, and you do not need to compute \(7^7\). Think of 7 as \(8 - 1\).

Answers

  1. 2: 2, 4, 8, 6 (length 4). 3: 3, 9, 7, 1 (length 4). 4: 4, 6 (length 2). 9: 9, 1 (length 2). Powers of 0, 1, 5 and 6 never change their last digit.
  2. \(3^{100}\): 100 has remainder 0 on dividing by 4, so the last digit is the end of the 3, 9, 7, 1 lap: 1. \(2^{2025}\): remainder 1, so 2. \(9^{99}\): odd exponent, so 9.
  3. \(2024^{2024}\) ends like \(4^{2024}\); the cycle 4, 6 gives 6 for every even exponent. \(13^{2024}\) ends like \(3^{2024}\); 2024 has remainder 0, so 1.
  4. Last digits: \(1, 4, 7, 6, 5, 6, 3, 6, 9, 0\). (For \(7^7\), remainder 3 gives 3; for \(8^8\), remainder 0 in the cycle 8, 4, 2, 6 gives 6; \(9^9\) has an odd exponent, so 9.) Their sum is 47, so the last digit is 7.

Stretch. \(7 = 8 - 1\), so \(7^7 = (8-1)^7\). Expanding, every term has a factor of 8 except the last, \((-1)^7 = -1\). So \(7^7\) is a multiple of 8 minus 1, hence a multiple of 4 minus 1, which leaves remainder 3 on dividing by 4. (Check: \(7^7 = 823{,}543 = 4 \times 205{,}885 + 3\).) Remainder 3 is the third spot in 7, 9, 3, 1, so \(7^{(7^7)}\) ends in 3.

← PreviousNext: Counting divisors, and perfect numbers →