Study Blocks

World map β€Ί Factors, multiples & primes β€Ί Lesson 2

Divisibility tests

⏱ about 45 min · MYP criteria A, B, C, D

By the end of this lesson you can…
🌍 The big question

Look at the barcode on any packet in your kitchen. Under the stripes there is usually a 13-digit number (in many countries; North America also uses 12-digit codes). The last digit is special: it is a check digit. It is chosen so that the scanner can tell, in a split second, if a digit was read wrongly.

Here is how the check works on these 13-digit codes (this is the real rule; the code below is made up):

2β€…β€Šβ€…β€Š6β€…β€Šβ€…β€Š0β€…β€Šβ€…β€Š4β€…β€Šβ€…β€Š1β€…β€Šβ€…β€Š5β€…β€Šβ€…β€Š9β€…β€Šβ€…β€Š3β€…β€Šβ€…β€Š7β€…β€Šβ€…β€Š2β€…β€Šβ€…β€Š0β€…β€Šβ€…β€Š8β€…β€Šβ€…β€Š72 \;\; 6 \;\; 0 \;\; 4 \;\; 1 \;\; 5 \;\; 9 \;\; 3 \;\; 7 \;\; 2 \;\; 0 \;\; 8 \;\; 7

  • Multiply the digits by 1,3,1,3,1,3,…1, 3, 1, 3, 1, 3, \dots in turn, from the left (the last digit is multiplied by 11).
  • Add everything up. For this code the total is 110110.
  • If the total divides exactly by 1010, the scanner beeps β€œOK”. If not, it asks for the code again.

How can the scanner tell at once whether 110110 divides by 1010? And how could you tell whether a big number divides by 33, or 99, or 44, without doing the division?

πŸ§ͺ Explore β€” try it, no scoring

Try these first. Nothing is marked: just have a go and keep your answers in mind.

no hints, nothing is marked

Which number of sweets can be shared equally between 2 people, with none left over? Try to decide without dividing.

no hints, nothing is marked

What is the remainder when 4141 is divided by 99?

no hints, nothing is marked

What is the remainder when 312312 is divided by 99?

🎯 Predict first

One million, 1 000 0001\,000\,000, is shared out into groups of 99. How many are left over?

In the explorer below, the number is built from hundreds, tens and ones blocks. Start with 347347 and divide by 9.

  1. Each hundred is drawn as 9999 and one orange piece; each ten as 99 and one orange piece. Why do the 9999s and 99s share into nines exactly? How many orange pieces are left over? Compare it with 3+4+73 + 4 + 7.
  2. Change the number. Does the count of leftovers always match the sum of the digits? Now divide by 3. What changes, and what stays the same?
  3. Now divide by 2, 5 and 10. Which blocks share out exactly? Which digit decides?
  4. Now divide by 4. Which blocks share out exactly now? Try 316316. What does adding up the digits say, and is it right?
hundreds: 3
tens: 4
ones: 7
Divide by:
hundreds999999tensonesleftovers gathered: 14, in groups of 9

Grey blocks share out exactly. Orange pieces are the leftovers.

347=3Γ—99+4Γ—9+(3+4+7)347 = 3 \times 99 + 4 \times 9 + (3 + 4 + 7)

The 99s and 9s share into 9s exactly. What is left is the sum of the digits, 3+4+7=143 + 4 + 7 = 14. 14Γ·914 \div 9 leaves remainder 5, so 347Γ·9347 \div 9 leaves remainder 5 too.

Check by dividing: 347Γ·9=38347 \div 9 = 38 remainder 5. βœ— 347 is not divisible by 9.
πŸ”Ž What do you notice?
  • Try-first 1. Only 538538 can be shared equally between 2 people. To decide, you only needed the last digit: 88 is even, while 347347, 1 000 0011\,000\,001 and 9 9999\,999 end in odd digits. The tens, hundreds and thousands always share into twos.
  • Try-first 2 and 3. 41Γ·941 \div 9 leaves remainder 55, and 4+1=54 + 1 = 5. β€…β€Š312Γ·9\; 312 \div 9 leaves remainder 66, and 3+1+2=63 + 1 + 2 = 6. That is not luck: in the explorer, the leftovers after taking out every 99 and 9999 are exactly the sum of the digits.
  • Dividing by 33 gives the same picture, because 99 and 9999 are multiples of 33 too.
  • For 22, 55 and 1010, every ten shares out exactly, so only the ones digit matters.
  • For 44, a ten does not share into fours (10=4Γ—2+210 = 4 \times 2 + 2), but a hundred does (100=4Γ—25100 = 4 \times 25). So the last two digits decide. Adding up the digits gives wrong answers for 44: for 316316, 3+1+6=103 + 1 + 6 = 10 leaves remainder 22, but 316=4Γ—79316 = 4 \times 79 leaves remainder 00.
