My Mathematical Magic Show: Part 5b

Last March, on Pi Day (March 14, 2015), I put together a mathematical magic show for the Pi Day festivities at our local library, compiling various tricks that I teach to our future secondary teachers. I was expecting an audience of junior-high and high school students but ended up with an audience of elementary school students (and their parents). Still, I thought that this might be of general interest, and so I’ll present these tricks as well as the explanations for these tricks in this series. From start to finish, this mathematical magic show took me about 50-55 minutes to complete. None of the tricks in this routine are original to me; I learned each of these tricks from somebody else.

green line

Here’s the patter for my fourth and most impressive trick. As before, my audience has a sheet of paper and a pen or pencil; quite a few of them have calculators.

Write down any five-digit number you want. Just make sure that the same digit repeated (not something like 88,888).

(pause)

Now scramble the digits of your number, and write down the new number. Just be sure that any repeated digits appear the same number of times. (For example, if your first number was 14,232, your second number could be 24,231 or 13,422.)

(pause)

Is everyone done? Now subtract the smaller of the two numbers from the bigger, and write down the difference. Use a calculator if you wish.

(pause)

Has everyone written down the difference. Good. Now, pick any nonzero digit in the difference, and scratch it out.

(pause)

(I point to someone.) Which numbers did you not scratch out?

The audience member will say something like, “8, 2, 9, and 6.” To which I’ll reply in three seconds or less, “The number you scratched out was a 2.”

Then I’ll turn to someone else and ask which numbers were not scratched out. She’ll say something like, “3, 2, 0, and 7.” I’ll answer, “You scratched out a 6.”

green lineAfter performing this trick, I’ll explain how it works. I gave a very mathematical explanation in a previous post for why this trick works, but the following explanation seems to go over well with even elementary-school students. I’ll ask an audience member for the two five-digit numbers that they subtracted. Suppose that she tells me that hers were

43,125-24,513

I’ll now tell the audience that, ordinarily, we would plug this into a calculator or else start by subtracting the ones digits. However, I tell the audience, I’m now going to write this in a very unusual way:

(40,000 + 3,000 + 100 + 20 + 5) - (20,000 + 4,000 + 500 + 10 + 3)

I tell the audience, “For now, I’m not saying why I did this. But does everyone agree that I can do this?” Once I get agreement, then I proceed to the next step by grouping like digits together:

(40,000 - 4,000) + (3,000 - 3) + (100 - 10) + (20 - 20,000) + (5 - 500)

Again, I tell the audience, “For now, I’m not saying why I did this. But does everyone agree that I can do this?” Once I get agreement, then I proceed to the next step by reversing the signs of any negative differences:

(40,000 - 4,000) + (3,000 - 3) + (100 - 10) - (20,000 - 20) - (500 - 5)

Next, I factor each common difference. Notice that in each parenthesis, the second number is a factor of the first number:

4,000(10-1) + 3(1,000 - 1) + 10(10 - 1) - 20(1,000 - 1) - 5(100 - 1),

or

4,000(9) + 3(999) + 10(9) - 20(999) - 5(99).

Notice that the number in each pair of parentheses is a multiple of 9. Therefore, no matter what, the difference must be a multiple of 9.

This is the key observation that makes the trick work. Now, I go back to my audience member and ask what the difference actually was:

43,125-24,513 = 18,612

This difference must be a multiple of 9. Therefore, by one of the standard divisibility tricks, the digits of this number must add to a multiple of 9:

1 + 8 + 6 + 1 + 2 = 18.

Then I’ll ask the audience member, “Which number did you scratch out?” Suppose she answers 6. Then I’ll add up the remaining numbers:

1 + 8 + 1 + 2 = 12.

So I ask the audience, “So these four numbers add up to 12, but I know that all five numbers have to add up to a multiple of 9. What’s the next multiple of 9 after 12?” They’ll answer, “18”. I ask, “So what does the missing number have to be?” They’ll answer “18-12, or 6.”

Then I’ll repeat with someone else. If an audience member answers “8, 2, 9, and 6,” I’ll ask the audience for the sum of these four numbers. (It’s 25.) So they can figure out that the scratched-out number was 2, since 25+2 = 27 is the next multiple of 9 after 25.

green lineI’m often asked why I made people choose a five-digit number at the start of the routine. The answer is, I could have chosen any size number I wanted as long as I’m comfortable with quickly adding the digits at the end of the magic trick. In other words, if I had permitted nine-digit numbers, I might need to add 8 numbers at the end of the routine to get the missing number. I could do it, but I wouldn’t get the answer as quickly as the five-digit numbers.

Also, I’m often asked why it was important that I told the audience to scratch out a nonzero number. Well, suppose that I came to end of the routine and the audience member told me her remaining digits were 4, 3, and 2. These numbers have a sum of 9, and so the missing number hypothetically could be 0 or 9. So by instructing the audience to not scratch out a 0, that eliminates the ambiguity from this special case.

After showing the audience how the trick works, I’ll then ask an audience member to come forward and repeat the trick that I just performed. Then I’ll move on to the final act of my routine, which I’ll present in tomorrow’s post.

Collaborative Mathematics: Challenge 16

My colleague Jason Ermer at Collaborative Mathematics is back from summer hiatus and has published Challenge 16 on his website: http://www.collaborativemathematics.org/challenge16.html

 

Proving theorems and special cases (Part 5): Mathematical induction

Today’s post is a little bit off the main topic of this series of posts… but I wanted to give some pedagogical thoughts on yesterday’s post concerning the following proof by induction.

Theorem: If n \ge 1 is a positive integer, then 5^n - 1 is a multiple of 4.

Proof. By induction on n.

n = 1: 5^1 - 1 = 4, which is clearly a multiple of 4.

n: Assume that 5^n - 1 is a multiple of 4, so that 5^n - 1 = 4q, where q is an integer. We can also write this as 5^n = 4q + 1.

n+1. We wish to show that 5^{n+1} - 1 is equal to 4Q for some (different) integer Q. To do this, notice that

5^{n+1} - 1 = 5^1 5^n - 1

= 5 \times 5^n - 1

= 5 \times (4q + 1) - 1 by the induction hypothesis

= 20q + 5 - 1

= 20q + 4

= 4(5q + 1).

So if we let Q = 5q +1, then 5^{n+1} - 1 = 4Q, where Q is an integer because q is also an integer.

green lineMy primary observation is that even very strong math students tend to have a weak spot when it comes to simplifying exponential expressions (as opposed to polynomial expressions). For example, I find that even very good math students can struggle through the logic of this sequence of equalities:

2^n + 2^n = 2 \times 2^n = 2^1 \times 2^n = 2^{n+1}.

The first step is using the main stumbling block. Students who are completely comfortable with simplifying x + x as 2x can be perplexed by simplifying 2^n + 2^n as 2 \times 2^n. I attribute this to lack of practice with this kind of simplification in lower grade levels.

Here’s another algoebraic stumbling block that I’ve often seen: at the beginning of the n+1 case, some students will make the following mistake:

5^{n+1} - 1 = 5^1 5^n - 1 = 5 (4q) = 4 (5q) = 4Q.

Because these students end with a multiple of 4, they fail to notice that the second equality is incorrect since

5^1 5^n - 1 \ne 5^1 (5^n - 1).

Again, I attribute this to lack of practice with simplifying exponential expressions in lower grade levels… as well as being a little bit over-excited upon seeing 5^n - 1 and wishing to use the induction hypothesis as soon as possible.

Collaborative Mathematics: Challenge 10, Part 3

Another healthy challenge using all 10 digits:

Checking if a number is a multiple of 7

I just read a couple of nice tricks for checking if a number is divisible by 7. There are standard divisibility tests for 2, 3, 4, 5, 6, 8, 9, 10, 11, and 12, but checking a number is divisible by 7 is somewhat more difficult. But these two tricks make the task more manageable. The proofs for these tricks can be found in the given links.

Method #1, from http://www.arscalcula.com/mental_math_divisibility_tests.shtml: Add multiples of 7 to get a multiple of 10, and then lop off the 0.

Here’s how it goes: You want to see whether, say, 11352 is divisible by 7 . To do this, first you either add or subtract a mutiple of 7 until you get a number ending in 0 . So in the case of 11352 , I would add 28 to get 11380 .

Now whack off the last zero, and repeat! So 11380 goes to 1138 . From that I subtract 28 to get 1110 , which goes to 111 . To that I add 49 to get 160 , which goes to 16 .Finally: 16 is not divisible by 7 and thus (this is the statement of the test), neither is 11352.

Method #2, from http://www.arscalcula.com/mental_math_divisibility.shtml: Separate the number into two parts: the ones digit, and everything else but the ones digit. Multiply the ones digit by 5, and add to the the second number.

It’s hard to understand what this means without seeing an example. Let n=434. Then 5 \cdot 4+43=63 . Since 63 is divisible by 7 , so is 434.

Divisibility tricks

Based on personal experience, about half of our senior math majors never saw the basic divisibility rules (like adding the digits to check if a number is a multiple of 3 or 9) when they were children. I guess it’s also possible that some of them just forgot the rules, but I find that hard to believe since they’re so simple and math majors are likely to remember these kinds of tricks from grade school. Some of my math majors actually got visibly upset when I taught these rules in my Math 4050 class; they had been part of gifted and talented programs as children and would have really enjoyed learning these tricks when they were younger.

Of course, it’s not my students’ fault that they weren’t taught these tricks, and a major purpose of Math 4050 is addressing deficiencies in my students’ backgrounds so that they will be better prepared to become secondary math teachers in the future.

My guess that the divisibility rules aren’t widely taught any more because of the rise of calculators. When pre-algebra students are taught to factor large integers, it’s no longer necessary for them to pre-check if 3 is a factor to avoid unnecessary long division since the calculator makes it easy to do the division directly. Still, I think that grade-school students are missing out if they never learn these simple mathematical tricks… if for no other reason than to use these tricks to make factoring less dull and more engaging.

A mathematical magic trick

In case anyone’s wondering, here’s a magic trick that I did my class for future secondary math teachers while dressed as Carnac the Magnificent. I asked my students to pull out a piece of paper, a pen or pencil, and (if they wished) a calculator. Here were the instructions I gave them:

  1. Write down just about any number you want. Just make sure that the same digit repeated (not something like 88,888). You may want to choose something that can be typed into a calculator.
  2. Scramble the digits of your number, and write down the new number. Just be sure that any repeated digits appear the same number of times. (For example, if your first number was 1,232, your second number could be 2,231 or 1,322.)
  3. Subtract the smaller of the two numbers from the bigger, and write down the difference. Use a calculator if you wish.
  4. Pick any nonzero digit in the difference, and scratch it out.
  5. Add up the remaining digits (that weren’t scratched out).

I asked my students one at a time what they got after Step 5, and I responded, as the magician, with the number that they had scratched out. One student said 34, and I answered 2. Another said 24, and I answered 3. After doing this a couple more times, one student simply stated, “My mind is blown.”

This is actually a simple trick to perform, and the mathematics behind the trick is fairly straightforward to understand. Based on personal experience, this is a great trick to show children as young as 2nd or 3rd grade who have figured out multiple-digit subtraction and single-digit multiplication.

I offer the following thought bubble if you’d like to think about it before looking ahead to find the secret to this magic trick.

green_speech_bubbleWhat the magician does: the magician finds the next multiple of 9 greater than the volunteer’s number, and answers with the difference. For example, if the volunteer answers 25, the magician figures out that the next multiple of 9 after 25 is 27. So 27-25 = 2 was the digit that was scratched out.

