+91 98186 32779
🎖️ 15,000+ Officers SelectedSince 2001Retired SSB Officer FacultyOwn 5-Acre GTO GroundSee Results →
Home / CDS / OTA Study Material / Maths / Remainders and Divisibility Tricks
CDS / OTA · Maths

Remainders and Divisibility Tricks

One idea, the leftover after making equal groups, answers about five questions in every CDS maths paper. Here is every shortcut, with each answer checked.

⏱ 14 min read ★ Graduate / CDS level ✓ Exam-ready notes By The Cavalier
🎯 What you'll learn
  • Divisibility rules from 2 to 13, and why one 1001 test checks 7, 11 and 13 together
  • Remainder arithmetic, negative remainders and the cycles of unit digits
  • Large powers with binomial expansion and Fermat's little theorem
  • The polynomial remainder theorem, successive division and the traps UPSC sets

Today is Monday. What day of the week will it be 2100 days from now? That number has 31 digits, so no calendar will help, yet the answer takes about twenty seconds: Wednesday. All you need is the remainder when 2100 is divided by 7, and by the cyclicity section below you will find it in your head.

This is not a party trick. We went through every CDS Elementary Mathematics paper in our archive, 17 papers from 2018-I to 2026-II, and counted 66 questions that turn on a remainder, a divisibility test or a last digit, plus 17 more on the polynomial remainder and factor theorems. That is 83 questions, about five a paper, in every year from 2018 to 2026. CDS 2024-II alone had 12, and CDS 2023-I had 8. NDA hides the same ideas inside the binomial theorem, probability and counting questions: 17 of them in the 13 NDA papers we hold. Some of our copies are incomplete, so the real totals are higher. A handful of ideas answers nearly all of them.

Divisibility Rules from 2 to 13, and Why They Work

Our number system page lists the basic rules. Here is the full set up to 13 with the reason behind each, because UPSC hides an unknown digit and makes you apply the rule.

DivisorTestWhy it works
2, 5, 10Last digit even / 0 or 5 / 010 is a multiple of each, so only the units digit matters
4Last two digits divisible by 4100 is a multiple of 4
8Last three digits divisible by 81000 is a multiple of 8
3 and 9Digit sum divisible by 3 (or 9)10 leaves remainder 1 on division by 3 and by 9, so every power of 10 does too
6, 126: by 2 and 3. 12: by 3 and 4Split into co-prime factors. For 24 use 3 and 8, never 4 and 6: 12 passes both
11(Sum of digits in odd places) − (sum in even places), counting from the units digit, is 0 or a multiple of 1110 leaves remainder −1 on division by 11, so powers of 10 alternate +1, −1
7Double the last digit and subtract it from the rest; repeat10(a − 2b) = (10a + b) − 21b, and 21 = 3 × 7
13Add four times the last digit to the rest; repeat10(a + 4b) = (10a + b) + 39b, and 39 = 3 × 13

The same tests give remainders, not just yes or no. A number leaves the same remainder on division by 9 as its digit sum, on division by 4 as its last two digits, and on division by 8 as its last three.

The 1001 trick for 7, 11 and 13 together

Since 1001 = 7 × 11 × 13 and 1000 is one less than 1001, a long number can be cut into groups of three digits from the right. The alternating sum of those groups (rightmost group, minus the next, plus the one after, and so on) leaves the same remainder on division by 1001, and therefore by 7, 11 and 13. The same fact explains why ABCABC = ABC × 1001 is always divisible by all three. CDS 2023-I pushed it one step further with XYXYXY = XY × 10101, where 10101 = 3 × 7 × 13 × 37.

Worked example 1

Is 539,264,187 divisible by 7, 11 or 13?

Groups from the right: 187 | 264 | 539 Alternating sum: 187 − 264 + 539 = 462 462 = 2 × 3 × 7 × 11, and 462 = 13 × 35 + 7 Answer: divisible by 7 and by 11, not by 13 (remainder 7).

