| Base ends in | Cycle of unit digits | Cycle length |
|---|---|---|
| 2 | 2, 4, 8, 6 | 4 |
| 3 | 3, 9, 7, 1 | 4 |
| 7 | 7, 9, 3, 1 | 4 |
| 8 | 8, 4, 2, 6 | 4 |
| 4 | 4, 6 | 2 |
| 9 | 9, 1 | 2 |
Reduce the exponent modulo the cycle length. Remainder 0 means the LAST entry of the cycle, not the first.
- Only the unit digit of the base matters.
- Digits 0, 1, 5, 6 never change; 4 and 9 have cycle length 2; 2, 3, 7, 8 have cycle length 4.
- Remainder 0 on dividing the exponent maps to the last entry of the cycle.
- For a tower a^(b^c), evaluate the exponent first, then reduce it by the cycle length.