WishWasTraining Academy
CDS exam school
← home
Chapter A1-4 · 4 of 6 in Numbers · 20 min read

Divisibility tests, division algorithm, remainders and unit digits

31 real CDS questions of this kind in the 6 papers from CDS I 2024 to CDS II 2026.

Revision sheet: the chapter on one pageTry three questions free ↓
This chapter has a video lessonWatch it, practise with a drill and keep your record, all with a free account. No fee, no card.

Why this chapter matters. This chapter gave 31 questions in the 6 papers from CDS I 2024 to CDS II 2026. That is about 5 questions in every paper. About ten of the 31 ask for a unit digit or the last few digits of a power or a product. About ten ask for the remainder of a large power, or whether ​a^n + b^n​ is divisible by a given number. The rest use the tests for 3 and 9, the "last digits" tests, and the division rule. Several come as "which of the statements is correct" or as "is the statement enough" questions. None needs long division: each takes about a minute with the six ideas below.

What you will be able to do

  • Test a number for divisibility by 2, 3, 4, 5, 8, 9, 11, 16 and by numbers such as 12 or 36, and say why each test works.
  • Find the remainder of a sum, a difference or a product without working out the number itself.
  • Find the unit digit of any power, and the remainder when a large power is divided by a small number.
  • Decide at once whether ​a^n - b^n​ or ​a^n + b^n​ is divisible by ​a - b​ or ​a + b​.

Before you start you should know: place value and the digits of a number (Chapter A1-1), prime numbers and factors (Chapter A1-3), and two laws of powers: ​a^{m+n} = a^m \times a^n​ and ​a^{mn} = (a^m)^n​.

1. The division rule

Divide 47 by 7. The quotient is 6 and the remainder is 5, because ​47 = 7 \times 6 + 5​. Every division can be written this way:

\text{Dividend} = \text{Divisor} \times \text{Quotient} + \text{Remainder}, \qquad 0 \le \text{Remainder} < \text{Divisor}

This is called the division algorithm. A number is divisible by the divisor when the remainder is 0.

Two ways of speaking are used in this chapter.

  • "47 behaves like 5 on division by 7" means that 47 and 5 leave the same remainder.
  • We can also write ​47 = 7 \times 7 - 2​. So 47 is 2 short of a multiple of 7, and we may say it behaves like ​-2​. A remainder is never negative in the final answer: add the divisor once, ​-2 + 7 = 5​.

2. Divisibility tests, with the reason for each

Divisor The number is divisible if Why it works
2, 5, 10 the last digit is divisible (even; 0 or 5; 0) 10 is a multiple of 2 and of 5, so the tens and above do not matter
4 the number made by the last two digits is divisible by 4 ​100 = 4 \times 25​
8 the number made by the last three digits is divisible by 8 ​1000 = 8 \times 125​
16 the number made by the last four digits is divisible by 16 ​10000 = 16 \times 625​
3, 9 the sum of the digits is divisible by 3, by 9 10, 100, 1000, ... each leave remainder 1 on division by 9 and by 3
11 (sum of digits in odd places) minus (sum of digits in even places) is 0 or a multiple of 11, counting places from the right 10 is 1 less than 11, so 1, 10, 100, 1000, ... behave like ​+1, -1, +1, -1, \dots​
6, 12, 15, 18, 36, 72 it passes the tests for two factors that have no common factor: ​6 = 2 \times 3​, ​12 = 3 \times 4​, ​15 = 3 \times 5​, ​18 = 2 \times 9​, ​36 = 4 \times 9​, ​72 = 8 \times 9​ a number divisible by two such factors is divisible by their product

These tests give more than "yes or no". They give the remainder. The last two digits give the remainder on division by 4. The sum of the digits gives the remainder on division by 9 and by 3.

Take 58347. The sum of its digits is ​5 + 8 + 3 + 4 + 7 = 27​, so it is divisible by 9 and by 3. Its last two digits are 47, and ​47 = 44 + 3​, so on division by 4 it leaves 3. For 11, count from the right: ​7 + 3 + 5 = 15​ and ​4 + 8 = 12​. The difference is 3, so it is not divisible by 11.

