You are on page 1of 8

https://www.math.hmc.edu/funfacts/ffiles/10002.1-8.

shtml

Magic 1089

Here's a cool mathematical magic trick. Write down a three-digit number whose
digits are decreasing. Then reverse the digits to create a new number, and subtract
this number from the original number. With the resulting number, add it to the
reverse of itself. The number you will get is 1089!

For example, if you start with 532 (three digits, decreasing order), then the reverse
is 235. Subtract 532-235 to get 297. Now add 297 and its reverse 792, and you will
get 1089!

Presentation Suggestions:
You might ask your students to see if they can explain this magic trick using a little
algebra.

The Math Behind the Fact:


If we let a, b, c denote the three digits of the original number, then the three-digit
number is 100a+10b+c. The reverse is 100c+10b+a. Subtract: (100a+10b+c)(100c+10b+a) to get 99(a-c). Since the digits were decreasing, (a-c) is at least 2
and no greater than 9, so the result must be one of 198, 297, 396, 495, 594, 693,
792, or 891. When you add any one of those numbers to the reverse of itself, you
get 1089!
......................................
Leapfrog Addition

Here's a nice mathematical magic trick based on properties of the Fibonacci sequence.
Give your friend a card with ten blank lines, numbered 1 through 10. Have your friend think of
two numbers between 1 and 20 and write them down on the first 2 lines of the card. Now in each
of the successive lines, have your friend write the sum of the previous two lines. For instance, in
line 3, write the sum of lines 1 and 2. In line 4, write the sum of lines 2 and 3, etc. until finally in
line 10, your friend has written the sum of lines 8 and 9.

