PrajaPrep

Arithmetic · 8 min

Unit digit of powers and trailing zeros of factorials

Lesson

Only the last digit of a number affects the last digit of its powers. Look at 7: 7, 49, 343, 2401, and then 16807 ends in 7 again. So the unit digits of powers of 7 run 7, 9, 3, 1 and repeat every four steps. To find the unit digit of 7^83, divide 83 by 4. The remainder is 3, so the answer is the third digit in the cycle, which is 3. Digits 0, 1, 5 and 6 never change, 4 and 9 alternate with a cycle of two, and 2, 3, 7 and 8 run in cycles of four.

For a product such as 23^15 × 18^9, find each unit digit separately and multiply them, keeping only the last digit. 3^15 has remainder 3 when 15 is divided by 4, so it ends in 7. 8^9 has remainder 1, so it ends in 8. 7 × 8 = 56, and the answer is 6.

A zero at the end of a number comes from a factor 10, which is 2 × 5. In a factorial there are far more 2s than 5s, so you only count the 5s. For 100!, there are 20 multiples of 5 up to 100, and 4 of them (25, 50, 75, 100) give an extra 5. That makes 20 + 4 = 24 zeros. The quick way is to keep dividing by 5 and adding the whole-number parts: 100 ÷ 5 = 20, 20 ÷ 5 = 4, total 24.

Remember these

Unit digits of powers repeat in a cycle of at most 4, so divide the power by 4 and use the remainder (remainder 0 means the 4th term).

Trailing zeros of n! = ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + …, because each zero needs a 5 and 2s are always plentiful.

Why the paper asks this

These two ideas give one-line answers to number-system questions that otherwise look impossible to calculate.

Worked example

Unit digit of 2^50: 50 ÷ 4 leaves 2, and the cycle 2, 4, 8, 6 gives 4.

Common trap

When the remainder is 0, take the last digit of the cycle, not the first. And for zeros, count every power of 5, not just the multiples of 5.

Source: NCERT mathematics and the SSC, RRB, TSLPRB and banking quantitative syllabi; written in our own words

Sign up to continue learning

This lesson is free to read. Sign up free to open the next lesson in the app, keep your progress, and practise questions on this topic.

Sign up to continue learning