PracticeVideosBlogFlashcards

2.2 Unit Digits, Cyclicity Rules & Power Modulo Calculations

Key Takeaways

  • Unit digits of positive integer powers are strictly periodic modulo 10; digits partition into three cyclicity families: period 1 ({0, 1, 5, 6}), period 2 ({4, 9}), and period 4 ({2, 3, 7, 8}).

  • For a positive integer exponent n, reduce n modulo 4 for the units digit; a zero remainder selects the fourth cycle entry. Exponent zero must be handled separately.

  • When calculating the difference between two power expressions, if the subtracted unit digit exceeds the minuend, borrow 10 from the tens place (e.g., 2−7→12−7=52 - 7 \to 12 - 7 = 5).

  • For any integer n≥5n \ge 5, n!n! contains prime factors 2 and 5, which ensures n!n! terminates in at least one zero and n!≡0(mod10)n! \equiv 0 \pmod{10}.

  • The tens digit of numbers ending in 1 is given by (a×[n mod 10]) mod 10(a \times [n \bmod 10]) \bmod 10; numbers ending in other digits reduce to this base using binomial expansion or cyclicity transformations.

Last updated: October 2026

The Mathematical Principle of Cyclicity

The unit digit of any product A×BA \times B depends solely on the unit digits of AA and BB:

(A×B) mod 10=((A mod 10)×(B mod 10)) mod 10(A \times B) \bmod 10 = ((A \bmod 10) \times (B \bmod 10)) \bmod 10

When an integer with base unit digit uu is repeatedly raised to successive integer powers (u1,u2,u3,u4,…u^1, u^2, u^3, u^4, \dots), the resulting unit digits repeat in a fixed periodic pattern called cyclicity.

+-----------------------------------------------------------------------------+
|                          CYCLICITY CLASSIFICATION                           |
+-----------------------------------------------------------------------------+
| FAMILY 1: Cyclicity Period = 1                                              |
|   Base Digits: {0, 1, 5, 6}                                                 |
|   Behavior: Unit digit remains identical for any positive integer power.    |
|   Examples: 5^1=5, 5^2=25, 5^89 -> 5; 6^1=6, 6^2=36, 6^142 -> 6.            |
+-----------------------------------------------------------------------------+
| FAMILY 2: Cyclicity Period = 2                                              |
|   Base Digits: {4, 9}                                                       |
|   Behavior: Unit digit alternates strictly based on odd/even parity.        |
|   Examples: 4^odd -> 4, 4^even -> 6; 9^odd -> 9, 9^even -> 1.               |
+-----------------------------------------------------------------------------+
| FAMILY 3: Cyclicity Period = 4                                              |
|   Base Digits: {2, 3, 7, 8}                                                 |
|   Behavior: Unit digit cycles through four distinct values.                 |
|   Universal period for all base digits divides into 4 (LCM of 1, 2, 4 = 4). |
+-----------------------------------------------------------------------------+

Comprehensive Cyclicity Reference Table

Base Digit (uu)u1u^1u2u^2u3u^3u4u^4Period (CC)Pattern Summary
000001Always 0
111111Always 1
2248642→4→8→62 \to 4 \to 8 \to 6
3397143→9→7→13 \to 9 \to 7 \to 1
4464624odd=4,4even=64^{\text{odd}} = 4, 4^{\text{even}} = 6
555551Always 5
666661Always 6
7793147→9→3→17 \to 9 \to 3 \to 1
8842648→4→2→68 \to 4 \to 2 \to 6
9919129odd=9,9even=19^{\text{odd}} = 9, 9^{\text{even}} = 1

Note

Because the least common multiple of all cyclicity periods LCM(1,2,4)=4\text{LCM}(1, 2, 4) = 4, period 4 is universal across all digits from 0 to 9. For a positive integer exponent, a units-digit problem modulo 10 can use the four-position cycle. Other moduli need their own periods; exponent zero is a separate case.


The Universal Unit Digit Algorithm

