Prealgebra · Lesson 3.2

Tests for Divisibility

Solve this lesson →All lessons

Take a number like 6,351. To find out whether 3 divides it you could do the long division, or you could add up the digits and know in a second. Every shortcut like that comes out of place value.

Problem
Five claim tags have numbers 2,470; 3,805; 6,118; 9,640; and 7,333. Without dividing, decide which are multiples of 5. Which single digit settles the question? How many of the five tags win a prize?
Show a hint
  • You do not have to divide the whole tag by 5. Write one tag as a stack of tens plus its leftover ones digit, like 2,470 = 247 tens and 0 ones, and watch which part you can stop worrying about.
  • A whole number of tens is already a multiple of 5, since every ten is 5 twice. By closure from the last lesson, throwing away a multiple of 5 leaves the question resting on the single ones digit. Which ones digits make the leftover a multiple of 5?
  • Sort the tags by their last digit alone. A tag wins for 5 when it ends in 0 or 5, and it also wins for 10 only when it ends in 0.
Show the full solution
Read the last digit of each tag. 2,470 ends in 0, 3,805 ends in 5, and 9,640 ends in 0, so those three are multiples of 5, while 6,118 and 7,333 end in 8 and 3. That is 3 tags. The ones digit decides it alone, because everything above it is a stack of tens and every ten already holds a 5.
Problem
Band sections have 84,317; 2,000,006; 55,550; and 9,999 players. Which counts are even and can line up in perfect pairs? How many of the four can pair up perfectly?
Show a hint
  • Pairing up two to a row works exactly when the count is even, so the real question is which of these four counts is even. Look hard at the end of each number before you reach for anything bigger.
  • Try writing a number as its tens part plus its last digit, like 55,550=55,55×10+0 or 84,317=8,431×10+7. Any whole number of tens is already even, so the only thing still in doubt is that final leftover digit.
  • For 2,000,006, all those zeros sit in the tens part and are already even on their own. Only the final 6 is left to decide the whole question, and 6 is even.
Show the full solution
Pairing up with nobody left over is just asking whether the count is even, so read the last digit. 84,317 ends in 7 and 9,999 ends in 9, both odd. 2,000,006 ends in 6 and 55,550 ends in 0, both even, so 2 sections pair up perfectly. Everything above the units digit is a whole number of tens, and tens are even, so only that last digit can tip a number to odd.

The last digit settled 2, 5, and 10 because every higher place is a multiple of ten. Now try 4. Ten is not a multiple of 4, so one digit is not enough. We need to cut earlier and keep a bigger tail. Where should the cut go?

Problem
A dealer splits stacks of 5,328; 7,914; 13,500; and 60,742 cards into complete hands of 4. Write each as hundreds plus its last two digits. How many stacks deal out evenly?
Show a hint
  • Try splitting each deck at the hundreds, like 7,914=79×100+14. One hundred is 25 full hands of 4, so every full hundred already deals out evenly. That means the hundreds part never causes trouble, no matter how big it is.
  • If the hundreds part always deals out evenly, then whether the whole stack works comes down to that small leftover number in the last two digits. So only check whether 28, 14, 00, and 42 each split into hands of 4.
Show the full solution
One hundred is 4×25, so every full hundred deals out evenly and only the last two digits matter. 5,328=53×100+28,7,914=79×100+14 13,500=135×100+00,60,742=607×100+42 The tail 28=4×7 works and the empty tail 00 works, while 14 and 42 are not multiples of 4. That leaves 2 stacks. Ten is not a multiple of 4, which is why one digit is not enough here and you have to keep two.
Problem
Arcade machines show totals 47,216; 9,360; and 128,500. Test only the last three digits of each for divisibility by 8. How many are divisible by 8?
Show a hint
  • A whole number of strips means the total is a multiple of 8. Look at 1000. Can you write 1000 itself as a whole number times 8? If every full thousand is already a stack of strips, then the thousands part can be thrown away and only what is left below a thousand can decide things.
  • Split each total right after the last three digits, like 47,216=47×1000+216. Closure lets you drop the 47×1000 chunk because it is a pile of complete strips, so only the three-digit tail, 216, is left to test against 8.
  • Now line the tests up. For 2 you read 1 digit, for 4 you read 2 digits, and for 8 you read 3. Ask which power of ten each of 2,4,8 first divides into cleanly, and the digit counts will line up by themselves.