Remainder Arithmetic: Make Big Numbers Small

A remainder is what is left after making equal groups. Thirty-one beads in rows of seven make four full rows with three left over: 31 = 7 × 4 + 3. The remainder always lies between 0 and one less than the divisor. Mathematicians write this as 31 ≡ 3 (mod 7), read "31 is congruent to 3 modulo 7". Counting round a dial with seven slots lands on the same slot, which is why this is also called clock arithmetic.

Illustration of blue beads in four equal rows of seven in a wooden tray with three orange beads left over, beside a seven-slot dial whose spiral arrow goes round four times and stops at an orange bead in the third slot
Four full rows of seven leave three beads over; counting the same beads round a seven-slot dial goes round four times and stops on the third slot. That leftover is the remainder. Illustration: The Cavalier

The rules that make remainder questions fast: if a leaves remainder r and b leaves remainder s on division by n, then a + b, a − b, a × b and ak leave the same remainders as r + s, r − s, r × s and rk. Replace every big number by its remainder first, then calculate.

Worked example 2

Find the remainder when 1234 × 5678 + 999 is divided by 9.

1234: digit sum 10 → remainder 1 5678: digit sum 26 → remainder 8 999: remainder 0 1 × 8 + 0 = 8 Answer: 8

Negative remainders

A remainder can also be written as a negative number. 17 is one short of 18, so 17 ≡ −1 (mod 18). This pays off with powers, because (−1)even = 1 and (−1)odd = −1. At the end, add the divisor to turn a negative answer into a true remainder.

Worked example 3

Find the remainder when 235 is divided by 9.

2³ = 8 = 9 − 1, so 2³ ≡ −1 (mod 9) 2³⁵ = (2³)¹¹ × 2² ≡ (−1)¹¹ × 4 = −4 −4 + 9 = 5 Answer: 5
The trap

−4 is not a remainder, and neither is 4. 4 is the classic wrong answer here: it comes from dropping the minus sign. A remainder on division by 9 must be one of 0 to 8, so −4 becomes 5. Likewise 2323 ÷ 24 leaves 23, not 1.

Cyclicity: Unit Digits and Remainders Repeat

The unit digit of a power depends only on the unit digit of the base, and it repeats in a short cycle:

Unit digit of baseUnit digits of successive powersCycle length
0, 1, 5, 6Never change1
44, 6, 4, 6 … (odd power 4, even power 6)2
99, 1, 9, 1 … (odd power 9, even power 1)2
22, 4, 8, 64
33, 9, 7, 14
77, 9, 3, 14
88, 4, 2, 64

Every cycle length divides 4, so one rule covers all ten digits: replace the exponent by its remainder on division by 4, and use 4 when that remainder is 0. The laws of indices from our powers and roots page justify the step, since 795 = (74)23 × 73.

Worked example 4

Find the unit digit of 795 × 358.

95 = 4 × 23 + 3 → 7³ = 343 → unit digit 3 58 = 4 × 14 + 2 → 3² = 9 → unit digit 9 3 × 9 = 27 Answer: 7

Remainders on division by any number cycle as well. Powers of 2 divided by 7 leave 2, 4, 1, 2, 4, 1 … (cycle of 3). Powers of 3 divided by 7 leave 3, 2, 6, 4, 5, 1 (cycle of 6). Find the first power that leaves remainder 1, and the exponent can be cut down by multiples of it.

Worked example 5 (the opening puzzle)

What day is it 2100 days after a Monday?

2³ = 8 leaves remainder 1 on division by 7 100 = 3 × 33 + 1, so 2¹⁰⁰ = (2³)³³ × 2 → 1 × 2 = 2 Monday + 2 days = Wednesday (Its unit digit: 100 = 4 × 25, remainder 0 → 4th term of 2, 4, 8, 6 → 6)
Two cycle traps

When the exponent is a multiple of 4, take the fourth term of the cycle, not the first: 2100 ends in 6, not 2. And use only the last digit of the base: 67972 ends like 72, in 9 (CDS 2021-I asked exactly this).

Large Powers: Binomial Expansion and Fermat's Little Theorem

When the base sits next to a multiple of the divisor, the binomial theorem does the work. In (n + 1)k = nk + k·nk−1 + … + k·n + 1, every term except the last 1 contains n. So:

Binomial shortcuts
  • (multiple of n + 1)k leaves remainder 1 on division by n.
  • (multiple of n − 1)k leaves 1 if k is even and n − 1 if k is odd.
  • (multiple of n + r)k leaves the same remainder as rk.
Worked example 6

Find the remainder when 3250 is divided by 26.

3³ = 27 = 26 + 1 3²⁵⁰ = 3²⁴⁹ × 3 = (26 + 1)⁸³ × 3 (26 + 1)⁸³ leaves 1, so the remainder is 1 × 3 Answer: 3

The same expansion gives the "is divisible by" results that UPSC sets almost every year:

ExpressionAlways divisible by
an − bna − b, for every natural number n
an − bn, n evenboth a − b and a + b
an + bn, n odda + b
an + bn, n evenno general rule: 3² + 1² = 10 is not divisible by 4

So 4149 + 4349, an odd power, is divisible by 41 + 43 = 84, which was the answer in CDS 2022-I.

Fermat's little theorem

If p is a prime and a is not a multiple of p, then ap−1 leaves remainder 1 on division by p. Multiplying by a, ap leaves remainder a. Pierre de Fermat stated the result in a letter in 1640 without a proof; Leonhard Euler published the first proof in 1736. In practice it hands you a cycle length for any prime divisor: cut the exponent down by multiples of p − 1.

Worked example 7

Find the remainder when 6100 is divided by 17.

17 is prime and 6 is not a multiple of 17 → 6¹⁶ leaves 1 100 = 16 × 6 + 4, so 6¹⁰⁰ leaves the same remainder as 6⁴ 6⁴ = 1296 = 17 × 76 + 4 Answer: 4
Fermat's fine print

The divisor must be prime. 15 is not, and 214 = 16384 leaves 4 on division by 15, not 1. Also, p − 1 is a cycle, not always the shortest: 23 already leaves 1 on division by 7. Either works.

The Remainder Theorem and Successive Division

Our algebra basics page introduces this theorem; here is how UPSC stretches it. Remainder theorem: when a polynomial f(x) is divided by (x − a), the remainder is f(a). Divided by (ax − b), it is f(b/a). The proof is one line: f(x) = (x − a)·q(x) + r, and putting x = a wipes out the first term. If f(a) = 0, then (x − a) is a factor; this is the factor theorem.

Worked example 8

Find the remainders when f(x) = 2x³ − 5x² + 4x − 7 is divided by (x − 3) and by (2x − 1).

f(3) = 54 − 45 + 12 − 7 = 14 f(1/2) = 1/4 − 5/4 + 2 − 7 = −6 Answer: 14 and −6

Unlike remainders of whole numbers, a polynomial remainder can be negative or a fraction, and dividing by a quadratic leaves a remainder of the form px + q, found by substituting both roots. The theorem also explains the digit rules. The number 5678 is f(10) for f(x) = 5x³ + 6x² + 7x + 8. On division by 9, 10 behaves like 1, so 5678 leaves the same remainder as f(1), the digit sum. On division by 11, 10 behaves like −1, giving f(−1), the alternating sum.

Successive division

Every division obeys dividend = divisor × quotient + remainder, with the remainder smaller than the divisor. In successive division, the quotient of the first step is divided by the next divisor. Work backwards from the last step.

Worked example 9

A number divided successively by 4 and 5 leaves remainders 1 and 4. Find its remainder on division by 20.

Let the last quotient be q: first quotient = 5q + 4 Number = 4(5q + 4) + 1 = 20q + 17 Answer: 17 (shortcut: d₁ × r₂ + r₁ = 4 × 4 + 1, not 1 + 4)