πŸ“ Key idea

Tests that look at the last digits

A whole number is divisible by another when it divides exactly, with remainder 00.

divisible bytest
22the last digit is even: 0,2,4,60, 2, 4, 6 or 88
55the last digit is 00 or 55
1010the last digit is 00
44the number made by the last two digits is divisible by 44

Examples: 7 3587\,358 is divisible by 22 (it ends in 88). β€…β€Š2 316\; 2\,316 is divisible by 44, because 16=4Γ—416 = 4 \times 4.

πŸ” Why it works

Write the number as tens and ones: 7 358=735Γ—10+87\,358 = 735 \times 10 + 8. Every 1010 is 2Γ—52 \times 5, so the 735735 tens always share exactly into twos, into fives and into tens. Whatever is left to decide is in the ones digit, 88.

For 44, write the number as hundreds and the rest: 2 316=23Γ—100+162\,316 = 23 \times 100 + 16. Every 100100 is 4Γ—254 \times 25, so the hundreds always share into fours. Only the last two digits, 1616, are left to decide.

πŸ“ Key idea

Tests that use the digit sum

The digit sum of a number is what you get by adding its digits: the digit sum of 7 4527\,452 is 7+4+5+2=187 + 4 + 5 + 2 = 18.

divisible bytest
33the digit sum is divisible by 33
99the digit sum is divisible by 99

Even better: the remainder when a number is divided by 99 is the same as the remainder when its digit sum is divided by 99. (The same is true for 33.)

πŸ” Why it works

Every ten is 9+19 + 1. Every hundred is 99+199 + 1. Every thousand is 999+1999 + 1. So

7 452=7Γ—999+4Γ—99+5Γ—9+(7+4+5+2).7\,452 = 7 \times 999 + 4 \times 99 + 5 \times 9 + (7 + 4 + 5 + 2).

The 999999s, 9999s and 99s are all multiples of 99 (and of 33), so they share out exactly. What is left over is 7+4+5+27 + 4 + 5 + 2: the digit sum. So the number shares into nines exactly when its digit sum does, and the leftovers are the same. This works for any number, because every place value (10,100,1000,…10, 100, 1000, \dots) is a string of nines plus one.

πŸ“ Key idea

The test for 6

A number is divisible by 66 when it passes both tests: it is divisible by 22 and by 33.

4 5124\,512: the last digit 22 is even βœ“ and the digit sum 1212 is divisible by 33 βœ“, so 4 5124\,512 is divisible by 66.

πŸ” Why it works

Count the multiples of 33: 3Γ—1,β€…β€Š3Γ—2,β€…β€Š3Γ—3,β€…β€Š3Γ—4,…3 \times 1, \; 3 \times 2, \; 3 \times 3, \; 3 \times 4, \dots, that is 3,6,9,12,…3, 6, 9, 12, \dots Three times an even number is even, and three times an odd number is odd (odd + odd + odd is odd). So the even multiples of 33 are exactly 3Γ—2,β€…β€Š3Γ—4,β€…β€Š3Γ—6,…3 \times 2, \; 3 \times 4, \; 3 \times 6, \dots, which are 6Γ—1,β€…β€Š6Γ—2,β€…β€Š6Γ—3,…6 \times 1, \; 6 \times 2, \; 6 \times 3, \dots: the multiples of 66. So a number that is a multiple of 33 and even is a multiple of 66.