Ask your friend to total the numbers. If you've practiced the Multiplication by 11 Fun Fact, you'll
be able to tell your friend the total faster than she can add the numbers (because the total will be
just 11 times the number in line 7). Also, you can announce the quotient of line 10 divided by
line 9... to 2 decimal places, it will be 1.61!
Let's do an example. Suppose your friend tells gives you the numbers 3 and 7. Her card will then
have these numbers:
1. 7
2. 3
3. 10
4. 13
5. 23
6. 36
7. 59
8. 95
9. 154
10.249
The total is 649 (which is just 11 times 59, do this in your head with
the Multiplication by 11 Fun Fact.
The quotient 249/154 is 1.61 (to 2 decimal places).

Presentation Suggestions:
Write down the quotient 1.61 on another card, and place it in an envelope before the start of your
magic trick. Then you can have your friend open that envelope after she has computed the
quotient.
The Math Behind the Fact:
The trick works for the following reason. If the number X is in line 1, and the number Y is in line
2, then the number X+Y will be in line 3, the number (X+Y)+Y=(X+2Y) will be in line 4, and so
on. Continuing, you will find that line 7 contains (5X+8Y), line 9 contains (21X+34Y), and line
10 contains (55X+88Y), which is indeed just 11 times line 7.
For the ratio of line 10 divided by line 9, we appeal to a property of "adding fractions badly": for
positive numbers A, B, C, D where (A/B) < (C/D), it is a neat fact that the fraction you get by

"adding badly": (A+C)/(B+D), must lie in between the values (A/B) and (C/D). So the ratio
(55X+88Y)/(21X+34Y) must lie in between (55X/21X)=1.615... and (88Y/34Y)=1.619...
An even more stunning fact is that if you continue this leapfrog procedure with many more lines,
then the ratio of successive lines will approach the golden ratio: 1.6180339... (If you know some
linear algebra, this follows because the leapfrog procedure can be written as a 2-dimensional
linear system of equations, and the largest eigenvalue of this system happens to be the golden
ratio.)
This magic trick may be found in the delightful book in the reference.
How to Cite this Page:
Su, Francis E., et al. "Leapfrog Addition." Math Fun Facts.
<http://www.math.hmc.edu/funfacts>.

Red-Black Card Trick

Here's a pretty easy card trick that you can do that can also be pretty surprising. Here's how the
trick you do will appear to others:
Take a deck of cards, and give it to a spectator and ask her to shuffle the deck and return it to you
face down. You take the cards, and (with a little showmanship but without looking at the fronts
of the cards) separate them into two piles, and then say "I've made two piles so that the number
of red cards in the first pile is the number of black cards in the second pile."
Have your spectator turn over the cards and verify!
Presentation Suggestions:
Your spectator can shuffle the cards as many times as she likes--- it won't matter! When she
gives the cards to you, all you are really doing (though don't make it obvious) is counting the
cards into two piles so that there are 26 cards in each pile.
The Math Behind the Fact:
The reason this trick works is simple... if the number of red cards in the first and second piles is
R and S, and the number of black cards in the first and second piles is A and B, then we know
that R+S=26 (since the total number of red cards is 26) and S+B=26 (since the total number of
cards in the second pile is 26). These two equations can be subtracted from one another to show
that R-B=0, or R=B.
For more fun, try the Red-Black Pairs Card Trick, or one of the other Fun Facts on mathematical
magic.

Binary Card Trick

You put a deck of cards in your pocket, and invite anyone in the audience to call out a number
between 1 and 15. Then you reach into your pocket, you take out a set of cards whose sum is the
number that was called!
How can you perform this magic trick?
The Math Behind the Fact:
This mathematical magic trick can be found in the reference and is based on the properties of
binary numbers. Every number between 1 and 15 has a unique representation as a sum of some
collection of the numbers 1, 2, 4, and 8. (To see which collection, just take the given number and
successively subtract the largest number of 1, 2, 4, and 8 that is less than the given number. That
number is part of your collection. The subtraction yields a new number; now repeat the process
with this number, over and over, until you get 0.) The collection of numbers you obtain reveals
the binary decomposition of the given number into sums of powers of two (in contrast to the
usual representation of a number into sums of powers of ten).
Now before the trick starts, pick an Ace, 2, 4, and 8 and put them on top of the deck, and then put
the deck in your pocket.
Then when a number between 1 and 15 is called out, take the binary decomposition of the
number, and use that to determine which of the first four cards you will pull out. No one needs to
know that you never need to use the other cards!

Mind-Reading Number Trick

Think of a number, any positive integer (but keep it small so you can do computations in your
head).
1. Square it.
2. Add the result to your original number.
3. Divide by your original number.
4. Add, oh, how about 17.
5. Subtract your original number.
6. Divide by 6.
The number you are thinking of now is 3!

How did I do this?


Presentation Suggestions:
Ham it up with magician's patter. Step 4 could be anything you want---someone's age, or their
favorite number--- just ask the crowd for suggestions. (This will change the final outcome of
Step 6, but see below for how.)
The Math Behind the Fact:
Clearly no matter what you start with, the answer should come out the same (zero wasn't allowed
because of Step 3). We can see why this trick works by using a little bit of high school algebra! If
you follow the instructions starting with the variable X instead of an actual number, you will see
that X is eliminated by Step 5.
Using this idea, you can make up your own mental math trick right on the spot! (Just don't do
anything too obvious, like tell people to add 5, subtract their original number, and say "the
number you are thinking of is 5".)

Perfect Shuffles

We know from the Fun Fact Seven Shuffles that 7 random riffle shuffles are enough to
make almost every configuration equally likely in a deck of 52 cards.
But what happens if you always use perfect shuffles, in which you cut the cards exactly
in half and perfectly interlace the cards? Of course, this kind of shuffle has no
randomness. What happens if you do perfect shuffles over and over again?

Figur
e1

There are 2 kinds of perfect shuffles: The out-shuffle is one in which the top card stays on top.
The in-shuffle is one in which the top card moves to the second position of the deck. Figure 1
shows an out-shuffle.
Surprise: 8 perfect out-shuffles will restore the deck to its original order!
And, in fact, there is a nice magic trick that uses out and in shuffles to move the top card to any
position you desire! Say you want the top card (position 0) to go to position N. Write N in base 2,
and read the 0's and 1's from left to right. Perform an out-shuffle for a 0 and and in-shuffle for a
1. Voila! You will now have the top card at position N. (See the reference.)
Example. Since 6 is 110 in binary notation, then the sequence IN-IN-OUT will move the top card
(position 0) to position 6 (the seventh card).

Presentation Suggestions:
Have students go home and determine how many in-shuffles it takes to restore the deck to its
original order. (Answer: 52.) You can also have students investigate decks of smaller sizes. As a
project, you might even tell them part of the binary card trick and see if they can figure out the
rest: whether 0 or 1 stands for an in/out shuffle, and whether to read the digits from left to right
or vice versa.
The Math Behind the Fact:
This fact may come as somewhat of a surprise, because there are 52! possible deck
configurations, and since there is no randomness, after 52! out-shuffles, we must hit some
configuration at least twice (and then cycle from there). But 8 is so much smaller than (52!).
See Making History By Card Shuffling.
Group theory concerns itself with understanding sets and properties preserved by operations on
those sets. For instance, the set of all configurations of a deck of 52 cards forms a group, and
a shuffle is an operation on that group.

Red-Black Pairs Card Trick

Here's a terrific mathematical card trick that will impress your friends. When you do
this trick, the effect of the card trick will look like this:

You have a deck of cards, and you ask for a volunteer who knows how to do a riffle
shuffle. You then cut the deck and then give the volunteer the halves of the deck
and ask him to do one riffle shuffle and return the deck to you. Now say "There's no
way I could know anything about the deck right now, right? Well, I was born with the
amazing ability to feel the redness and blackness of cards with my fingertips.
However, my talent is not that refined. I can only feel red and black cards in pairs."
As you say this, put the deck of cards behind your back (so that you cannot see
them) and then, at regular intervals, you fish around in the deck and pull out pairs
of cards and show them to the audience. These pairs will all have exactly one black
and one red card!

Presentation Suggestions:

Before performing the trick, order the deck alternating colors, all the way through,
red-black-red-black-... etc. (When you flash the deck before their eyes, they really
won't notice this pattern if you do it quickly.)

After this, there is really only one thing you need to remember to ensure that the
trick works: you must cut the deck (not the spectator), and you must do it in such a
way that the bottom of each half of the deck is a different color. Then, no matter
how the spectator riffle shuffles the deck, the cards will always drop in red-black or
black-red pairs. See below for explanation.

Then, all you have to do after the deck is returned and you put it behind your back
is to pull out the top 2 cards. It will be either red-black or black-red! Then pull out
the next 2 cards, which again will be red-black or black-red. You can continue in this
fashion to the end of the deck, if you like!

Of course, you should make it look as if you are trying really hard to find the cards
(even though what you are really doing is very easy). Spectators will wonder if you
are pulling one card off the top and one card off the bottom; but you can pull the
deck out and show them that this is not the case.

The Math Behind the Fact:


The reason the trick works at the point of the riffle shuffle is both simple and
stunning: if you cut the deck so that the cards at the bottom of each half are
different colors, then the first card that gets "dropped" in the shuffle will be a
different color then the second card that gets dropped, no matter which half of the
deck they come from. As an example, if the first card that gets dropped is black,
then after that both halves will have red cards at the bottom, so no matter which
card falls next it will be red! After this, both halves again have different colored
cards at bottom and we are back to the situation at start. So all the cards will fall off
in either red-black or black-red pairs. This amazing fact is a special case of
something known as the Gilbreath principle.

The message of this trick is that one shuffle is not enough to randomize a deck of
cards-- you really can know something about the deck after one shuffle... but only if
you stack the deck in a particular way first!

There's more mathematical magic in the Fun Fact files.

You might also like