# Number System: Divisibility Rules

Finding remainders is one of important concept in arithmetic.  For example, in finding units digit of an expression, H.C.F etc finding remainder is very important.
When 100 is divided by 8, we get 4 as remainder.  This can be represented as 100 = 8×k + 4.  Here k = 12 and remainder is 4.
In competitive exams, the problems are not straight forward.  So learn the following rules and techniques carefully.
The following rules are very important:

Rule 1: If N=A×B×C….N=A×B×C…. then the remainder when N is divided by D is equal to the product of the remainders when A, B, C … are divided by D.
Here (ND)R(ND)R means the remainder when N is divided by D

Solved Example 1:
Find the remainder when 1201 × 1203 ×1205 × 1207 is divided by 6.
Explanation:
If you don’t know the above rule, this problem is really calculation intensive.
But by applying the above rule, when 1201, 1201, 1203, 1204 divided by 6, leaves remainders 1, 3, 5, 1. The product of these remainders = 15.
When 15 is divided by 6, Remainder is 3.

Rule 2: If N=A+B+C….N=A+B+C…. then the remainder when N is divided by D is equal to the sum of the remainders when A, B, C … are divided by D.

Solved Example 2:
Find the remainder when 1! + 2! + 3! + 4! + 5! + …….100! is divided by 24.
Explanation:
By applying rule 2, we divide the terms of the above expression individually, and add them to get the final remainder.  But from 4! onwards all the terms leave a remainder 0 when divided by 24.
So the remainder = 1 + 2 + 6 + 0 + 0……. = 9

## General Divisibility rules:

Let us a take a number ABCDEF.  In decimal system this number can be written as
100,000A + 10,000B + 1000C + 100D + 10E + F

### Divisibility Rule for 2:

We can easily observe that from rule 2, if ABCDEF has to be divisible by 2, 2 must divide all the six terms above.  It is evident that except F remaining numbers are divisible by 2.  So if F is divisible by 2 then the number ABCDEF is divisible by 2.

### Divisibility Rule for 5:

Since all the terms except F is divisible by 5, the number is divisible when F is divisible by 5, or F must be 0 or 5.

### Divisibility Rule for 4:

We can see that Except last two terms 10E and F, the remaining terms are divisible by 4. so If the last two digits are divisible by 4, the entire number is divisble by 4.

### Divisibility Rule for 8:

Except last three terms the remaining terms are divisible by 8. So if the last three digits are divisible by 8 then the number is divisible by 8.
Thumb Rule: for 2, 4, 8, 16… we need to check the last 1, 2, 3, 4 … digits. Observer there 1, 2, 3, 4 are the powers of the divisor with base 2.

### Divisibility Rule for 3, 9:

100,000A + 10,000B + 1000C + 100D + 10E + F = 99999A + 9999B + 999C + 99D + 9E + (A + B + C + D + E + F)
We can see that Except (A + B + C + D + E + F) remaining terms are divisible by 3, 9.  If the digit sum is divisible by 3, 9 then the number ABCDEF is divisible by 3, 9. (A + B + C + D + E + F) is called digit sum of a number.

### Divisibility Rule for 11:

100,000A + 10,000B + 1000C + 100D + 10E + F = 100,001A + 9,999B + 1,001C + 99D + 11E + (-A + B – C + D – E + F)
From above we know that except (-A + B – C + D – E + F) the remaining digits are divisible by 11. So if the difference between the sum of the digists in the even places and odd places is 0 or multiple of 11 then the number is divisible by 11.

### Divisibility Rule for 6, 12 or any composite number:

If a composite divisor can be written as a product of co-primes and each of these co-primes divide the given number exactly, then that number is divisible by the divisor.  So if 2, 3 divide the given number exactly then 6 divides that number exactly.  Similarly, divisibility for 12 is to check divisibility for 3, 4.

### Divisibility for 7, 13, 17…:

The existing seed method rule is not good enough to solve problems given in examination.  So we learn some important formulas to solve questions easily.

## Fermat’s little theorem:

A number ap−1ap−1 is divided by p, then remainder is 1. Here P is prime.
Simbolically, (ap−1p)R=1(ap−1p)R=1
or ap−1≡1(mod P)ap−1≡1(mod P)
The advantage of using above format is that we can add, subtract, multiply and raise to some power to the numbers on the both sides of equivalent sign.

Solved Example 3:
What is the remainder when 81008100 is divisible by 17.
Explanation:
This is an extremely difficult problem to solve with out fermat little theorem.  By applying Fermat little theorem , We know that 816816  when divided by 17, the remainder is 1.
Now this problem can be written as (816)6×84(816)6×84
Now this problem simply boils down to (1)6×84(1)6×84 =  8484 = 82×8282×82, we need to find the remainder when 64 × 64 is divisible by 17. Or 13 × 13 = 169.  When 169 is divided by 17, remainder is 16.

## Wilson’s theorem:

If P is a prime number then (P – 1)! + 1 is divided by P the remainder is 0. or ((P−1)!+1P)R=0((P−1)!+1P)R=0
or (p−1)!+1≡0(mod P)(p−1)!+1≡0(mod P)

### Simplifying using congruence mod m:

a≡b(modm)a≡b(modm) or (am)R=b(am)R=b
The above expression can be read as, ‘a’ is congruent to b, mod m.
This means, when a is divided by ‘m’ the remainder is b.  (or) a, b gives same remainder when divided by m.
Now the following rules follows,
1. (a+km)R=b+k(a+km)R=b+k
If you add a value k on both sides and continue your calculation
2. (a×km)R=b×k(a×km)R=b×k
3. (akm)R=bk(akm)R=bk
Important: Never divided a, b with a number k.