⚠️ Watch out
  • 66 needs both tests. Ending in 66 is not enough: 1616 ends in 66 but 16Γ·616 \div 6 leaves remainder 44.
  • The digit sum only works for 33 and 99. For 44, 316316 has digit sum 1010, which is not divisible by 44, but 316=4Γ—79316 = 4 \times 79 is. For 77, 1616 has digit sum 77, but 1616 is not divisible by 77. The reason: 10=9+110 = 9 + 1 is special to 99 (and 33).
  • The test for 44 uses the last two digits as a number, not their sum: for 316316, look at 1616, not 1+61 + 6.
  • Divisible by 22 and by 44 does not mean divisible by 88. 1212 is divisible by 22 and by 44, but not by 88.
  • A test answers β€œyes or no”. The last-digit tests also give the remainder for 22, 55 and 1010 (from the last digit) and the digit sum gives it for 33 and 99. They do not tell you the answer of the division.
🧱 Worked example

Testing 7 452

Which of 2,3,4,5,6,9,102, 3, 4, 5, 6, 9, 10 divide 7 4527\,452 exactly?

Step 1: The last digit

The last digit is 22: even, so divisible by 22 βœ“. Not 00 or 55, so not divisible by 55 or 1010.

Step 2: The last two digits

52=4Γ—1352 = 4 \times 13, so 7 4527\,452 is divisible by 44 βœ“.

Step 3: The digit sum

7+4+5+2=187 + 4 + 5 + 2 = 18. β€…β€Š18\; 18 is divisible by 33 and by 99, so 7 4527\,452 is divisible by 33 βœ“ and by 99 βœ“.

Step 4: Six

Divisible by 22 and by 33, so divisible by 66 βœ“.

Step 5: Is it sensible?

Check one of the answers by dividing: 9Γ—800=7 2009 \times 800 = 7\,200 and 9Γ—28=2529 \times 28 = 252, so 9Γ—828=7 4529 \times 828 = 7\,452 βœ“, remainder 00. The test for 99 and the division agree. Any of the other answers can be checked by dividing in the same way.

🧱 Worked example

Two ways to decide whether 3 132 is divisible by 6

Way 1: Divide

3 132Γ·63\,132 \div 6: β€…β€Š6Γ—500=3 000\; 6 \times 500 = 3\,000, leaving 132132, and 132Γ·6=22132 \div 6 = 22. So 3 132=6Γ—5223\,132 = 6 \times 522, with remainder 00. Yes.

Way 2: Use the tests

The last digit 22 is even βœ“. The digit sum 3+1+3+2=93 + 1 + 3 + 2 = 9 is divisible by 33 βœ“. So it is divisible by 66. Yes.

Which is neater?

Both say yes. Way 2 is faster and easier to do in your head: two quick checks and no long division. But Way 1 gives you more: it tells you there are 522522 groups of 66. If you only need yes or no, use the tests. If you need to know how many groups, divide.

Foundation

Which number is divisible by 44?

Foundation

Use the digit sum to find the remainder when 8 0158\,015 is divided by 99.

🎬 Another explanation

Still stuck after the example? Hearing it from another teacher often helps. These videos were checked against this lesson. Try the questions again afterwards.

Divisibility tests for 2, 3, 4, 5, 6, 9, 10 | Factors and multiples | Pre-Algebra | Khan Academy Β· Khan Academy Β· about 7 min

Tries the quick tests for 2, 3, 4, 5, 6, 9 and 10 on three big numbers, showing how to use the last digits and the digit sum without dividing.

Same idea, different words: This video shows how to use the tests; it says itself that it does not explain why they work. Watch the second video, or re-read the Why boxes, for the reasons.

Divisibility by 3 and by 9: Why do they work? (TANTON Mathematics) Β· DrJamesTanton Β· about 8 min

Explains why adding the digits works for 9 and for 3: every 10, 100 and 1000 is one more than a multiple of 9, so a number leaves the same remainder as its digit sum.

Same idea, different words: This teacher says 'upon division by 9' for 'when you divide by 9'. The clip stops before the extra part about 11, which uses negative remainders.

πŸ€” Pause and think

1000=8Γ—1251000 = 8 \times 125. Use this to invent a test for divisibility by 88. Which digits would you look at? Try it on 5 1365\,136, and check by dividing.

⛏ Practice β€” choose your level

Which number is divisible by 33?