There is no short test for 7 or 13. Divide. (The six papers studied asked no question that needed one.)

One more fact is used in statement questions. Of any two numbers in a row, one is even. Of any three in a row, one is a multiple of 3. So ​n(n+1)(n+2)​ is always divisible by 6.

3. Remainders add and multiply

To find the remainder of a sum, a difference or a product, replace each number by its own remainder first. Then reduce again if needed.

On division by 7, the number 23 leaves 2 and the number 31 leaves 3. So:

  • ​23 + 31​ behaves like ​2 + 3 = 5​. Check: ​54 = 49 + 5​.
  • ​23 \times 31​ behaves like ​2 \times 3 = 6​. Check: ​713 = 7 \times 101 + 6​.
  • ​23 - 31​ behaves like ​2 - 3 = -1​, so the remainder is ​-1 + 7 = 6​.

The same holds for powers, because a power is a repeated product: ​65 = 63 + 2​, so ​65^2​ behaves like ​2^2 = 4​ on division by 7.

Remainders do not divide in this simple way. Use the rule for ​+​, ​-​ and ​\times​ only.

4. The unit digit of a power

The unit digit is the remainder on division by 10. By section 3 it depends only on the unit digit of the base. The unit digits of the powers of each digit repeat in a fixed cycle:

Base ends in Its powers end in Length of cycle
0, 1, 5, 6 the same digit, always 1
4 4, 6, 4, 6, ... (odd power 4, even power 6) 2
9 9, 1, 9, 1, ... (odd power 9, even power 1) 2
2 2, 4, 8, 6 4
3 3, 9, 7, 1 4
7 7, 9, 3, 1 4
8 8, 4, 2, 6 4

Method. Divide the power by 4 and look at the remainder. Remainder 1, 2 or 3 gives the 1st, 2nd or 3rd digit of the cycle. Remainder 0 gives the 4th digit. (The last two digits of the power are enough to find its remainder on division by 4.)

For ​8^{43}​: ​43 = 4 \times 10 + 3​, so take the 3rd digit of 8, 4, 2, 6. The unit digit is 2.

Three short facts save time:

  • A product of odd numbers is odd. An odd multiple of 5 ends in 5. An even multiple of 5 ends in 0.
  • The last two digits of a product depend only on the last two digits of each number. For ​1234 \times 5678​, work out ​34 \times 78 = 2652​: the product ends in 52. The same is true for the last three digits.
  • ​25^2 = 625​ and ​625 \times 25 = 15625​. So every power of 25 from the square onwards ends in 625.

5. The remainder of a large power

Use the first tool that fits.

Tool 1: look for 1 or ​-1​. Find a small power of the base that is 1 more or 1 less than a multiple of the divisor.

  • ​2^{100}​ divided by 7. Here ​2^3 = 8 = 7 + 1​, so ​2^3​ behaves like 1. Now ​2^{100} = (2^3)^{33} \times 2​, which behaves like ​1 \times 2​. The remainder is 2.
  • ​6^{41}​ divided by 7. Here ​6 = 7 - 1​, so 6 behaves like ​-1​. An odd power of ​-1​ is ​-1​, so the remainder is ​-1 + 7 = 6​. An even power would give 1.

Tool 2: write the cycle. If no power gives 1 or ​-1​ quickly, list the remainders of the powers until 1 appears. After that they repeat.

  • Powers of 2 divided by 9 leave 2, 4, 8, 7, 5, 1 and then repeat: a cycle of 6. For ​2^{50}​: ​50 = 6 \times 8 + 2​, so take the 2nd in the cycle. The remainder is 4.

Tool 3: a shortcut for a prime divisor (Fermat's rule). If ​p​ is a prime number and ​a​ is not a multiple of ​p​, then

a^{p-1} \text{ leaves remainder } 1 \text{ on division by } p.

So ​a^p​ leaves the same remainder as ​a​.

Check: ​2^6 = 64 = 7 \times 9 + 1​, and ​3^4 = 81 = 5 \times 16 + 1​. CDS I 2025 used this twice. Its Q78 asked for the remainder when ​2^{101}​ is divided by 101. Since 101 is prime, ​2^{100}​ leaves 1, so ​2^{101}​ leaves 2. The rule is not safe when the divisor is not prime: ​2^8 = 256​ leaves 4 on division by 9, not 1.

6. When ​a^n - b^n​ and ​a^n + b^n​ are divisible

Expression Always divisible by When
​a^n - b^n​ ​a - b​ for every ​n​
​a^n - b^n​ ​a + b​ when ​n​ is even
​a^n + b^n​ ​a + b​ when ​n​ is odd
​a^n + b^n​ with ​n​ even no rule test it another way

Why. On division by ​a - b​, the numbers ​a​ and ​b​ leave the same remainder, so ​a^n​ and ​b^n​ do too, and their difference leaves 0. On division by ​a + b​, the number ​a​ behaves like ​-b​. So ​a^n​ behaves like ​(-b)^n​, which is ​-b^n​ when ​n​ is odd and ​+b^n​ when ​n​ is even.

Check with ​a = 7​, ​b = 2​: ​7^3 - 2^3 = 335 = 5 \times 67​, ​\;7^2 - 2^2 = 45 = 9 \times 5​, ​\;7^3 + 2^3 = 351 = 9 \times 39​. But ​7^2 + 2^2 = 53​ is not divisible by 9.

Worked examples

Example 1. The five-digit number ​86A52​ is divisible by 9. Find the digit ​A​. Is the number then divisible by 36?

The known digits add to ​8 + 6 + 5 + 2 = 21​. The sum ​21 + A​ must be a multiple of 9, and ​A​ is a single digit, so ​21 + A = 27​ and ​A = 6​. The number is 86652. Now ​36 = 4 \times 9​, and 4 and 9 have no common factor. The last two digits, 52, are divisible by 4. So the number is divisible by 4 and by 9, and therefore by 36.

Example 2. Find the unit digit of ​7^{95} + 3^{58}​. What is its remainder on division by 5?

​95 = 4 \times 23 + 3​, so ​7^{95}​ ends in the 3rd digit of 7, 9, 3, 1, which is 3. ​58 = 4 \times 14 + 2​, so ​3^{58}​ ends in the 2nd digit of 3, 9, 7, 1, which is 9. The sum ends in the unit digit of ​3 + 9 = 12​, which is 2. A number ending in 2 leaves 2 on division by 5.

Example 3. Find the remainder when ​5^{123}​ is divided by 26.

Look for 1 or ​-1​: ​5^2 = 25 = 26 - 1​, so ​5^2​ behaves like ​-1​. Write ​5^{123} = (5^2)^{61} \times 5​. This behaves like ​(-1)^{61} \times 5 = -5​. Add 26: the remainder is 21.

Example 4. Consider the statements: (1) ​43^{21} + 17^{21}​ is divisible by 60. (2) ​43^{20} + 17^{20}​ is divisible by 60. Which is correct?

Here ​a + b = 43 + 17 = 60​. In (1) the power 21 is odd, so the sum is divisible by ​a + b = 60​. Correct. In (2) the power is even, so there is no rule and we test another way. The power 20 is a multiple of 4, so ​43^{20}​ ends in 1 (4th digit of 3, 9, 7, 1) and ​17^{20}​ ends in 1 (4th digit of 7, 9, 3, 1). The sum ends in 2. A multiple of 60 must end in 0. Not correct. Only statement (1) is correct.

From the real papers

These six questions are from the Elementary Mathematics papers of CDS I 2024, CDS I 2025 and CDS II 2025 (Series A). The answers agree with the final official key. Try each for 72 seconds before reading the solution.

CDS I 2024, Q18. If ​n​ is a natural number, then what is the sum of all distinct remainders of ​4^n + 6^n + 9^n + 11^n​ when divided by 10 for various values of ​n​?

(a) 3  (b) 4  (c) 6  (d) 7

Solution. The remainder on division by 10 is the unit digit. ​6^n​ always ends in 6 and ​11^n​ always ends in 1. For odd ​n​, ​4^n​ ends in 4 and ​9^n​ ends in 9: the sum ends like ​4 + 6 + 9 + 1 = 20​, remainder 0. For even ​n​, ​4^n​ ends in 6 and ​9^n​ ends in 1: the sum ends like ​6 + 6 + 1 + 1 = 14​, remainder 4. The distinct remainders are 0 and 4. Their sum is 4. Answer (b).

CDS I 2024, Q19. When the number (12345678910111213 ... 99100) is divided by 16, what will be the remainder?

(a) 15  (b) 12  (c) 4  (d) 3

Solution. For 16, only the last four digits matter (section 2). The number is 1, 2, 3, ..., 100 written in a row, so it ends in ... 98 99 100. Its last four digits are 9100. Now ​16 \times 568 = 9088​ and ​9100 - 9088 = 12​. Answer (b).

CDS I 2025, Q5. Let p be the remainder when ​7^{84}​ is divided by 342 and q be the remainder when ​7^{84}​ is divided by 344. What is ​(p - q)​ equal to?

(a) 0  (b) 1  (c) 2  (d) 6

Solution. Look for 1 or ​-1​: ​7^3 = 343​, which is 1 more than 342 and 1 less than 344. Write ​7^{84} = (7^3)^{28}​. On division by 342 it behaves like ​1^{28} = 1​, so ​p = 1​. On division by 344 it behaves like ​(-1)^{28} = 1​, because 28 is even, so ​q = 1​. Then ​p - q = 0​. Answer (a).

CDS I 2025, Q43. There are two natural numbers m and n (m > n). When m is divided by 12, it leaves a remainder 4. When n is divided by 12, it leaves a remainder 6. Which of the following statements is/are correct?

I. The remainder when (m + n) is divided by 12 is 10.

II. The remainder when (m - n) is divided by 12 is 10.

Select the correct answer using the code given below :

(a) I only  (b) II only  (c) Both I and II  (d) Neither I nor II

Solution. Replace each number by its remainder. ​m + n​ behaves like ​4 + 6 = 10​: statement I is correct. ​m - n​ behaves like ​4 - 6 = -2​, and ​-2 + 12 = 10​: statement II is correct. Check with ​m = 16​, ​n = 6​: ​22 = 12 + 10​ and ​16 - 6 = 10​. Answer (c).

CDS II 2025, Q11. What is the remainder when ​(17^{25} + 19^{25})​ is divided by 18?

(a) 0  (b) 1  (c) 3  (d) 9

Solution. The power 25 is odd, so ​17^{25} + 19^{25}​ is divisible by ​17 + 19 = 36​, and so by 18. Another way: on division by 18, 17 behaves like ​-1​ and 19 behaves like 1, so the sum behaves like ​(-1)^{25} + 1^{25} = 0​. Answer (a).

CDS II 2025, Q83. A Question is given followed by two Statements I and II. Consider the Question and the Statements.

Question: The last digit in the expansion of the number ​(54D)^{100}​ is 1. What is the value of the digit ​D​?

Statement-I: ​D > 5​

Statement-II: ​D​ is a multiple of 3.

Which one of the following is correct in respect of the above Question and the Statements?

(a) The Question can be answered by using one of the Statements alone, but cannot be answered using the other Statement alone  (b) The Question can be answered by using either Statement alone  (c) The Question can be answered by using both the Statements together, but cannot be answered using either Statement alone  (d) The Question can be answered even without using any of the Statements

Solution. The last digit of the power depends only on ​D​. The power 100 is a multiple of 4, so take the 4th digit of each cycle: for ​D = 1, 3, 7, 9​ the power ends in 1; for ​D = 2, 4, 6, 8​ it ends in 6; for ​D = 5​ in 5; for ​D = 0​ in 0. So ​D​ is 1, 3, 7 or 9. Statement I leaves 7 and 9: not enough. Statement II leaves 3 and 9: not enough. Together they leave only 9. Both statements are needed. Answer (c).

Not one of the six needed a long calculation. Each needed one idea, chosen quickly.

Mistakes that cost marks

  1. Testing 12 with 2 and 6. The two factors must have no common factor. 18 is divisible by 2 and by 6, but not by 12. For 12 use 3 and 4; for 36 use 4 and 9; for 72 use 8 and 9.
  2. Power divisible by 4, and then taking the 1st digit of the cycle. When the remainder is 0, take the 4th digit. ​2^{20}​ ends in 6, not in 2.
  3. Leaving a negative remainder. A remainder of ​-2​ on division by 12 is 10. Add the divisor once.
  4. Using ​a^n + b^n​ with an even power. ​a^n + b^n​ is divisible by ​a + b​ only when ​n​ is odd. In a statement that says "for all", also try the smallest value allowed: 0 for whole numbers, 1 for natural numbers.

Quick check

Do these without help. Answers are at the end.

  1. The number ​7A314​ is divisible by 9. Find the digit ​A​.
  2. Find the unit digit of ​3^{47} \times 7^{82}​.
  3. A number leaves remainder 7 when divided by 12. What remainder does its square leave when divided by 12?
  4. Find the remainder when ​2^{75}​ is divided by 9.
  5. Find the remainder when ​23^{11} + 27^{11}​ is divided by 25.

Read and watch more, free

The NCERT books teach the divisibility tests. They do not teach remainders of powers; for that, this lesson and the past papers are the material.

What Where Language
Textbook, the tests NCERT Class 6 Ganita Prakash, Chapter 5, section 5.5 Divisibility Tests · Hindi edition English, Hindi
Textbook, why the tests work NCERT Class 8 Ganita Prakash Part I, Chapter 5 Number Play · Hindi edition English, Hindi
Textbook, the tests by algebra NCERT Class 8 Ganita Prakash Part II, Chapter 6 Algebra Play, section 6.6 Decoding Divisibility Tricks · Hindi edition English, Hindi
Practice with answers NCERT Exemplar Class 8, Unit 13 Playing with Numbers · Hindi edition English, Hindi
The real papers UPSC previous question papers English, Hindi
Video, a full CDS course R.S SIR: Maths Playlist for CDS 2025 (the number system lessons, about 55 minutes each) Hindi and Hinglish
Video, numbered classes Chandigarh Career Group: CDS advance maths by Sandeep Brar (the ten number system classes) Hinglish
Video, in Hindi Rojgar with Ankit Defence: CDS 01 2025, Maths By Neeraj Baisla Sir (the number system lessons) Hindi

The videos were chosen from their titles, length and views; they have not yet been watched by a teacher.

Answers to the quick check

  1. ​7 + 3 + 1 + 4 = 15​, so ​15 + A = 18​ and ​A = 3​.
  2. ​47 = 4 \times 11 + 3​, so ​3^{47}​ ends in 7. ​82 = 4 \times 20 + 2​, so ​7^{82}​ ends in 9. ​7 \times 9 = 63​: the unit digit is 3.
  3. The square behaves like ​7^2 = 49 = 48 + 1​. Remainder 1.
  4. ​2^3 = 8 = 9 - 1​ and ​2^{75} = (2^3)^{25}​, which behaves like ​(-1)^{25} = -1​. Remainder ​-1 + 9 = 8​.
  5. The power is odd, so the sum is divisible by ​23 + 27 = 50​, and so by 25. Remainder 0.

Next chapter: HCF and LCM of numbers; Euclid's algorithm.

Free · no sign-up

Try three questions on this chapter

Exam-pattern questions from this chapter's drill. Pick an answer for each, then check.

  1. Question 1 of 3
    What is the remainder when ​10^{38}​ is divided by 37?
  2. Question 2 of 3
    What is the unit digit of ​3^{65} \times 6^{59} \times 7^{71}​?
  3. Question 3 of 3
    What is the unit digit of ​13^{47} \times 8^{22}​?
Free sign-up

You have read the chapter. Now make it stick.

A free account adds the video lesson, a drill of ten questions on this chapter marked like the exam, the timed mock papers, a study plan to your exam date and your own record of what you have done. No fee, no card.

Past questions quoted are from the official UPSC paper named in the text; the working is WishWas's own, checked against UPSC's answer key where one has been published. The links under “Read and watch more” go to free material on other sites; nothing is copied.