Questions of the "least number leaving remainder 5 when divided by 6, 12, 15 and 18" kind are LCM questions in disguise, solved on our HCF and LCM page.

How UPSC Has Asked It: Past Papers Solved

Actual CDS and NDA questions, each solved with a tool from above.

CDS 2021-I · Q1

If the number 413283P759387 is divisible by 13, then what is the value of P?

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

Answer: (d). Use the 1001 trick. Groups from the right: 387, 759, 83P, 132, 4. Alternating sum = 387 − 759 + (830 + P) − 132 + 4 = 330 + P. The next multiple of 13 is 338 = 13 × 26, so P = 8. With (b), 336 leaves remainder 11.

CDS 2026-I · Q30

What is the digit in the unit place of 17 + 37 + 57 + 77 + 97?

(a) 1   (b) 3   (c) 5   (d) 7

Answer: (c). 7 = 4 + 3, so take the third term of each cycle: 1, 7, 5, 3 and 9 (odd power of 9). 1 + 7 + 5 + 3 + 9 = 25, which ends in 5. Note that 37 ends in 7 and 77 in 3: the two swap.

CDS 2020-II · Q11

If 172020 is divided by 18, then what is the remainder?

(a) 1   (b) 2   (c) 16   (d) 17

Answer: (a). 17 ≡ −1 (mod 18), and (−1)2020 = 1 because 2020 is even. Option (d) 17 would be right for an odd power.

CDS 2021-I · Q2

What is the remainder when 21000000 is divided by 7?

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

Answer: (b). 23 leaves 1 on division by 7. 1,000,000 = 3 × 333,333 + 1, so the remainder equals that of 21, which is 2. Option (a) tempts anyone who assumes a round exponent fits the cycle; 1,000,000 is a multiple of 4 but not of 3 (its digit sum is 1).

NDA 2024-II · Q36

What is the remainder when 7n − 6n is divided by 36 for n = 100?

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

Answer: (b). 7n = (1 + 6)n = 1 + 6n + nC2·36 + …, and every term after 6n contains 36. So 7n − 6n = 1 + (a multiple of 36) for every n. Option (a) forgets the 1.

CDS 2025-I · Q78

What is the remainder when 2101 is divided by 101?

(a) 1   (b) 2   (c) 5   (d) 7

Answer: (b). 101 is prime, so by Fermat 2100 leaves 1 and 2101 leaves 2. Option (a) is the remainder of 2100, which is ap−1, not ap.

CDS 2025-II · Q1

Let p(x) be a polynomial. When p(x) is divided by (x − 1), it leaves 2 as the remainder. When p(x) is divided by (x − 2), it leaves 1 as the remainder. What is the remainder when p(x) is divided by (x − 1)(x − 2)?

(a) 3   (b) −3   (c) 3 − x   (d) 3 − 2x

Answer: (c). Write the remainder as ax + b. Then p(1) = a + b = 2 and p(2) = 2a + b = 1, so a = −1 and b = 3. Constant options (a) and (b) would need p(1) = p(2).

The pattern

Most of these questions sit among the first 30 of the CDS paper. The commonest single type is the remainder of a large power (cycle, negative remainder or Fermat), followed by "is divisible by" with an ± bn, and a hidden digit tested against 9 or 13. NDA tucks the same ideas into binomial expansions and counting problems.

Practice MCQs (with answers)

  1. For which digit d is the number 527d46 divisible by 11?
    1. 3
    2. 8
    3. 5
    4. 0
  2. What is the remainder when 2,001,002 is divided by 13?
    1. 3
    2. 0
    3. 1
    4. 5
  3. What is the unit digit of 1347 × 1735?
    1. 3
    2. 7
    3. 9
    4. 1
  4. What is the remainder when 2323 is divided by 24?
    1. 1
    2. 22
    3. 23
    4. 0
  5. 2941 + 3141 is divisible by
    1. 58
    2. 60
    3. 62
    4. 59
  6. What is the remainder when 497 is divided by 97?
    1. 1
    2. 16
    3. 96
    4. 4
  7. What is the remainder when 4x³ − 2x² + 6x − 1 is divided by (2x − 1)?
    1. 2
    2. −2
    3. 4
    4. 1
  8. A number divided successively by 3 and 7 leaves remainders 2 and 5. What is its remainder on division by 21?
    1. 7
    2. 10
    3. 17
    4. 12