πŸ— Build project β€” real-life task

Checking barcodes

Every 13-digit barcode number ends in a check digit. The rule (the real one) is: multiply the digits by 1,3,1,3,…1, 3, 1, 3, \dots from the left, add them up, and the total must be divisible by 10. The codes in these questions are made up, but the rule is the one shop scanners use.

IB StandardCriterion D

A scanner reads this (made-up) barcode number:

2β€…β€Šβ€…β€Š6β€…β€Šβ€…β€Š0β€…β€Šβ€…β€Š4β€…β€Šβ€…β€Š6β€…β€Šβ€…β€Š5β€…β€Šβ€…β€Š9β€…β€Šβ€…β€Š3β€…β€Šβ€…β€Š7β€…β€Šβ€…β€Š2β€…β€Šβ€…β€Š0β€…β€Šβ€…β€Š8β€…β€Šβ€…β€Š72 \;\; 6 \;\; 0 \;\; 4 \;\; 6 \;\; 5 \;\; 9 \;\; 3 \;\; 7 \;\; 2 \;\; 0 \;\; 8 \;\; 7

Multiply the digits by 1,3,1,3,…1, 3, 1, 3, \dots from the left and add. What is the total? Should the scanner accept the code?

IB StandardCriterion D

A new (made-up) product gets the first 12 digits

2β€…β€Šβ€…β€Š9β€…β€Šβ€…β€Š5β€…β€Šβ€…β€Š1β€…β€Šβ€…β€Š3β€…β€Šβ€…β€Š0β€…β€Šβ€…β€Š7β€…β€Šβ€…β€Š4β€…β€Šβ€…β€Š2β€…β€Šβ€…β€Š8β€…β€Šβ€…β€Š6β€…β€Šβ€…β€Š12 \;\; 9 \;\; 5 \;\; 1 \;\; 3 \;\; 0 \;\; 7 \;\; 4 \;\; 2 \;\; 8 \;\; 6 \;\; 1

The 13th digit is the check digit; it is multiplied by 11. What must the check digit be, so that the total is divisible by 1010?

ExtensionCriterion D

A barcode is smudged, and one digit cannot be read:

2β€…β€Šβ€…β€Š6β€…β€Šβ€…β€Š0β€…β€Šβ€…β€Š4β€…β€Šβ€…β€Š1β€…β€Šβ€…β€Š5β€…β€Šβ€…β€Š9β€…β€Šβ€…β€Šβ– β€…β€Šβ€…β€Š7β€…β€Šβ€…β€Š2β€…β€Šβ€…β€Š0β€…β€Šβ€…β€Š8β€…β€Šβ€…β€Š72 \;\; 6 \;\; 0 \;\; 4 \;\; 1 \;\; 5 \;\; 9 \;\; \blacksquare \;\; 7 \;\; 2 \;\; 0 \;\; 8 \;\; 7

The missing digit is the 8th one, so it is multiplied by 33. The full total must be divisible by 1010. What is the missing digit?

ExtensionCriterion D

The shop says: "If one digit of a barcode is misread, the scanner always notices."

Explain why this is true. Think about how much the total changes when one digit is wrong, for a digit multiplied by 11 and for a digit multiplied by 33. Then say why shops find a check digit useful.

πŸ““ Work it out in your notebook first β€” sketch, calculate, then write your answer here in full sentences. A model answer appears after you submit, so you can compare.

πŸ”— Connections

Divisibility tests are place value at work: they come straight from the fact that our numbers are built from tens. The same thinking powers check digits on barcodes, on book numbers (ISBNs) and on bank card numbers, so that a single mistyped digit is caught. Next lesson you will meet the numbers that cannot be split into smaller factors at all: the prime numbers. The tests from today will make it much faster to decide whether a number is prime.

πŸͺž Reflect

Explain to someone at home why the digit-sum test works for 9. Use the words '9 + 1' and '99 + 1'.

Why does the digit-sum test not work for 4? Give a number that shows it.

πŸ“– Read more in your book
  • Prealgebra (Art of Problem Solving) β€” Chapter 3, section 3.2 Divisibility Tests

The book goes deeper and its problems are harder. Read it after this lesson, with a pencil in your hand.