This trick works because of two important mathematical facts.

(1) The difference D between the original number and the scrambled number is always a multiple of 9. For example, suppose the volunteer chooses 3417, and suppose the scrambled number is 7431. Then the difference is

7431 - 3417 = (7000 + 400 + 30 + 1) - (3000 + 400 + 10 + 7)

= (7000 - 7) + (400 - 400) + (30 - 3000) + (1 - 10)

= 7 \times (1000-1) + 4 \times (100-100) + 3 \times (10-1000) + 1 \times (1-10)

= 7 \times (999) + 1 \times (0) + 4 \times (-990) + 3 \times (-9)

Each of the numbers in parentheses is a multiple of 9, and so the difference D must also be a multiple of 9.

A more algebraic proof of (1) is set apart in the block quote below; feel free to skip it if the above numerical example is convincing enough.

More formally, suppose that the original number is a_n a_{n-1} \dots a_1a_0 in base-10 notation, and suppose the scrambled number is a_{\sigma(n)} a_{\sigma(n-1)} \dots a_{\sigma(1)} a_{\sigma(0)}, where \sigma is a permutation of the numbers \{0, 1, \dots, n\}. Without loss of generality, suppose that the original number is larger. Then the difference D is equal to

D = a_n a_{n-1} \dots a_1a_0 - a_{\sigma(n)} a_{\sigma(n-1)} \dots a_{\sigma(1)} a_{\sigma(0)}

D = \displaystyle \sum_{i=0}^n a_i 10^i - \sum_{i=0}^n a_{\sigma(i)} 10^i

D = \displaystyle \sum_{i=0}^n a_{\sigma(i)} 10^{\sigma(i)} - \sum_{i=0}^n a_{\sigma(i)} 10^i

D = \displaystyle \sum_{i=0}^n a_{\sigma(i)} \left(10^{\sigma(i)} - 10^i \right)

The transition from the second to the third line work because the terms of the first sum are merely rearranged by the permutation \sigma.

To show that D is a multiple of 9, it suffices to show that each term 10^{\sigma(i)} - 10^i is a multiple of 9.

  • If \sigma(i) > i, then 10^{\sigma(i)} - 10^i = 10^i \left( 10^{\sigma(i) - i} - 1 \right), and the term in parentheses is guaranteed to be a multiple of 9.
  • If \sigma(i) < i, then 10^{\sigma(i)} - 10^i = 10^{\sigma(i)} \left( 1-10^{i-\sigma(i)} \right) = -10^{\sigma(i)} \left( 10^{i-\sigma(i)} - 1 \right), and the term in parentheses is guaranteed to be a (negative) multiple of 9.
  • If \sigma(i) = i, then 10^{\sigma(i)} - 10^i = 0, a multiple of 9.

\hbox{QED}

Because the difference D is a multiple of 9, we use the important fact (2) that a number is a multiple of 9 exactly when the sum of its digits is a multiple of 9. Therefore, when the volunteer offers the sum of all but one of the digits of D, the missing digit is found by determining the nonzero number that has to be added to get the next multiple of 9. (Notice that the trick specifies that the volunteer scratch out a nonzero digit. Otherwise, there would be an ambiguity if the volunteer answered with a multiple of 9; the missing digit could be either 0 or 9.)

As I mentioned earlier, I showed this trick (and the proof of why it works) to a class of senior math majors who are about to become secondary math teachers. I think it’s a terrific and engaging way of deepening their content knowledge (in this case, base-10 arithmetic and the rule of checking that a number is a multiple of 9.)

As thanks for reading this far, here’s a photo of me dressed as Carnac as I performed the magic trick. Sadly, most of the senior math majors of 2013 were in diapers when Johnny Carson signed off the Tonight Show in 1992, so they didn’t immediately get the cultural reference.

542597_10200255338162345_209138628_n