Show the full solution
One thousand is 8×125, so every full thousand is a whole number of 8s and only the last three digits matter. For 47,216 the tail 216=8×27 fits, for 9,360 the tail 360=8×45 fits, and for 128,500 the tail 500 lands between 8×62=496 and 8×64=512, so it fails. That is 2 totals. You read as many digits as the first power of ten your divisor divides cleanly, so 210, 4100, and 81000 give 1 digit, 2 digits, and 3 digits.

Try the same tail trick on 9. It would need a power of ten that 9 divides, and there is none, since 10=9+1, 100=99+1, and 1000=999+1. Every power of ten misses a multiple of 9 by exactly 1, and because the miss is the same size every time, we can still build a test out of it.

Problem
The stamp number is 5,742. Break it by place value, write each power of ten as a multiple of 9 plus 1, and let the multiples fall away. What leftover decides whether 9 divides 5,742?
Show a hint
  • Do not divide the whole 5,742 at once. Split it by place value, 5742=5×1000+7×100+4×10+2, and look at each power of ten on its own.
  • Write each power of ten as a multiple of 9 plus 1, so 1000=999+1, 100=99+1, 10=9+1. Every '+1' hands its digit straight back to you.
  • After the 999, 99, and 9 chunks fall away as multiples of 9, the only piece left to check is 5+7+4+2.
Show the full solution
Spread 5742 out by place value and write each power of ten as a multiple of 9 plus 1. 5742=5(999+1)+7(99+1)+4(9+1)+2=(5×999+7×99+4×9)+(5+7+4+2) The first group is built from 999, 99, and 9, so closure drops it as a multiple of 9. What decides the question is the digit sum 5+7+4+2=18. Since 18=9×2, the stamp number is divisible by 9, and 5742÷9=638 confirms it.
Every power of ten is a run of nines, plus 1 10 = 9 + 1 100 = 99 + 1 1000 = 999 + 1 the green part is a multiple of 9, the gold part is just the digit, 1 So for 4,152 each digit leaves behind only itself 4·999 + 1·99 + 5·9 + 4+1+5+2 one big multiple of 9 the digit sum = 12 12 is a multiple of 9? No.
Here is the whole idea in one picture. Every power of ten is one short step above a run of nines, since 10=9+1, 100=99+1, and 1000=999+1, and a run of nines is always a multiple of 9. So when you write a number as its digits times those powers of ten, each digit splits into two pieces, a chunk of nines that the digit rides on and the bare digit left over. The nine chunks all gather into one big multiple of 9, which closure lets us set aside, and what stays behind is nothing but the digits added up. That leftover is the digit sum, which is why for 4,152 you only ever have to check 4+1+5+2=12. The number is divisible by 9 exactly when its digit sum is, because the digit sum is the one piece the multiple of 9 never carried away.
Problem
A view counter reads 5,839,206. Sum its digits, and if the result has more than one digit, sum again. What single digit do you land on, and what does it say about divisibility by 3 and by 9?
Show a hint
  • Add the seven digits of 5,839,206 together. You should get a two-digit number, so do not stop there.
  • Your first total is 33. Now add ITS digits, 3 + 3, to crush it down to one digit.
  • The single digit you reach is the remainder when 5,839,206 is divided by 9. Compare that digit to 3 and to 9 to read off which one divides the count.
Show the full solution
Add the digits, 5+8+3+9+2+0+6=33. That is still two digits, so add again, 3+3=6. A number and its digit sum leave the same remainder under 9, so this single digit is that remainder. It is a multiple of 3 but not of 9, so 5,839,206 is divisible by 3 and not by 9.

Try 11 next. We have 10=111, so ten leaves remainder 1. Then 100=99+1 leaves +1, and 1000=10011 leaves 1. The remainders flip between 1 and +1 as you climb the places, so the digits will need alternating signs.

