General Aptitude

Numerical reasoning

Part 1 of 5 · 15 min

Divisibility and remainders

The concept

Start with something familiar

You have 47 laddoos to pack into boxes of 6. You fill 7 boxes (7×6=427 \times 6 = 42) and 5 laddoos are left over. Those 5 are the remainder. If you'd had 48 laddoos, nothing would be left over, and you'd say 48 is divisible by 6.
That's all divisibility and remainders are: what's left after you pack into equal groups. GATE questions on this topic look scary because the numbers are huge, like 7957^{95}. But the tricks in this part let you work with the leftovers alone, and the leftovers are always small.

Idea 1: divisibility rules come from how 10 behaves

You can test divisibility without dividing, by looking at the digits. Each rule works for a reason, and the reason is how 10 behaves with that divisor.
DivisorTestWhy it works
2, 5, 10last digit10 is a multiple of each
4last two digits100 is a multiple of 4
8last three digits1000 is a multiple of 8
3, 9sum of digits10 is 1 more than 9
11alternating sum10 is 1 less than 11
Take 9. Since 10=9+110 = 9 + 1, every 10, 100, 1000 is "a multiple of 9, plus 1". So 352=3(99+1)+5(9+1)+2352 = 3(99 + 1) + 5(9 + 1) + 2 leaves the same remainder as 3+5+23 + 5 + 2. That's why the digit sum works, and it gives you the remainder too, not just yes or no.
Key idea
To test for 3 or 9, add the digits. For 4 or 8, look at the last two or three digits. For 11, take the alternating sum of digits from the right.
Example
Test 73,512 for 8, 9 and 11.
8: the last three digits are 512, and 512=8×64512 = 8 \times 64, so yes. 9: 7+3+5+1+2=187 + 3 + 5 + 1 + 2 = 18, a multiple of 9, so yes. 11: from the right, 2−1+5−3+7=102 - 1 + 5 - 3 + 7 = 10, not a multiple of 11, so no (the remainder is 10).

Idea 2: for a bigger divisor, test co-prime factors

To test for 12, you could divide by 12. But it's faster to split 12 into two factors that share no common factor, here 3 and 4, and test both. If a number is divisible by both 3 and 4, it is divisible by 12.
DivisorSplit intoNot into
123 and 42 and 6
182 and 93 and 6
243 and 84 and 6
364 and 96 and 6
The factors must be co-prime, meaning they share no factor other than 1.
Example
Is 7,356 divisible by 12?
By 3: 7+3+5+6=217 + 3 + 5 + 6 = 21, yes. By 4: the last two digits are 56, and 56=4×1456 = 4 \times 14, yes. Both pass, so 7,356 is divisible by 12. (Indeed 7356=12×6137356 = 12 \times 613.)

Idea 3: in sums and products, replace each number by its remainder

Every division can be written as:Number=Divisor×Quotient+Remainder\begin{aligned} \text{Number} &= \text{Divisor} \times \text{Quotient} \\ &\quad + \text{Remainder} \end{aligned}The useful consequence: when you add or multiply numbers, the remainder of the result depends only on the remainders of the numbers. So you can throw away the big parts and keep the leftovers.
Example
Find the remainder when 47×5347 \times 53 is divided by 6.
47=6×7+547 = 6 \times 7 + 5 and 53=6×8+553 = 6 \times 8 + 5, so both leave 5. Multiply the remainders: 5×5=255 \times 5 = 25, and 25=6×4+125 = 6 \times 4 + 1. The remainder is 1. (Check: 47×53=2491=6×415+147 \times 53 = 2491 = 6 \times 415 + 1.)

Idea 4: powers repeat in cycles