Solved Example 4:
Find the remainder when 39! is divided by 41.
Explanation:
Substituting p = 41 in the wilson’s theorem, we get
40!+141=040!+141=0
40×39!+141=040×39!+141=0
−1×39!41=−1−1×39!41=−1
Cancelling -1 on both sides,
39!41=139!41=1

Alternatively:
By using congruent method
(41−1)!+1≡0(mod 41)(41−1)!+1≡0(mod 41)
40! +1 = 0 (mod 41)
40 × 39! = -1 (mod 41)
– 1×39! = -1 (mod 41)
Now by dividing the left hand expression by 41,
0 -1×39! = -1 (mod 41)
Cancelling -1 on both sides,
39! = 1 (mod 41)
So the remainder when 39! is divided by 41 is 1.

## Euler’s Totient theorem:

If the divisor is not a prime number we cannot apply fermat little theorem.  So we learn Euler Totient theorem.
The remainder when Nϕ(N)Nϕ(N) is divided by N is 1.  Here ϕ(N)=N(1−1a)(1−1b)(1−1c)…ϕ(N)=N(1−1a)(1−1b)(1−1c)…
a, b, c .. are prime factors of the number N when N is written in prime factorization format.  N=ap.bq.cr…N=ap.bq.cr…

Solved Example 6:
Find the remainder when 51005100 when divided by 18.
Explanation:
Here N = 18=2×3218=2×32
ϕ(18)=18(1−12)(1−13)ϕ(18)=18(1−12)(1−13) = 6
So 5656 when divided by 18, remainder is 1.
So we can write the given expression 5100=(56)16×545100=(56)16×54 = (1)16×54(1)16×54 = 52×52=7×7=4952×52=7×7=49
Now 49 when divided by 18, remainder is 13.

Solved Example 7:
Find the remainder when 303234303234 is divided by 11.
Explanation:
We know that as per fermat little theorem, 30103010 when divided by 11 leaves remainder 1.
So We try to write the given expression in this format. i.e., 32343234 = 10k + r where k is some quotient and r is remainder.
You can use Euler totient theorem to find the remainder. But the remainder when any number when divided by 10, is the units digit of that number.
32343234 units digit is 322322 = 4.  (Read this chapter for better understanding)
So 303234303234 = 30(10k+4)=(3010)k×30430(10k+4)=(3010)k×304 = (1)k×304(1)k×304 = 84=212=210×2284=212=210×22 = 4

Solved Example 8:
If the first 99 natural numbers are written side by side to form a new number 123456……….9899, then find the remainder when this number is divided by 11.
Explanation:
Any number that is divided by 11 leaves remainder which is equal to the difference of sum of digits in odd places and Sum of the digits in even places
Sum of the digits at odd places:
123456789101112131415161718192021 ………………………96979899
= (1+3+5+7+9) + (1+2+3+4+…..9) × 9 = 430
(From 11 to 99, 1 to 9 occurs 9 times)
Sum of digits at even places:
123456789101112131415161718192021 ………………………96979899
= (2 + 4 + 6 + 8 ) + 1 × 10 + 2 × 10 ……….9 × 10 = 20 + 450 = 470
Difference = 470 – 430 = 40
So remainder = 40/11 = 7

Solved Example 9:
ABCDEF is a six digit number divisible by 13.  Which of the following will necessarily be divisible by 13?
1.  5(A – D) + 2(B – E) – 2(C – F)
2.  4(A – D) + 5(B – E) – (C – F)
3.  4(A – D) + 2(B – E) – 5(C – F)
4.  4(A – D) + 3(B – E) – (C – F)
Explanation:
ABCDEF can be written as A.105+B.104+C.103+D.102+E.10+FA.105+B.104+C.103+D.102+E.10+F
The remainders when 100000, 10000, 1000, 100, 10, 1 divided by 13 are 4, 3, 12, 9, 10, 1
So The remainder when any sixdigit number say ABCDEF is divided by 13 is given by 4A + 3B + 12C + 9D + 10E + F
⇒⇒ 4A + 3B + 13C – C + 13D – 4D + 13E – 3E + F
⇒⇒ (F-C) + 4(A-D)+3(B-E) + 13(C+D+E)
Since ABCDEF is divisible by 13, it follows that 4(A-D) + 3(B-E) – (C-F) is divisible by 13.  So correct option 4.
Alternate method:
130000 is a six digit number divisible by 13.
A – D = 1, B – E = 3, C – F = 0.
Only option 4 is satisfying.

Solved Example 10:
Some chocolates were distributed among all the students of first class and 11 chocolates were left.  Had the same number of chocolates been distributed among the students of second class, 5 chocolates would have been left.  If the number of students in the first class is 4 times of those in the second, find the total students in both the classes.
1. 10
2. 20
3. 30
4. Cannot be determined
Explanation:
Let the students in second class = k
⇒⇒ students in the first class = 4k
If the number of chocolates is N, then
N = 4kp + 11- – – –  (1) or N = kq + 5 – – – – (2), where p and q are any integers.
(2) – (1) ⇒⇒ k(q – 4p) = 6
Hence, k is 6 or a factor of 6. i.e., 1, 2, 3, or 6
but K should not be 1, 2, 3 because when the number of chocolates divided among second class 5 chocolates are remaining.  So K should be greater than 5 i.e., 6
So total students in both the classes =k + 4k =  5k = 30
Alternate method:
Working with options
Option 1: when total students 5k = 10, then k = 2. Then remainder should not be 5. (when a number is divided by 2, remainders are 0, 1 only)
Option 2: 5k = 20 then k = 4. Remainder should not be 5
Option 3: 5k = 30, so students in the first class = 24, and second class = 6. Remainders are 11 and 5 possible.