Problem
Cards read 90,728 and 53,481. Exactly one is a multiple of 11. Since 101(mod11), combine digits with alternating signs. Which card is the multiple?
Show a hint
  • Start at 10=111. What does the next place value, 100, sit near? Try writing 100 as a multiple of 11 plus a little leftover, and then do the same for 1000, watching the leftover flip sign each time.
  • Since the leftovers go +1,1,+1,1, from the units place upward, a number leaves the same remainder against 11 as its digits combined with alternating signs, starting + at the units. Build that alternating sum for each card.
  • For 90,728 the alternating sum from the units is 82+70+9. Work that out, do the same for 53,481, and check which result is itself a multiple of 11.
Show the full solution
Since 10=111, 100=9×11+1, and 1000=91×111, the place values carry signs +,,+, from the units up once closure throws the multiples of 11 away. Combine each card's digits with those signs. 82+70+9=22,18+43+5=1 Only 22=2×11 is a multiple of 11, so the card is 90,728. The alternating sum gives the remainder against 11, and 53,481 misses by exactly that 1.

So far we can test 2, 3, 4, 5, 8, 9, 10, and 11, but not 6, 12, or 15. Each of those factors into divisors we already know how to test, so it is tempting to run both piece tests and combine the results. That does work, but only for certain choices of the two pieces.

Problem
A clerk thinks that if a pile is even and divisible by 6, then it must be divisible by 12. Every pile below 50 that is divisible by 2 and by 6 but NOT by 12 breaks that rule. Find the sum of all of them.
Show a hint
  • Being even is no extra news once a pile is divisible by 6, since 6 already carries a factor of 2 inside it. So the piles that break the clerk's rule are the multiples of 6 that are not multiples of 12.
  • Write each pile as 6k and run k=1,2,3, until the pile passes 50. Then test each of those piles for divisibility by 12, and keep the ones that fail.
Show the full solution
The piles below 50 that break the rule are 6, 18, 30 and 42, so the sum is 6+18+30+42=96. Every multiple of 6 is already even, so the test for 2 adds nothing. Write a pile as 6k. Divisibility by 12 needs a second factor of 2, and that only appears when k is even, so the rule breaks exactly at odd k. The split 12=2×6 counts the same factor of 2 twice, while 12=22×3 needs two of them. The honest split is 12=3×4.
Problem
A print shop has 25,830 flyers. Using the matching shortcut for each of 2, 3, 4, 5, and 9, decide which stack sizes divide 25,830 evenly. How many of the five work?
Show a hint
  • Each divisor has its own window into the number. For 2 and 5 you only need the last digit, for 4 the last two digits, and for 3 and 9 the digit sum. Look at the right part of 25,830 for each test instead of dividing the whole thing.
  • The flyer count ends in 0, which settles 2, 5, and 4 in one glance, and the digits add to a tidy round total that settles 3 and 9 together. Add 2+5+8+3+0 and see what it is a multiple of.
  • Four of the five fit. The only one to double check is 4, where ending in 0 is not enough on its own, so peek at the full last two digits, 30, and ask if that is a multiple of 4.
Show the full solution
The last digit is 0, so 2 and 5 both divide the run. For 4, read the last two digits, and 30=4×7+2 is not a multiple of 4, so 4 fails. For 3 and 9, read the digit sum. 2+5+8+3+0=18=9×2 So 9 divides the run, and 3 does too since 3 divides every 9. That is 4 of the five stack sizes. Ending in 0 settles 2 and 5 but never 4, which needs the full last two digits.

Run the tests backward. Instead of judging a finished number, suppose one digit is hidden and the number must be divisible by something. The same place-value thinking applies, but now you solve for the missing digit rather than just checking.

Problem
A boarding pass prints the flight number as 46,N12, but the hundreds digit N is smudged. The airline only issues numbers divisible by 9. Use the digit-sum test backward to find N.
Show a hint
  • The digit-sum test says a number is divisible by 9 exactly when the sum of its digits is a multiple of 9. Add up the digits you can see and leave N sitting in the sum.
  • You should land on 13+N. Now ask which single digit you can drop in so that 13+N becomes a multiple of 9. The next multiple of 9 past 13 is 18.
  • Only one digit from 0 through 9 makes 13+N reach a multiple of 9. Which one closes the gap up to 18?
