PYQ Vault

CDS Mathematics · Number System

Divisibility Rules & Missing Digits

The tests that decide divisibility from a number's written form alone — digit sums for 3 and 9, alternating sums for 11, the last few digits for the powers of 2 and 5 — and how to run them backwards to recover a digit the paper has hidden.

Why this matters

Nine PYQs, two of them HARD, and the smallest unit in the chapter by count — but it is pure mechanism, so it is close to guaranteed marks. Every question is one of two shapes: apply a test, or apply a test in reverse to find a hidden digit. The traps are all in the wording, not the mathematics.

Concept 1 of 4

The divisibility test table

Intuition

Every one of these tests exists because of what 1010 does modulo the divisor. For 3 and 9, 10110 \equiv 1, so each digit contributes its face value and the digit sum decides. For 11, 10110 \equiv -1, so digits alternate in sign. For the powers of 2 and 5, 10k10^k is itself a multiple, so only the last few digits survive. Knowing the reason means you never mix up which test belongs to which divisor.

Definition

Learn the table below cold. Two structural facts make it much shorter than it looks:

  • For a composite divisor, test its coprime prime-power parts separately: 6=2×36 = 2\times3, 12=4×312 = 4\times3, 33=3×1133 = 3\times11, 45=9×545 = 9\times5.
  • Testing 22 and 33 is not enough for 1212; you need 44 and 33, because 1212 carries two factors of 2.
DivisorTestReason
2last digit is even100(mod2)10 \equiv 0 \pmod 2
3digit sum divisible by 3101(mod3)10 \equiv 1 \pmod 3
4last two digits divisible by 41000(mod4)100 \equiv 0 \pmod 4
5last digit is 0 or 5100(mod5)10 \equiv 0 \pmod 5
6passes both the 2 and 3 tests6=2×36 = 2\times 3, coprime parts
8last three digits divisible by 810000(mod8)1000 \equiv 0 \pmod 8
9digit sum divisible by 9101(mod9)10 \equiv 1 \pmod 9
10last digit is 0100(mod10)10 \equiv 0 \pmod{10}
11alternating digit sum divisible by 11101(mod11)10 \equiv -1 \pmod{11}
Alternate the signs from the units digit leftwards. A result of 00 counts as divisible.
16last four digits divisible by 161040(mod16)10^4 \equiv 0 \pmod{16}
25last two digits are 00, 25, 50 or 751000(mod25)100 \equiv 0 \pmod{25}
12passes the 4 and 3 tests12=4×312 = 4\times 3, not 2×62\times 6
Testing 2 and 6 is wrong: 18 passes both and is not a multiple of 12.
7 and 13no short test worth learning1010 has order 6 modulo both
Thirteen rows. The reason column is not decoration — it is what tells you how many trailing digits a power-of-2 test needs.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 1Number SystemMODERATE
If the number 23P62971335 is divisible by the smallest odd composite number, then what is the value of P ?

[Q6 · CDS (II) 2020 — Elementary Mathematics · 2020]

The smallest odd composite number is 9, not 1, 3 or 15

CDS hides the divisor behind a description. 11 is neither prime nor composite, and 3,5,73, 5, 7 are all prime — so the smallest odd composite is 99. Get that wrong and you run a perfectly correct digit-sum test against the wrong divisor.

For a composite divisor, split into COPRIME parts

To test 12, use 4 and 3 — not 2 and 6. The parts must be coprime and must multiply to the divisor, otherwise you lose a factor: 18 passes the 2-test and the 6-test yet is not divisible by 12. Same trap for 8 (use 8 directly, not 2 and 4).

Concept 2 of 4

Recovering a hidden digit from a divisibility condition

Intuition

A test that turns a number into a digit sum can be run in reverse: if the sum must be a multiple of 9 and you know all the digits but one, the missing digit is forced. The only subtlety is that sometimes two values of the digit work, and the question expects you to notice.

Definition

Procedure for a hidden digit PP under a 3- or 9-condition:

  • Add the known digits to get a partial sum ss.
  • Require s+P0s + P \equiv 0 modulo 3 or 9, so PsP \equiv -s.
  • Solve within 0P90 \le P \le 9 and list every solution; modulo 3 there are usually three, modulo 9 usually one or two.

With two hidden digits AA and BB, the condition fixes only A+BA+B, so the answer is a count of digit pairs — and any extra condition (B is odd, A+B5A+B \le 5) prunes that list.

Hidden-digit condition

P ⁣ ⁣(known digits)(mod9),0P9P \equiv -\!\!\sum(\text{known digits}) \pmod{9}, \qquad 0 \le P \le 9

Worked example

The number 58P4158P41 is divisible by 9. Find PP.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 2Number SystemMODERATE
How many pairs (A, B) are possible in the number 479865AB if the number is divisible by 9 and it is given that the last digit of the number is odd ?

[Q3 · CDS (II) 2019 — Elementary Mathematics · 2019]

A mod-9 condition often has TWO digit solutions, not one

If the required residue is 00, both P=0P=0 and P=9P=9 satisfy it. A question asking "the value of PP" when two exist is asking you to notice; one asking for a count is counting both. Always solve the congruence and then enumerate the range rather than stopping at the first hit.

With two hidden digits the condition fixes only their SUM

