Sub topic 12
Units Digit Patterns of Powers
The repeating cycle
Assume you are comfortable with integer exponents, division with remainders, and basic modular arithmetic. The units digit of a positive integer is its remainder after division by 10. For example, the units digit of \(47\) is \(7\).
When you raise an integer to increasing powers, its units digits often repeat in a short cycle. You can find the cycle by calculating the first few powers and recording only their units digits.
For powers of \(7\):
\[ 7^1=7,\quad 7^2=49,\quad 7^3=343,\quad 7^4=2401 \]
The units digits are \(7,9,3,1\). The next power starts the same pattern:
\[ 7^5 \text{ has units digit } 7 \]
So the cycle has length 4.
# The units digit of 7**n repeats every 4 powers
cycle = [pow(7, n, 10) for n in range(1, 9)]
assert cycle == [7, 9, 3, 1, 7, 9, 3, 1]Using the exponent modulo the cycle length
To find the units digit of \(7^{202}\), divide the exponent by 4:
\[ 202=4(50)+2 \]
The remainder is 2, so use the second digit in the cycle:
\[ 7^{202}\text{ has units digit }9 \]
If the remainder is 0, use the last digit in the cycle. For example, \(7^{200}\) uses the fourth cycle position, so its units digit is \(1\).
| Base | Repeating units-digit cycle |
|---|---|
| 2 | 2, 4, 8, 6 |
| 3 | 3, 9, 7, 1 |
| 4 | 4, 6 |
| 7 | 7, 9, 3, 1 |
| 9 | 9, 1 |
The bases \(0,1,5,\) and \(6\) are simpler. Every positive power ends in the same digit as the base. For example, every positive power of 6 ends in 6.
A reliable procedure
- Find the units digit of the base.
- Write the repeating cycle for that units digit.
- Divide the exponent by the cycle length.
- Use the remainder to select a cycle position.
- If the remainder is 0, use the final position.
For a negative base, determine the sign separately. An even exponent gives a positive result, and an odd exponent gives a negative result. The units digit then depends on the positive magnitude.
Exercise
What is the units digit of 3^47?
Show answer
The cycle for 3 is 3, 9, 7, 1. Since 47 divided by 4 has remainder 3, use the third position. The units digit is 7.