Show the full solution
Add the digits of 46,N12 and keep N in the sum. 4+6+N+1+2=13+N For divisibility by 9 this has to be a multiple of 9, and the only one a single digit can reach from 13 is 18. So 13+N=18 and N=5. The flight number is 46,512, whose digits sum to 18=2×9. The digit-sum test runs backward just as well as forward, which is often enough to recover a hidden digit.
Problem
A label reads 543N6 with the tens digit N smudged. It must pass both the sorter for multiples of 9 and the sorter for multiples of 4. What digit is N?
Show a hint
  • Two machines means two tests, and each test watches a different part of the number. The multiple of 9 test cares about the whole digit sum, while the multiple of 4 test cares only about the last two digits, N6.
  • Add the known digits, 5+4+3+6 = 18, so the digit sum is 18+N. For that to be a multiple of 9, N has just two choices. Now check which of those choices makes the last two digits a multiple of 4.
Show the full solution
For the 9 sorter, the digit sum is 5+4+3+N+6=18+N, which is a multiple of 9 only for N=0 (sum 18) or N=9 (sum 27). For the 4 sorter, only the last two digits matter, since 100 is a multiple of 4. With N=0 the tail is 06=6, not a multiple of 4, but with N=9 the tail is 96=4×24. Only one digit clears both machines, N=9. Two tests read different pieces of the same number, so stacking them pins the hidden digit where the survivor lists overlap.

Every test worked the same way. Cut where one chunk becomes a multiple of the divisor, use closure to drop that chunk, and check the small piece left over. The cut lands in a different place for each divisor. The next section uses these tests to find prime factors.

Practice these ideas