9N9 \mid N pins A+BA+B to a residue, never AA and BB individually — so the answer is a count of pairs. Remember that A+B=0A+B=0 is a legitimate total (both digits zero) and is divisible by 9, which is the case students drop.

Concept 3 of 4

Divisors for which only the tail of the number matters

Intuition

10001000 is a multiple of 8, so every digit above the hundreds place contributes nothing to divisibility by 8. The same logic scales: to test 2k2^k or 5k5^k you may delete all but the last kk digits, however monstrous the number is. A 190-digit number can be settled by looking at four digits.

Definition

Because 10k=2k5k10^k = 2^k 5^k, we have 10k010^k \equiv 0 modulo 2k2^k and modulo 5k5^k. So for these divisors, NN and its last kk digits leave the same remainder:

  • 44 and 2525: last two digits;
  • 88 and 125125: last three digits;
  • 1616 and 625625: last four digits.

This works for remainders, not just for a yes-or-no answer — the remainder of NN on division by 16 equals the remainder of its last four digits.

Tail rule

N(Nmod10k)(mod2k)and(mod5k)N \equiv \left(N \bmod 10^{k}\right) \pmod{2^{k}} \quad\text{and}\quad \pmod{5^{k}}

Worked example

What is the remainder when the 9-digit number 473816952473816952 is divided by 8?
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

Example 3Number SystemMODERATE
When the number (12345678910111213 ... 99100) is divided by 16, what will be the remainder ?

[Q19 · CDS (I) 2024 — Elementary Mathematics · 2024]

The tail rule works only for divisors built from 2s and 5s

It fails the moment a factor of 3 or 7 appears, because 10k10^k is then not a multiple of the divisor. There is no "last two digits" test for 12 or 24. If the divisor is 2a5bm2^a 5^b m with m>1m>1, split it: handle 2a5b2^a5^b by the tail and mm by its own rule.

Reading the tail of a described number is where this goes wrong

When the number is described rather than printed — "write 1 to 100 in order" — the hard part is working out what the last four digits actually are. The string ends 99100\ldots 99\,100, so the final four characters are 91009100, not 00990099 or 99109910. Write out the tail explicitly before dividing.

Concept 4 of 4

What to do when the divisor has no usable test

Intuition

There is no digit-sum test for 7 or 13 worth memorising, and CDS knows it. When one of those turns up with a hidden digit, the intended method is not a clever rule — it is structured trial: reduce the problem to one unknown digit and test at most ten candidates, or exploit a structural factorisation instead.

Definition

Two workable routes when the divisor is awkward:

  • Bounded trial. If the condition leaves a single unknown digit, testing 00 through 99 is only ten divisions and the answer is unique. This is a legitimate exam method, not a fallback.
  • Structural factorisation. Rewrite the number in a form whose factors you can see. 1001=7×11×131001 = 7\times 11 \times 13 is the most useful such fact: any six-digit repeated block is automatically divisible by 7 and 13, and grouping digits in threes reduces a long number modulo 7, 11 and 13 at once.

For a counting question over a whole range, look for the constraint that shrinks the search before enumerating.

The 1001 grouping fact

1001=7×11×131001 = 7 \times 11 \times 13

Worked example

Is 861861 divisible by 7, and use the 1001 fact to decide whether 861861861861 is divisible by 13.
Practice this conceptself-check · 4 quick reps

From the bank · past-year question

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

[Q1 · CDS (I) 2021 — Elementary Mathematics · 2021]

Trial is the intended method here, so do not hunt for a rule

On a 13-divisibility question with one hidden digit, students lose two or three minutes trying to recall a test that does not exist. Ten divisions is faster and certain. The exam-craft point is recognising immediately that there is no rule to recall, which is why 7 and 13 have a row of their own in the table above.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (3)

Reference tables (1)

The divisibility test table13 rows
DivisorTestReason
2last digit is even100(mod2)10 \equiv 0 \pmod 2
3digit sum divisible by 3101(mod3)10 \equiv 1 \pmod 3
4last two digits divisible by 41000(mod4)100 \equiv 0 \pmod 4
5last digit is 0 or 5100(mod5)10 \equiv 0 \pmod 5
6passes both the 2 and 3 tests6=2×36 = 2\times 3, coprime parts
8last three digits divisible by 810000(mod8)1000 \equiv 0 \pmod 8
9digit sum divisible by 9101(mod9)10 \equiv 1 \pmod 9
10last digit is 0100(mod10)10 \equiv 0 \pmod{10}
11alternating digit sum divisible by 11101(mod11)10 \equiv -1 \pmod{11}
Alternate the signs from the units digit leftwards. A result of 00 counts as divisible.
16last four digits divisible by 161040(mod16)10^4 \equiv 0 \pmod{16}
25last two digits are 00, 25, 50 or 751000(mod25)100 \equiv 0 \pmod{25}
12passes the 4 and 3 tests12=4×312 = 4\times 3, not 2×62\times 6
Testing 2 and 6 is wrong: 18 passes both and is not a multiple of 12.
7 and 13no short test worth learning1010 has order 6 modulo both
Thirteen rows. The reason column is not decoration — it is what tells you how many trailing digits a power-of-2 test needs.

Watch out for (7)

Drill every past-year question on this subtopic

9 questions from the bank — paginated, with cart and Word-export support.

Related notes