1. Home
  2. Explore
  3. Mathematics
  4. Numberphile Card Trick

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Numberphile Card Trick

Speaker 1Speaker 2

Numberphile Card Trick

7:35
0:00-7:35
  1. Simon

    So I brought along my Numberphile playing cards, because I thought we could use them to demonstrate some neat divisibility tricks. I've got the first nine clubs here — all the numbered clubs from one to nine — and I want you to arrange them in any order to make a nine-digit number.

  2. Corey

    Right, I'll just shuffle them around. How about this order: 9, 4, 5, 1, 3, 6, 8, 7, 2. That gives us 945,136,872.

  3. Simon

    Now, look at that number. Is there anything interesting? Even, obviously, but what about divisibility by 9? I bet you it's a multiple of 9. Let's check — divide by 9 and you get 105,015,208 exactly. That's because the sum of the digits is 45, and 45 is divisible by 9.

  4. Corey

    So any arrangement of those nine cards works? Because they always sum to 45?

  5. Simon

    Exactly. The cross sum — what we call the digit sum — being divisible by 9 means the number itself is divisible by 9. Same goes for 3. It's a classic rule, and it's surprisingly easy to prove.

  6. Corey

    Let's see a proof then. I remember something about powers of 10 and remainders.

  7. Simon

    Sure. Write a number N as a sum: a_n times 10^n plus a_(n-1) times 10^(n-1) and so on, down to a_0. The digit sum T(N) is just a_n plus a_(n-1) plus ... plus a_0. Now subtract: N minus T(N) gives you a_n times (10^n – 1) plus a_(n-1) times (10^(n-1) – 1) and so on. Each of those differences is a string of 9s — like 9, 99, 999 — all divisible by 9. So N – T(N) is always a multiple of 9. That means if T(N) is divisible by 9, then N must be too. And if T(N) is divisible by 3, then N is divisible by 3, because 9 is a multiple of 3.

  8. Corey

    That is neat. And the reason it only works for 3 and 9 is because we factor out 9, right? For other numbers, the differences aren't necessarily multiples of them.

  9. Simon

    Exactly. But there are other rules. For 4, you only need to check the last two digits, because any multiple of 100 is divisible by 4. So if the last two digits are divisible by 4, the whole number is. For 8, you check the last three digits, but then you might need a sub-test for that three-digit number.

  10. Corey

    Give me an example for 8. I've got 1,752,464 in mind. How do I check if it's a multiple of 8?

  11. Simon

    Look at the last three digits: 464. Then do this: take the first two digits of that three-digit number — 46 — double it to get 92, and add the remaining digit, 4, to get 96. Since 96 is a multiple of 8, the original three-digit number is a multiple of 8, and so is the whole number. The proof is similar: if you write the three-digit number as 100a + 10b + c, and the test number as 2(10a + b) + c, then their difference is 80a + 8b, which is always a multiple of 8.

  12. Corey

    That's clever. And for 11, I've heard there's a trick with alternating sums. How does that work?

  13. Simon

    You reverse the number, then take the alternating sum: start from the leftmost digit and subtract the next, add the next, and so on. If the result is a multiple of 11, the original number is. So for a number like 9,656,205 — reverse it to get 5,0,2,6,5,6,9 — then 5 minus 0 plus 2 minus 6 plus 5 minus 6 plus 9 equals 11, which is a multiple of 11. And it works.

  14. Corey

    That seems a bit obscure, but I can see it could make a cool card trick. You could put down a random five-digit number, then add one card to make it a multiple of 11.

  15. Simon

    Exactly. If you're quick with mental arithmetic, you can calculate the alternating sum of the existing digits, figure out what you'd need to add to get to a multiple of 11, and then slip that card in. I tried it with 5, 4, 2, 1, 3, 5 and it worked — barely! My mental arithmetic isn't the best.

  16. Corey

    Now, we skipped 7, which is famously tricky. What's the rule for 7?

  17. Simon

    There's a method using blocks of three digits. Take a number like 984,976,006. Split it into blocks of three from the right: 984, 976, 006. Do an alternating sum: 984 minus 976 plus 6 equals 14. Since 14 is a multiple of 7, the original number is a multiple of 7. This works because 1,000 is congruent to -1 mod 7, and 1,000,000 is congruent to 1 mod 7, and so on. Also, 1,001 equals 7 times 11 times 13, and 999,999 is a multiple of 7. It's a neat property.

  18. Corey

    And if the alternating sum gives a three-digit number that's hard to check, you can do another test on that three-digit number, right?

  19. Simon

    Right. For a three-digit number, you can take the first two digits and subtract twice the third digit. So for 749, you do 74 minus 2 times 9 equals 56, which is a multiple of 7. So the original number is a multiple of 7.

  20. Corey

    That's helpful. But I heard there's a general method that works for any divisor ending in 1, 3, 7, or 9. Is that true?

  21. Simon

    Yes! There's a universal trick. Let's say you want to test divisibility by 23. First, find the 'divvy number': multiply 23 by something so it ends in 9. 23 times 3 is 69, which ends in 9. Add 1 to get 70, then divide by 10 to get 7. That's the divvy number. Now, for the number you're testing — say 2,374 — write it as 10t + q. Here, t is 237 and q is 4. Then compute t + m times q, where m is the divvy number. That gives 237 + 7*4 = 265. If that new number is divisible by 23 — and 265 divided by 23 is 11.521... no, wait, 23 times 11 is 253, 23 times 12 is 276, so it's not. But if it were, the original would be divisible by 23. Let me pick a better example — actually, 23 times 103 is 2,369, so test 2,369. Then t=236, q=9, 236 + 7*9 = 236 + 63 = 299. 23 times 13 is 299, so it works.

  22. Corey

    So the method only works for numbers ending in 1, 3, 7, or 9 because you need to multiply to get a 9 at the end, then add 1 to make it a multiple of 10, then divide by 10. That's clever. And the proof relies on the fact that 10m – 1 is a multiple of the original divisor.

  23. Simon

    Exactly. And that's the beauty of mathematics — you can find a pattern, prove it, and then use it in fun ways, like card tricks. It also reminds me of a friend named Norrie who can instantly tell if a number is a multiple of 7, just by 'feeling friendly' toward it. Not a mathematician, but he's got this weird talent.

  24. Corey

    That's amazing. So we've covered the cross-sum rule for 3 and 9, the last-digit rules for 4 and 8, the alternating sum for 11, the block method for 7, and the general method for any number ending in 1, 3, 7, or 9. And we've seen how they can be turned into engaging demonstrations.

  25. Simon

    Yep, and the key takeaway is that these rules aren't just arbitrary tricks — they all come from the structure of base 10 and the fact that 10 ≡ 1 mod 9, mod 3, and for other moduli, we exploit powers of 10 and clever transformations. Now you can impress your friends at parties.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent