Card Trick
How the Card Trick is Performed
As the teacher (who knows how this trick works) you will perform this card trick while the students watch carefully.
First, you shuffle the deck, and then deal 26 cards face-up in a stack. The stack is then turned over; it is now face down
and will be called the “discard stack”. The remaining 26 cards will produce piles of cards in the following manner. For
the first pile, if the first card is a 7, you place the 7 face up and then add three more cards (face down, and below the 7),
saying “8, 9, 10”. For the second pile, if the next card is a 4, you place the 4 face up and then add six more cards (face
down, and below the 4), saying, “5, 6, 7, 8, 9, 10.” If you lay down a 10 (or a face card), you simply announce “10” and
leave it in a pile by itself. You keep creating piles in this manner until the deck runs out. With the last pile, you usually
don’t have enough cards to count up to 10, so you just add this incomplete pile to the discard stack.
Now you select a student who chooses three of the piles to keep. You then gather up all the non-chosen piles and add
these cards (all face down) to the discard stack. Next, we add the values of the three face-up cards. For example, if the
three face-up cards were 4, 7, and Q, we would calculate 4+7+10 = 21. You now (dramatically!) predict what the 21st
card is from the top of the discard stack. Someone counts 21 cards down into the stack and confirms that your prediction
is correct.
The Questions
a) How is it that the teacher can predict the card?
b) Give a mathematical explanation for this trick.
c) Derive a formula that allows you to do this trick given different values for the following:
• The number of piles you keep (which was 3).
• The number you count up to when making the piles (which was 10). (Note: if you count up to 6, cards 7 and
higher have a value of 6. If you count up to 14, then a Jack has a value of 11, a Queen has a value of 12, and a
King has a value of 13.)
• The number of cards that you look at in the beginning (which was 26).
What are the limitations of this formula?
The Solutions
a) The key to this trick (assuming three piles and counting up to ten) is simply for the teacher to remember the seventh
card that was seen when the original 26 cards were counted out. No matter what happens with the three piles, the
final predicted card will always be this seventh card (which ends up being seven cards from the top of the original
face-down discard stack).
b) Why is the “magic number” to find the predicted card always equal to seven? Here’s an explanation. Let the values
of the top cards in each of the three piles be n1 , n2 , n3. The sum (T) of these three numbers is how far we count into
the final discard stack to find the predicted card. The number of cards in each of the three piles is (11 – n1) , (11 – n2)
, (11 – n3). Therefore, we can say that the total number of cards in the three piles is 33 – T (where T = n1 + n2 + n3).
Let X be the number of cards that have been added to the discard stack (after the initial 26 cards). We know that the
total number of cards in the three piles (33 – T) plus the number of cards that have been added to the discard stack
(X) must be equal to 26. Therefore: (33 – T) + X = 26, which leads to T – X = 7. This tells us that the number of
cards that we have to count into the final discard stack (T) (in order to find the predicted card) will always be seven
greater than the number of cards that were added to the discard stack (X). In other words, the predicted card is
always found at the seventh position down into the original (26-card) discard stack.
c) Let P be the number of piles, M be the number you count up to (when making the piles), and L be the number of
cards left over after we count out the first D cards (so D + L = 52). Our goal is to determine C, the “magic number”
that predicts the location of the desired card. In part b (above), we said that the total number of cards in the three
piles was 33 – T. Now it is P(M+1) – T. We also said 33 – T + X = 26, which is now P(M+1) – T + X = L.
Therefore, the “magic number” (C = T – X) we are looking for is given by: C = P(M+1) – L
The limitations are: C D; P(M+1) 52; P + D 52; P L < P(M+1)
We can now perform the trick in this manner: Given a value for P, we have to choose M such that P(M+1) 52, and
then choose L so that it is between P and P(M+1). For example, if we choose P = 5, then M 9. If we choose M = 7
(so when making the piles, any card above 7 counts as a 7), then 5 L < 40. And if we choose L = 30, then D = 22
and C = 10. 10 is the magic number for D = 22, P = 5, and M = 7.