Divisibility and approximation · Mathematics Class 11–12 | StemPy Lab
Course 7.2·Lesson 3 of 3
Divisibility and approximation
Write the number as a multiple of the divisor plus or minus 1, expand with the binomial theorem, and see which terms the divisor swallows. This gives remainders, divisibility and last digits. For a power (1+h)n
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
Remainders: write the base as d±1
Expand (d+1)n:
(d+1)n=1+nd+nC2d2+nC3d3+⋯+dn.
Every term after the first is a multiple of d. So (d+1)n leaves remainder 1 when divided by d.
Now try (d−1)n. The expansion alternates in sign, and the last term is (−1)n. All the other terms are multiples of d. So the remainder is 1 when n is even, and d−1 when n is odd. We add d because a remainder cannot be negative.
Example. Find the remainder when 683 is divided by 7.
Step 1. Write the base.6=7−1, so 683=(7−1)83.
Step 2. Expand.(7−1)83=−1+(multiples of 7), since 83 is odd.
Step 3. Make the remainder positive.−1+7=6.
Answer: the remainder is 6.
Going one step further: divide by d2
Look at the expansion of (d+1)n again. The terms from nC2d2 onwards are all multiples of d2. So when we divide by d2, only the first two terms matter:
(d+1)n≡1+nd(modd2).
Example. Find the remainder when 1112 is divided by 100.
Step 1.11=10+1, so d=10 and d2=100.
Step 2.1112 leaves the same remainder as 1+12×10=121.
Step 3.121 divided by 100 leaves 21.
Answer:21. So 1112 ends in the digits 21. Indeed 1112=3138428376721.
Proving that a number is divisible
To show that an expression is divisible by d, write it as a sum of binomial terms and see what is left.
Example 1. Show that 9n−8n−1 is divisible by 64.
Write 9n=(1+8)n=1+8n+nC2⋅82+nC3⋅83+⋯. So
9n−8n−1=64(nC2+8nC3+⋯).
For n=3: 729−24−1=704=64×11.
Example 2. Show that 10n+3⋅4n+2+5 is divisible by 9.
Step 1.10n=(9+1)n=1+(a multiple of 9).
Step 2.4n+2=(3+1)n+2=1+3(n+2)+(a multiple of 9). So 3⋅4n+2=3+9(n+2)+(a multiple of 9).
Step 3. The total is 1+3+5=9 plus a multiple of 9. So it is divisible by 9.
For n=1: 10+192+5=207=9×23.
The last digits of a power
Example. Find the last two digits of 782.
Step 1. Find a power close to a multiple of 100.74=2401=2400+1.
Step 2. Raise it.780=(2401)20=(1+2400)20=1+20×2400+⋯. Every term after the first is a multiple of 100. So 780 ends in 01.
Step 3. Finish.782=780×49, which ends in 01×49, that is, 49.
Answer: the last two digits are 49.
Approximating a power
Write (1+h)n as a sum:
(1+h)n=1+nh+nC2h2+nC3h3+⋯.
When h is small, h2 is much smaller, h3 smaller still. So the first few terms are almost the whole answer.
Example 1. Estimate 1.0110. Here h=0.01 and n=10:
1+10×0.01+45×0.0001=1.1045.
The exact value is 1.10462…
Example 2. Estimate 0.996. Write 0.99=1−0.01, so h=−0.01:
1−6×0.01+15×0.0001=0.9415.
The exact value is 0.94148…
The error is about the size of the first term we left out. For 1.0110 that term is 10C3×0.013=0.00012, and the error is 0.000122.
A graph of value against h, from h = 0 to h = 0.1. A thick blue curve, (1 + h) to the power 10, rises from 1 to about 2.6. An orange dashed line, 1 + 10h, rises to 2 and falls below the curve. A green dotted curve, 1 + 10h + 45h squared, stays very close to the blue curve until about h = 0.05. A note at h = 0.01 says the exact value is 1.1046 and three terms give 1.1045.
Make h larger and the dots spread out. The method works well only when h is small.
Practise with new numbers
Try it in Python
The program shows that 1112 and 1+12×10 leave the same remainder on division by 100. Then it finds the last two digits of 782. Last, it adds the first terms of 1.0110 one at a time.
Common mistakes
Leaving a negative remainder. With (d−1)n and n odd, the remainder is d−1, not −1.
Mixing up the sign of h. For 0.996 use h=−0.01. The terms with odd powers of h are then negative.
Using the approximation when h is not small. The dots in the simulation move away from the line as h grows.
Dividing by d when you meant d2. Two terms of (d+1)n survive division by d2, but only one survives division by d.
Starting from the wrong power of 10. For the last two digits, look for a power that is 1 more than a multiple of 100.
Remember these
(d+1)n leaves remainder 1 when divided by d.
(d−1)n leaves remainder 1 if n is even, and d−1 if n is odd.
(d+1)n≡1+nd(modd2).
To prove divisibility, write each power as (multiple±1)n and expand.
For small h, (1+h)n≈1+nh+nC2h2.
The error is about the size of the first term left out.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Find the remainder when 1020 is divided by 9.
Find the remainder when 1323 is divided by 14.
Find the last two digits of 519.
Use two terms to estimate 1.025.
Find the remainder when 720 is divided by 6.
Enroll free in Properties and Applications of Binomial Coefficients
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.