Skip to content

Unit and Last Digits

7 lessons · 20 questions · 17 PYQs · ~45 s per question

The idea

The unit digit of a product depends only on the unit digits of the factors, so powers of a number have unit digits that cycle with period 11, 22 or 44. The same reasoning modulo 100100 (with the binomial expansion of (10t+1)n(10t+1)^n) gives last two digits.

Textbook vs exam method

Exam method

  1. Indore 2021 Q16. 74385→3743^{85}\to3, 52537→5525^{37}\to5, 98796→1987^{96}\to1: 3−5+1=−1→93-5+1=-1\to9.Indore 2021
  2. Indore 2023 Q39. cubes of 00-99 end in distinct digits; pp ends in 44, p+3p+3 in 77, 73=343→37^3=343\to3.Indore 2023
  3. 1!+2!+⋯+1000!1!+2!+\dots+1000!: only 1!1! to 4!4! matter, 33→333\to3.
  4. 3400=811003^{400}=81^{100}: tens digit 8×0=08\times0=0, last two digits 0101.

Worked examples

Example 1Sitter

220242^{2024}

Example 2Easy

3223×475832^{23}\times47^{58}

Example 3Easy

(1!)99+(2!)98+(3!)97+…(1!)^{99}+(2!)^{98}+(3!)^{97}+\dots

Example 4Typical

7777^{7^{7}}

Example 5Typical

Last two digits of 720247^{2024}

Traps

  • Exponent modulo 1010; r=0r=0 mishandled; negative digit; tower exponents multiplied; several digits listed where the cube map is one-to-one.

Formulas

Cyclicity of unit digits

u(an)=u(u(a)n);u∈{0,1,5,6} fixed; u∈{4,9} period 2; u∈{2,3,7,8} period 4u(a^{n})=u\left(u(a)^{n}\right);\quad u\in\{0,1,5,6\}\text{ fixed};\ u\in\{4,9\}\text{ period }2;\ u\in\{2,3,7,8\}\text{ period }4

Only the unit digit of the base matters; exponents are reduced modulo 4 (Indore 2021 Q16: 3^85 -> 3, 7^96 -> 1).
Unit digit of sums and products

u(a±b)=u(u(a)±u(b)),u(ab)=u(u(a) u(b));a negative result: add 10u(a\pm b)=u(u(a)\pm u(b)),\quad u(ab)=u(u(a)\,u(b));\quad\text{a negative result: add }10

3 - 5 + 1 = -1 means the number ends in 9 (Indore 2021 Q16).
Factorials and their sums

n! ends in 0 for n≥5 ⇒ u(1!+2!+⋯+N!)=u(33)=3 (N≥4)n!\text{ ends in }0\text{ for }n\ge5\ \Rightarrow\ u(1!+2!+\dots+N!)=u(33)=3\ (N\ge4)

From 5! every factorial ends in 0; (1!)^99 + (2!)^98 + ... also stops at 4!.
Cubes determine the unit digit uniquely

u3 mod 10 is a bijection on digits: 0,1,8,7,4,5,6,3,2,9u^{3}\bmod10\text{ is a bijection on digits: }0,1,8,7,4,5,6,3,2,9

Indore 2023 Q39: p^3 ends in 4 only when p ends in 4, so (p+3)^3 ends in 7^3 = 343 -> 3.
Exponent towers

abc: reduce bc mod 4 (a multiple of 4 acts as 4)a^{b^{c}}:\ \text{reduce }b^{c}\bmod4\ (\text{a multiple of }4\text{ acts as }4)

7^(5^3): 125 = 1 mod 4, so the unit digit is that of 7^1 = 7; 2^(3^4): 81 = 1 mod 4 -> 2.
Last two digits: bases ending in 1, 3, 7, 9

(10t+1)n≡10 t n+1(mod100);a4≡…01 for u(a)∈{3,7,9} (for 9 already a2)(10t+1)^{n}\equiv10\,t\,n+1\pmod{100};\quad a^{4}\equiv\dots01\text{ for }u(a)\in\{3,7,9\}\ \text{(for 9 already }a^{2})

Tens digit = (tens digit of base) x (units digit of exponent); convert 3, 7, 9 to a power ending in 01 first (3^400 = 81^100 -> 01).
Last two digits: bases ending in 5 and even bases

(…5)n ends in 25 or 75;210≡24, 220≡76, 76k≡76(mod100)(\dots5)^{n}\text{ ends in }25\text{ or }75;\quad 2^{10}\equiv24,\ 2^{20}\equiv76,\ 76^{k}\equiv76\pmod{100}

25 or 75 by the parity of the tens digit of the base and of the exponent; even bases: 2^10 = 1024 -> 24, 24^even -> 76.

In the exam

Shortcuts
  • Write the exponent as 4k+r4k+r and read the digit from the cycle; r=0r=0 means the fourth power's digit.
  • Cubes: a unit digit of p3p^3 pins down the unit digit of pp (bijection); squares and fourth powers do not.
  • For (am)n(a^{m})^{n} multiply exponents; for amna^{m^{n}} reduce mnm^{n} modulo 44 using m mod 4∈{0,1,2,3}m\bmod4\in\{0,1,2,3\}.
  • Last two digits of (…1)n(\dots1)^{n}: tens digit of base times units digit of exponent, units digit 11.
  • Last two digits of an even power: split into 2k×2^{k}\times odd and use 220m≡762^{20m}\equiv76.
~45 s per question at exam speed
When to skip: Never - a unit-digit item is a 30-second read of the cycle. Last-two-digit items with an even base and a messy exponent may take 90 s; do them last.

Before this

What the exams ask here

  • unit digit of 743^85 - 525^37 + 987^96 (Indore 2021 Q16)
  • unit digit of p^3 is 4 -> unit digit of (p+3)^3 (Indore 2023 Q39)
  • last two digits of 3^400, 7^2024
  • unit digit of 1! + 2! + ... + 1000!, (1!)^99 + (2!)^98 + ...
  • unit digit of 2^(3^4) type towers
Next sub-topicFactorials and Trailing Zeros

Practise this free. Every mistake is saved and comes back until you fix it.

Start free