A Card Magic Trick Explained

Interesting simple math behind

circuit4u
5 min readJun 27, 2021

I just saw a fun card magic trick by MLT Magic Tricks (on youtube). The trick itself was well executed and explained, but I still screwed up on my first try. And there are other people in the comment area experiencing issues as well.

First of all, my problem was that I used a 54-card deck, instead of a 52-card deck.

If that doesn’t quickly fix your issue, please allow me to explain the math behind the magic trick. Once you understand that, it becomes a lot easier to spot the problem, and furthermore to invent your own magic trick based on this.

Assuming that you’ve watch the video, the key of the trick is:

the last 11 cards of the deck must be 10,9,8,….,1,9, and then add a number of stuffing cards accordingly.

Why does the trick work?

1. The running count of a deck of cards

To simplify, let’s just start with a random deck of cards, and follow the procedure of the magic trick.

You flip the first card to reveal its digit, then “burn” a number of cards accordingly. Once you reach the count, reveal the next card and keep “burning”. For example, here is a possible sequence:

(5) C C C C

(10) C C C C C C C C C

(2) C

(1)

(8) C C C C C C C

(6) C C

You first get a “5”, then you burn away four cards; on the fifth one, you flip that card to revel a “10”. Again you burn away nine cards; on the tenth one, you flip a “2”, so on and so forth.

Because it’s a random pile, any number sequence can appear. But it doesn’t matter, as long as you follow the procedure.

Then you reach the end, you flip a “6”. But now there are only two cards left. You stop at this point.

Now let’s pretend, the last number you pulled is “3”, not “6”. If you add these numbers in the parentheses together 5 + 10 + 2 + 1 + 8 + … + 3 (not 6), what sum would you get?

It should be 52. Why? Because that’s the total number of cards in the deck. By running the procedure, you simply distributed the cards into piles, marked by the first number in the pile. It’s like adding up numbers of a bar chart or histogram. The sum must match the total number of items.

The only “flaw” is that the last number is random, it doesn’t have to match the left over cards. So the sum deviates from 52, because of the mis-count of the last pile.

We can fix that.

2. Pointer, Pointer … to that number 9

Now recall the real magic trick asks for the last 11 cards of the pile to be a sequence of 10, 9, …., 2, 1, 9

Imagine you hit a “10” in this sequence, the procedure will make

(10) C C C C C C C C C

(9)

— — — — —

Similarly, if you hit a “9”, you still reach the last card that is “9”

(9) C C C C C C C C

(9)

— — — — — —

So 10, 9, 8, …, 1 all points to the last number “9”. So now if add all the numbers together, what’s the sum?

Because “9” is the last card, there are 51 cards before it, which has been correctly tallied in their little piles. 51 + 9 = 60 . 60 is the magic number (pun intended)

Because the last pile is miscounted on purpose. It only has one card, but a number “9” is added to the sum. That’s an extra of 8, again 52 + 8 = 60. Just to reinstate where 60 comes from.

Now if we shift some cards behind (9), that pile is less “off”. Say, you put 4 cards behind the last (9):

… …

(9) C C C C

Is the sum still 60?

It shouldn’t be. Because you’ve taken 4 cards out of the original 51 cards ahead of (9). The math becomes

51– 4 + 9 = 51 + 9 – 4 = 60–4 = 56

Now you see, if you want your sum to be 52, you need to stuff eight cards after (9).

In fact, that’s the smallest number you can reach. Because after eight stuffing cards, the last pile (9) would be the correct tally. You just sum up to the total number of cards in the deck, which is 52.

Why can’t I stuff 9 cards after (9)?

Because the sequence would become

(9) C C C C C C C C

C

Your last card would start a new pile. That screws up the sum, by a random number from the last card.

3. Invent your own magic trick

Now you see the flaw of this card trick that it can only reach from 52 to 59, and the math behind the trick, let’s fix that.

In fact there is nothing magic about the number 60. It comes from 52 cards in the deck. So if we start with 51 card in the deck, then the sum can range from 51 (with 8 stuffing card) to 59 (with no stuffing card).

In addition, let’s design our own trick, based on this one.

Let’s say you have a deck of 32 cards, four suits of 1-to-8. Let’s make the last sequence be 8, 7, 6, …, 2, 1, 8

Because the last pile starts with (8), it results in a miscount of 7. So the total sum = 31 + 8 = 31 + 7 = 39, with no stuffing card.

So if you want the sum be 39, shift no card after (8). On the other hand, if you want you sum to be 32, just stuff seven cards after (8).

For the same reason, you can tune these numbers at your will.

Math beats magic any day of the week.

--

--

circuit4u

memento of electronics and fun exploration for my future self