Practice
Five raffle tickets have numbers 3,160; 8,002; 47,225; 90,118; and 6,500. Which are divisible by 5? How many win a prize?
Show the solution
Read the last digit of each ticket. 3,160 ends in 0, 47,225 ends in 5, and 6,500 ends in 0, so those three are divisible by 5, while 8,002 and 90,118 end in 2 and 8. That is 3 winners. Everything above the units digit is a multiple of ten, and ten is built from a 5, so only the last digit decides.
Practice
Five flight log codes are 1,316; 5,550; 23,128; 8,914; and 40,016. Which are divisible by 4? How many qualify?
Show the solution
One hundred is 4×25, so every full hundred is a multiple of 4 and closure lets you keep only the last two digits. For 1,316 the tail is 16=4×4, for 23,128 it is 28=4×7, and for 40,016 it is 16 again, all passing. The tails 50 and 14 each sit two past a multiple of 4, so those fail. That leaves 3 codes.
Practice
A track code reads 49,d06. To keep it divisible by 3, what is the largest digit d can be?
Show the solution
The digit sum is 4+9+d+0+6=19+d, and divisibility by 3 needs that total to be a multiple of 3. Since 19 leaves a remainder of 1, d has to supply a remainder of 2, which happens for d=2, 5, 8. The largest single digit there is 8. With d=8 the sum is 27=3×9, while d=9 would give 28 and miss.
Practice
Batch codes are 5,431; 7,002; 12,345; 81,000; and 6,453. How many are divisible by 9?
Show the solution
Add the digits of each code, since a number and its digit sum leave the same remainder under 9. The five sums are 5+4+3+1=13, 7+0+0+2=9, 1+2+3+4+5=15, 8+1+0+0+0=9, and 6+4+5+3=18. The multiples of 9 are 9, 9, and 18, belonging to 7,002, 81,000, and 6,453, so 3 codes qualify. The digit sum works because every power of ten is one more than a run of nines.
Practice
Every divisibility test reads only the piece the tossed chunk cannot hide. Write a number as digits times powers of ten, cut where one chunk becomes a multiple of the divisor, and closure throws that chunk away. The last digit settles 2, 5, 10, since the whole upper part is a multiple of all three. The last two digits settle 4 and the last three settle 8, since 100=4×25 and 1000=8×125. The digit sum settles 3 and 9, since each power of ten is one above a multiple of 9. The alternating digit sum settles 11, since the powers of ten land just below then above a multiple of 11, flipping sign. A composite settles by splitting it into coprime factors and testing each.
Practice
Five sticker orders are 4,128; 7,533; 90; 25,164; and 3,400. Which are divisible by 6? How many can the printer fill?
Show the solution
A number is divisible by 6 exactly when it is divisible by both 2 and 3. 4,128 is even with digit sum 15, 90 is even with digit sum 9, and 25,164 is even with digit sum 18, so those three pass both tests. 7,533 is odd, and 3,400 is even but its digit sum 7 is not a multiple of 3. The printer can fill 3 orders. The split 6=2×3 works because 2 and 3 share no common factor.
Practice
A bib number reads 34_7 with the tens digit hidden. Every bib is divisible by 9. Use the digit-sum test backward to find the hidden digit.
Show the solution
Call the hidden tens digit d. The digit sum is 3+4+d+7=14+d, and it must be a multiple of 9. Since d runs from 0 to 9, the sum runs from 14 to 23, and the only multiple of 9 in that window is 18, so 14+d=18 gives d=4. That makes the bib 3447, and 9×383=3447. The digit-sum test runs in reverse, turning a hidden digit into a small equation.
Practice
Daily krill counts are 3,128; 17,400; 9,990; 52,016; and 6,300. Which are divisible by 8? How many work?
Show the solution
A thousand is 8×125, so the thousands part is always a multiple of 8 and only the last three digits matter. For 3,128 the tail is 128=8×16, for 17,400 it is 400=8×50, and for 52,016 it is 016=8×2, so those three work. For 9,990 the tail 990 sits 6 past 8×123=984, and for 6,300 the tail 300 sits 4 past 8×37=296, so both fail. That is 3 counts.
Practice
Among house numbers 1 through 500, how many end in 6 and are divisible by 4?
Show the solution
Divisibility by 4 reads only the last two digits, since 100=4×25 sweeps every full hundred away. Among the endings 06,16,26,36,46,56,66,76,86,96, the multiples of 4 are 16,36,56,76,96, five per hundred. From 1 through 500 there are 5 full hundreds, so the total is 5×5=25. The winners are exactly the endings with an odd tens digit, which is why the same five repeat in every hundred.
Practice
A count reads 8_,386 with the thousands digit missing. It is divisible by 9. Find the hidden digit, then decide whether the full number is also divisible by 4.
Show the solution
The visible digits add to 8+3+8+6=25, so with the hidden digit d the digit sum is 25+d. That runs from 25 to 34, and the only multiple of 9 in range is 27, so d=2 and the count is 82,386. For 4, only the last two digits matter, and 86=4×21+2, so 82,386 is not divisible by 4. Each test reads a different chunk, so passing one never drags the other along.
Practice
A stamp serial reads 7_,320 with the thousands digit smudged. It must be divisible by both 3 and 8. How many digits could hide under the smudge?
Show the solution
For 8, only the last three digits matter, and 320=8×40, so the serial is divisible by 8 whatever hides in the thousands place. For 3, the digit sum is 7++3+2+0=12+, and since 12 is already a multiple of 3, the sum works exactly when is a multiple of 3, giving 0,3,6,9. That is 4 digits. The smudge sits above the window the 8 test reads, so only the 3 test rules anything out.
Practice
Tickets read 2,051; 4,613; 5,000; 8,267; and 3,002. Unlike 2 or 5, the number 7 has no digit shortcut, so divide honestly. How many win a cookie?
Show the solution
Seven has no digit shortcut, so divide. 2,051=7×293,4,613=7×659,8,267=7×1,181 Those three land exactly, while 5,000=7×714+2 and 3,002=7×428+6 leave remainders. So 3 tickets win a cookie. Not every divisor comes with a digit test, and for one like 7 you divide and read the remainder.
Practice
A wristband serial reads 41_9 with the tens digit hidden. Every serial is divisible by 11. Use the alternating-sum test backward to find the hidden digit.
Show the solution
Call the hidden tens digit d. Reading from the right with the units plus, the alternating sum is 9d+14=6d, and it must be a multiple of 11. Since d runs from 0 to 9, 6d runs from 6 down to 3, and the only multiple of 11 there is 0, so d=6. That makes the serial 4169, and 11×379=4169. The alternating-sum test runs backward the same way the digit-sum test does.
Practice
Since 1001=7×11×13, chop the number into three-digit blocks from the right and alternately subtract and add them. The result shares the same divisibility by 7, 11, and 13.