To find the unit digit of any expression XNX^N:

  1. Isolate the Base Unit Digit: Identify u=X mod 10u = X \bmod 10.
  2. Examine Only the Last Two Digits of the Exponent: A number is divisible by 4 if and only if its last two digits are divisible by 4. Let nn be the number formed by the last two digits of NN.
  3. Compute Exponent Remainder Modulo 4:
r=n mod 4r = n \bmod 4
  1. Evaluate the Power:
    • If r>0r > 0, the unit digit is the unit digit of uru^r.
    • If r=0r = 0, the unit digit is the unit digit of u4u^4.

Warning

The Remainder Zero Trap: When n mod 4=0n \bmod 4 = 0, do not evaluate u0=1u^0 = 1! A remainder of 0 indicates that the exponent has completed a full 4-cycle. You must evaluate the fourth power u4u^4. For example, the unit digit of 2402^{40} is 24=16  ⟹  62^4 = 16 \implies 6, NOT 20=12^0 = 1.


Multi-Term Expressions, Differences & Borrowing

In complex arithmetic questions featuring multiple terms combined through addition and subtraction:

  1. Calculate the unit digit of each term independently.
  2. Perform the indicated operations modulo 10.
  3. Handling Negative Results (Borrowing): If the subtracted digit exceeds the leading digit, borrow 10 from the tens place before subtracting.
Unit Digit=(u1−u2)+10when u1<u2\text{Unit Digit} = (u_1 - u_2) + 10 \quad \text{when } u_1 < u_2

For example, if an expression reduces to unit digits 3−83 - 8, the final unit digit is not −5-5, but (13−8)=5(13 - 8) = 5.


Factorials and Factorial Series Unit Digits

The factorial of a non-negative integer nn, denoted n!n!, is the product of all positive integers less than or equal to nn:

n!=n×(n−1)×(n−2)×⋯×3×2×1n! = n \times (n-1) \times (n-2) \times \dots \times 3 \times 2 \times 1

Factorial Values and Their Unit Digits

  • 1!=11! = 1
  • 2!=22! = 2
  • 3!=63! = 6
  • 4!=24  ⟹  Unit digit is 44! = 24 \implies \text{Unit digit is } 4
  • 5!=120  ⟹  Unit digit is 05! = 120 \implies \text{Unit digit is } 0
  • 6!=720  ⟹  Unit digit is 06! = 720 \implies \text{Unit digit is } 0

Important

For any integer n≥5n \ge 5, n!n! contains both 22 and 55 as factors (2×5=102 \times 5 = 10). Therefore, the unit digit of n!n! is identically 0 for all n≥5n \ge 5.

Sum of Factorials: S=1!+2!+3!+⋯+n!S = 1! + 2! + 3! + \dots + n!

When evaluating the unit digit of S=1!+2!+3!+⋯+100!S = 1! + 2! + 3! + \dots + 100!, all terms from 5!5! onward end in 0:

S≡1!+2!+3!+4!+0+0+⋯+0(mod10)S \equiv 1! + 2! + 3! + 4! + 0 + 0 + \dots + 0 \pmod{10} S≡1+2+6+24=33≡3(mod10)S \equiv 1 + 2 + 6 + 24 = 33 \equiv 3 \pmod{10}

Thus, the unit digit of 1!+2!+3!+⋯+n!1! + 2! + 3! + \dots + n! is always 3 for any n≥4n \ge 4.

Factorial Exponents: xn!x^{n!}

When the exponent is a factorial n!n! where n≥4n \ge 4:

  • Since 4!=244! = 24, n!n! is always a multiple of 4 for all n≥4n \ge 4.
  • Therefore, n!≡0(mod4)n! \equiv 0 \pmod 4, meaning r=0r = 0.
  • Hence, the unit digit of xn!x^{n!} is simply u4u^4 for all n≥4n \ge 4:
    • If base uu is even (2,4,6,82, 4, 6, 8), u4u^4 ends in 6.
    • If base uu is odd (1,3,7,91, 3, 7, 9), u4u^4 ends in 1.
    • If base u=5u = 5, 5n!5^{n!} ends in 5.
    • If base u=0u = 0, 0n!0^{n!} ends in 0.