For a power like 7957^{95}, you can't multiply it out. But the last digit (the remainder on dividing by 10) of the powers of 7 runs in a cycle:
PowerValueLast digit
717^177
727^2499
737^33433
747^42,4011
757^516,8077
Once the last digit returns to 1, the cycle starts again: 7, 9, 3, 1, every 4 powers. So to find the last digit of 7957^{95}, divide the power by the cycle length and use the remainder:95=4×23+3⇒795 ends like 73, in 3\begin{aligned} &95 = 4 \times 23 + 3 \\ \Rightarrow\quad &7^{95} \text{ ends like } 7^3, \text{ in } 3 \end{aligned}
Key idea
Find the cycle of remainders, divide the power by the cycle length, and read off the position given by the remainder (a remainder of 0 means the last position).
Example
Find the remainder when 21002^{100} is divided by 7.
Powers of 2 leave 2, 4, 1, then 2, 4, 1 again: a cycle of length 3. 100=3×33+1100 = 3 \times 33 + 1, so 21002^{100} is in position 1 of the cycle. The remainder is 2.

Idea 5: the same remainder from several divisors means LCM plus that remainder

"A number leaves remainder 3 when divided by 4, 5 or 6." Take 3 away and the number becomes divisible by all of 4, 5 and 6, so it is a multiple of their LCM, which is 60.N=LCM×k+rN = \text{LCM} \times k + rA close cousin: "remainders 2, 3, 4 when divided by 3, 4, 5". Each remainder is 1 less than its divisor, so adding 1 makes the number divisible by all three:N=LCM×k−dN = \text{LCM} \times k - dHere each remainder is dd less than its divisor.
Example
Find the smallest two-digit number that leaves remainder 3 when divided by 4, 5 or 6.
LCM(4,5,6)=60\text{LCM}(4, 5, 6) = 60, so N=60k+3N = 60k + 3. With k=0k = 0, N=3N = 3, which is one digit. With k=1k = 1, N=63N = 63. Check: 63=4×15+3=5×12+3=6×10+363 = 4 \times 15 + 3 = 5 \times 12 + 3 = 6 \times 10 + 3.

How to spot which idea you need

The question says...Use
"is it divisible by 3, 4, 8, 9, 11"Idea 1: digit tests
divisible by 12, 18, 24, 36Idea 2: co-prime factors
remainder of a sum or productIdea 3: keep only the remainders
remainder or last digit of a big powerIdea 4: find the cycle
"leaves remainder r when divided by a, b, c"Idea 5: LCM plus r

Worked example 1warm-up

Find the remainder when 2,345×6782{,}345 \times 678 is divided by 9.
Solution
Step 1. Find each remainder with the digit sumIdea 1
2+3+4+5=142 + 3 + 4 + 5 = 14, and 1414 leaves 5 on division by 9. 6+7+8=216 + 7 + 8 = 21, which leaves 3.
Step 2. Multiply the remaindersIdea 3
5×3=155 \times 3 = 15.
Step 3. Reduce
15=9+615 = 9 + 6, so the remainder is 6.
Step 4. Check
2345×678=15,89,9102345 \times 678 = 15{,}89{,}910. Its digit sum is 1+5+8+9+9+1+0=331 + 5 + 8 + 9 + 9 + 1 + 0 = 33, and 33 leaves 6 on division by 9.

Worked example 2GATE level

Find the units digit of 795×3587^{95} \times 3^{58}.
Solution
Step 1. Find the cycle for 7Idea 4
Last digits 7, 9, 3, 1: length 4.
Step 2. Place 7957^{95}
95=4×23+395 = 4 \times 23 + 3, position 3, so 7957^{95} ends in 3.
Step 3. Find the cycle for 3
3,9,27,813, 9, 27, 81 give last digits 3, 9, 7, 1: also length 4. 58=4×14+258 = 4 \times 14 + 2, position 2, so 3583^{58} ends in 9.
Step 4. Multiply the last digitsIdea 3: the units digit of a product depends only on the units digits
3×9=273 \times 9 = 27, so the product ends in 7.
Step 5. Check
Computing the full product (a computer can) gives a number ending in 7.

All the equations at a glance

IdeaEquation
Digit tests3, 9: digit sum; 4, 8: last 2, 3 digits; 11: alternating sum
Co-prime split12=3×412 = 3 \times 4, 18=2×918 = 2 \times 9, 24=3×824 = 3 \times 8
RemaindersN=dq+rN = dq + r; sums and products use only rr
Cyclespower ÷ cycle length; remainder 0 means last position
Same remainderN=LCM×k+rN = \text{LCM} \times k + r