Answer key

1-b, 2-a, 3-d, 4-c, 5-b, 6-d, 7-a, 8-c. Q1: from the units digit, 6 − 4 + d − 7 + 2 − 5 = d − 8, which is 0 for d = 8. Q2: groups 002, 001 and 2 give 2 − 1 + 2 = 3, and 1001 is a multiple of 13. Q3: 1347 ends like 33 (7) and 1735 like 73 (3); 7 × 3 = 21. Q4: 23 ≡ −1 and the power is odd, so −1 + 24 = 23. Q6: 97 is prime, so 497 leaves 4. Q8: 3 × 5 + 2 = 17, not 2 + 5 or 2 × 5.

Quick Revision

Revise in two minutes
  • Digit sum → 3, 9; last two digits → 4; last three → 8; alternating sum from the units digit → 11. Composite divisors: co-prime split (24 = 3 × 8).
  • 7: double the last digit and subtract. 13: add four times the last digit. 1001 = 7 × 11 × 13: alternating sum of 3-digit groups tests all three. 10101 = 3 × 7 × 13 × 37.
  • Replace numbers by remainders before adding, multiplying or raising to powers. 17 ≡ −1 (mod 18); add the divisor to a negative answer.
  • Unit digits: exponent ÷ 4; remainder 0 → fourth term.
  • (kn + 1)m leaves 1; (kn − 1)m leaves 1 or n − 1. an − bn ÷ (a − b) always; an + bn ÷ (a + b) for odd n.
  • Fermat: p prime, a not a multiple of p → ap−1 leaves 1.
  • f(x) ÷ (x − a) leaves f(a); ÷ (ax − b) leaves f(b/a); ÷ quadratic leaves px + q. Successive division by d₁, d₂ with remainders r₁, r₂: remainder on d₁d₂ = d₁r₂ + r₁.

Frequently asked questions

What is the divisibility rule for 7?

Double the last digit and subtract it from the number formed by the remaining digits; if the result is a multiple of 7, including 0, so is the original number. For long numbers, split the digits into groups of three from the right and take the alternating sum of the groups. Because 1001 = 7 × 11 × 13, that one sum tests 7, 11 and 13 together.

How do I find the remainder of a very large power quickly?

Find a small power of the base that leaves remainder 1 or −1, then cut the exponent down by multiples of it. For a prime divisor p, Fermat's little theorem says the power p − 1 leaves 1. For a unit digit, use the cycle of four.

What is a negative remainder and when should I use it?

It treats a number as slightly less than a multiple of the divisor: 17 = 18 − 1, so 17 leaves −1 on division by 18. It makes powers easy, since −1 to an even power is 1 and to an odd power is −1. Add the divisor at the end, because a remainder must lie between 0 and one less than the divisor.

What does Fermat's little theorem say?

If p is a prime number and a is not a multiple of p, then a to the power p − 1 leaves remainder 1 when divided by p. For example, 2 to the power 100 leaves remainder 1 on division by 101. The theorem applies only to prime divisors.

Why does the remainder theorem give f(a)?

Any polynomial can be written as f(x) = (x − a) × q(x) + r, where r is the remainder. Putting x = a makes the first term zero, so r = f(a). For a divisor of the form ax − b, put x = b/a instead.

Number questions are the fastest marks in CDS maths

Cavalier's CDS/OTA batches drill remainders, divisibility and cyclicity with timed PYQ sets every week, until each one takes under a minute.