Tens Digit Determination

While unit digit problems test cyclicity modulo 10, higher-level CBT questions occasionally ask for the tens digit (or the last two digits, which is arithmetic modulo 100).

Numbers Ending in 1: (…a1)n(\dots a1)^n

By the Binomial Theorem:

(10a+1)n=1+(n1)(10a)+(n2)(10a)2+⋯≡1+10(a⋅n)(mod100)(10a + 1)^n = 1 + \binom{n}{1}(10a) + \binom{n}{2}(10a)^2 + \dots \equiv 1 + 10(a \cdot n) \pmod{100}

This yields a rapid formula for numbers ending in 1:

  • Unit digit: Always 11.
  • Tens digit: (a×[n mod 10]) mod 10(a \times [n \bmod 10]) \bmod 10.

Example: Find the last two digits of 418741^{87}:

  • Unit digit =1= 1.
  • Tens digit =(4×7) mod 10=28 mod 10=8= (4 \times 7) \bmod 10 = 28 \bmod 10 = 8.
  • Last two digits =81= 81.

Numbers Ending in 3, 7, 9

Transform the base into a number ending in 1 by exploiting powers:

  • 34=813^4 = 81 (ends in 1)
  • 74=24017^4 = 2401 (ends in 01)
  • 92=819^2 = 81 (ends in 1)

Example: Find the last two digits of 7847^{84}:

  • Rewrite as (74)21=(2401)21≡(01)21(mod100)=01(7^4)^{21} = (2401)^{21} \equiv (01)^{21} \pmod{100} = 01.
  • The last two digits are 0101 (tens digit is 0).

Powers of 2 and Even Bases Modulo 100

Key building block: 210=1024≡24(mod100)2^{10} = 1024 \equiv 24 \pmod{100}.

  • 24even power≡76(mod100)24^{\text{even power}} \equiv 76 \pmod{100}
  • 24odd power≡24(mod100)24^{\text{odd power}} \equiv 24 \pmod{100}
  • Furthermore, 76×76≡76(mod100)76 \times 76 \equiv 76 \pmod{100}, and 76×2k≡2k(mod100)76 \times 2^k \equiv 2^k \pmod{100} (for k≥2k \ge 2).

Worked Examples

Worked Example 1: Multi-Term Compound Unit Digit

Problem: Find the unit digit of the expression:

E=378126×643185−287143+514226E = 378^{126} \times 643^{185} - 287^{143} + 514^{226}
  • Step 1: Evaluate 378126378^{126}: Base unit digit u=8u = 8. Exponent 126126: last two digits 2626. Divide by 4: 26=4×6+2  ⟹  r=226 = 4 \times 6 + 2 \implies r = 2. Unit digit =82=64  ⟹  4= 8^2 = 64 \implies 4.
  • Step 2: Evaluate 643185643^{185}: Base unit digit u=3u = 3. Exponent 185185: last two digits 8585. Divide by 4: 85=4×21+1  ⟹  r=185 = 4 \times 21 + 1 \implies r = 1. Unit digit =31  ⟹  3= 3^1 \implies 3.
  • Step 3: Evaluate product of first two terms:
(4×3) mod 10=12 mod 10=2(4 \times 3) \bmod 10 = 12 \bmod 10 = 2
  • Step 4: Evaluate 287143287^{143}: Base unit digit u=7u = 7. Exponent 143143: last two digits 4343. Divide by 4: 43=4×10+3  ⟹  r=343 = 4 \times 10 + 3 \implies r = 3. Unit digit =73=343  ⟹  3= 7^3 = 343 \implies 3.
  • Step 5: Evaluate 514226514^{226}: Base unit digit u=4u = 4. Cyclicity is 2. Exponent 226226 is even   ⟹  4even\implies 4^{\text{even}} ends in 66.
  • Step 6: Combine terms with borrowing:
Unit Digit=(2−3+6) mod 10\text{Unit Digit} = (2 - 3 + 6) \bmod 10

Since 2<32 < 3, perform (2−3)=−1  ⟹  10−1=9(2 - 3) = -1 \implies 10 - 1 = 9. Then add 66: 9+6=15  ⟹  59 + 6 = 15 \implies 5. (Equivalently: (2+6)−3=8−3=5(2 + 6) - 3 = 8 - 3 = 5.)

  • Conclusion: The unit digit of EE is 5.

Worked Example 2: Factorial Exponents Series

Problem: Find the unit digit of the summation:

S=(1!)1+(2!)2+(3!)3+(4!)4+(5!)5+⋯+(100!)100S = (1!)^1 + (2!)^2 + (3!)^3 + (4!)^4 + (5!)^5 + \dots + (100!)^{100}
  • Step 1: Analyze terms for n≥5n \ge 5: For every n≥5n \ge 5, n!n! ends in 0. Therefore, (n!)n(n!)^n ends in 0n=00^n = 0. These terms contribute 0 to the unit digit.
  • Step 2: Evaluate the first 4 terms individually:
    • Term 1: (1!)1=11=1(1!)^1 = 1^1 = 1.
    • Term 2: (2!)2=22=4(2!)^2 = 2^2 = 4.
    • Term 3: (3!)3=63=216  ⟹  Unit digit is 6(3!)^3 = 6^3 = 216 \implies \text{Unit digit is } 6.
    • Term 4: (4!)4=(24)4(4!)^4 = (24)^4. Base unit digit is 4, exponent 4 is even   ⟹  44=256\implies 4^4 = 256, unit digit is 66.
  • Step 3: Sum the non-zero unit digits:
Unit Digit=(1+4+6+6) mod 10=17 mod 10=7\text{Unit Digit} = (1 + 4 + 6 + 6) \bmod 10 = 17 \bmod 10 = 7
  • Conclusion: The unit digit of the summation is 7.

Worked Example 3: Tens Digit Calculation

Problem: Find the last two digits (tens and units) of 3114631^{146}.

  • Step 1: Check form: The base ends in 1: 31=10(3)+131 = 10(3) + 1, so a=3a = 3. The exponent is n=146n = 146.
  • Step 2: Apply the binomial unit and tens shortcut:
    • Unit digit is always 11.
    • Tens digit is given by: (a×[n mod 10]) mod 10(a \times [n \bmod 10]) \bmod 10.
    • Here a=3a = 3, and n mod 10=6n \bmod 10 = 6.
    • Tens digit =(3×6) mod 10=18 mod 10=8= (3 \times 6) \bmod 10 = 18 \bmod 10 = 8.
  • Step 3: Verify via binomial expansion:
(30+1)146=1+146(30)+(1462)(30)2+…(30 + 1)^{146} = 1 + 146(30) + \binom{146}{2}(30)^2 + \dots

Modulo 100, all terms from (30)2(30)^2 onward have factors of 900≡0(mod100)900 \equiv 0 \pmod{100}.

1+146×30=1+4380=4381≡81(mod100)1 + 146 \times 30 = 1 + 4380 = 4381 \equiv 81 \pmod{100}
  • Conclusion: The last two digits are 81 (tens digit is 8, unit digit is 1).
Test Your Knowledge

What is the unit digit of the expression 432^412 * 433^413 * 437^417?

A

2

B

4

C

6

D

8

Test Your Knowledge

What is the unit digit of the infinite-looking factorial summation 1! + 2! + 3! + 4! + 5! + ... + 999!?

A

3

B

1

C

5

D

7

Test Your Knowledge

What is the tens digit of the power expression 71^84?

A

4

B

6

C

7

D

8

Sections you finish are checked off in the contents.