6
Lecture 20 — Math Magic and The Mastery of Mystical Math Madness Shri Ganeshram/Yoni Miller April 30, 2011 1 Intro So, the title of this lecture is completely nonsensical. And generally titles of lectures reflect upon the lecture. Well, this is one of those times that the title is actually completely reflective of the lecture. Well, not really. You see, many people feel that mathematics is about rigor and long, tiring problems. I’m one of those people. Though, there is more to mathematics than just that. You aren’t going to woo your next girl(boy?)friend by solving a stack of Chinese TSTs in front of them. 1 You see, people are only impressed by things that they can relate to. Imagine if you did not know how the scoring worked on an AP test, and you heard someone talking to his friend. ”Yo, bro I got a 5 on seven AP tests.” ”Dude, nice, I wish I could be like you!” There would probably be a few things flowing through your mind. One might be that this AP thing must be challenging. 2 Another might be that this dude is an idiot. Or even better, you might think that this guy has a highly sarcastic friend. Well, since you do know that AP tests are challenging 3 , you recognize that this kid is pretty good. Similarly, in order to show off your beastliness, you should try to do things that people actually can relate to in some impressive way. Let me give you some examples. Note: The bulk of the content of this lecture relies on the problems, all of which can be solved with algebra or induction.* 0 1.1 problems 1. Do 20 pushups, with a table on your back. 4 2. Calculate 945 2 in your head, while doing 10 jumping jacks. (Hint: Do your jumping jacks slowly, very, very slowly.) 3. Name all 151 Pokemon. 5 1 If you manage to find a young lady impressed by such, please let me know (for research purposes of course). 2 false. 3 false. 0 Algebra basics and Induction basics 4 I couldn’t do them given that I didn’t have a table on my back. 5 The quality of the girl/boy you impress with this one was never guaranteed to be high.

Mental Math

Embed Size (px)

DESCRIPTION

mental math tricks

Citation preview

Page 1: Mental Math

Lecture 20 — Math Magic and The Mastery ofMystical Math Madness

Shri Ganeshram/Yoni Miller

April 30, 2011

1 Intro

So, the title of this lecture is completely nonsensical. And generally titles of lectures reflectupon the lecture. Well, this is one of those times that the title is actually completelyreflective of the lecture. Well, not really. You see, many people feel that mathematics isabout rigor and long, tiring problems. I’m one of those people. Though, there is moreto mathematics than just that. You aren’t going to woo your next girl(boy?)friend bysolving a stack of Chinese TSTs in front of them.1 You see, people are only impressed bythings that they can relate to. Imagine if you did not know how the scoring worked onan AP test, and you heard someone talking to his friend. ”Yo, bro I got a 5 on seven APtests.” ”Dude, nice, I wish I could be like you!” There would probably be a few thingsflowing through your mind. One might be that this AP thing must be challenging. 2

Another might be that this dude is an idiot. Or even better, you might think that thisguy has a highly sarcastic friend. Well, since you do know that AP tests are challenging 3,you recognize that this kid is pretty good. Similarly, in order to show off your beastliness,you should try to do things that people actually can relate to in some impressive way.Let me give you some examples.

Note: The bulk of the content of this lecture relies on the problems, all of which canbe solved with algebra or induction.*0

1.1 problems

1. Do 20 pushups, with a table on your back.4

2. Calculate 9452 in your head, while doing 10 jumping jacks. (Hint: Do your jumpingjacks slowly, very, very slowly.)

3. Name all 151 Pokemon. 5

1If you manage to find a young lady impressed by such, please let me know (for research purposes ofcourse).

2false.3false.0Algebra basics and Induction basics4I couldn’t do them given that I didn’t have a table on my back.5The quality of the girl/boy you impress with this one was never guaranteed to be high.

Page 2: Mental Math

OMC 2011 Math Magic and The Mastery of Mystical Math Madness Lecture 20

2 Multiplication

Mental Multiplication is definitely the best way to impress people. 6 Honestly, the wayI impress people most often is by multiplying fairly large numbers. (The more conde-scending the person, the larger the numbers have to be) Many of you may have heard ofF.O.I.L., a silly acronym that silly algebra teachers use to show silly kids how to multiplysilly linear expressions to obtain silly polynomials. Well, us mental mathematicians usea much sillier method, known as L.I.O.F.. 7.

L.I.O.F. is the way I generally break up my multiplication. (It stands for multiplythe last, multiply the inner and multiply the outer and add, and multiply the first.) Thisis of course nonsense without an example.

62 · 47 =First, we multiply the last (which is 2 for 62 and 7 for 47) and we get 2 · 7 = 14. We

write down the 4 and carry the 1.62 · 47 = 4Next, we multiply the inner (which is 2 for 62 and 4 for 47) and we get 2 ·4 = 8. Then,

we multiply the outer (which is 6 for 62 and 7 for 47) and we get 6 · 7 = 42. We then addthese two results, 42 + 8 = 50, and we must add our carry of 1 to obtain 50 + 1 = 51.We write down the 1 and carry the 5.

62 · 47 = 14Finally, we multiply the first (which is 6 for 62 and 4 for 47).6 · 4 = 24, and we add

our carry of 5 to get 24 + 5 = 29, and we write this down.62 · 47 = 2914.And we’re finished!

2.1 problems

1. 29 ∗ 35

2. Prove this trick.8

3. Does this work for 3 digit numbers? How about n-digit numbers?9

4. Multiply the numbers 107 and 108, now multiply the numbers 103 and 115. Doyou notice any patterns? What’s a quick and easy way of multiplying two numbersslightly over 100? What are the limitations of this trick? 10

5. Multiply the numbers 96 and 98, now multiply the numbers 91 and 94. Do younotice any patterns? What’s a quick and easy way of multiplying two numbersslightly under 100? What are the limitations of this trick? 11

6as proven in studies from the Mathematical Association of Pangea7If you’re verbal skills are not subpar, you noticed that L.I.O.F. is F.O.I.L. backwards8Consider the product of 10a + b and 10c + d.9For 3 digit numbers, I usually break the number in two pieces. For example, I would break 187 into

18 for the first and 7 for the last.10Consider the product of 7 and 8 and the sum of 7 and 8 and compare them to the answer. Do the

same with 3 and 15.11Consider the difference between each number and 100. Consider the products of the differences.

Subtract one of the differences from the number it was not generated from. Does that seem to show upin the problem?

2

Page 3: Mental Math

OMC 2011 Math Magic and The Mastery of Mystical Math Madness Lecture 20

challenge Multiply 103 and 98. Find a trick to multiplying one number slightly above 100and one slightly below.

6. Find a trick to obtaining the product of two two digit numbers whose units digitsadd to 10 and whose tens digits are the same. (e.g. 84 and 86)

7. Find a trick to obtaining the product of two two digit numbers whose tens digitsadd to 10 and whose units digits are the same. (e.g. 63 and 43)

3 Prime Headaches

Yoni is taking over for this section, let me hand the TeX file over to him. A commonerror many people make, particularly in free form contests such as ARML, they assumea certain number is prime and vice versa, costing points.

The first quick method to determine primes, incorporates heavily what Shri explainsin the previous section.

When factoring an integer into factor pairs, you’ll notice, that as you oscillate fromlarge factors to more central factors, it eventually gets closer and closer to the square rootof that number, for example, take the factors of 60, (60, 1), (2, 30), (3, 20), (4, 15), (5, 12), (6, 10)and the

√60 is 7. and so if we look at all numbers less than 7, we will know for sure

whether the number is prime or not. This is not a proof, but it’s fairly obvious, and Iassure you it’s true.

To be more precise, we only have to check all the primes between and 2.The 2nd thing you need to know is Euclid’s Algorithm, which is best explained by

an example. For example, suppose we want to test the “primality” of 611, so we firststart off by estimating its square root, and 252 = 625, so we’ll start off by the first primelower than 25 which is 23. Since adding or subtracting multiples of 23 would not changethe remainder of that sum/difference, we will subtract an enormous number from 611 tomake it sufficiently simple to figure out in your head. Usually multiplying your first primeby 10 does the trick, but here we can even double it after, to get 10× 2× 23 = 460, andsubtract that from 611 which yields 251. We will repeat the process again, subtracting230, leaving 21 which obviously doesn’t divide into 23, so let’s test for next prime, 19.

19 = (20 − 1) so 19 × 3 = 3(20 − 1) = 60 − 3 = 57 and multiplying that by ten,then subtracting from 611 (note we don’t care if the answer is negative, so just take theabsolute difference, whatever is more comfortable for you). This yields 31 which obviouslydoesn’t divide.

Moving onto Prime number 17, here we’ll choose a multiple larger than 611 namely,680, take absolute difference, which is 69, which obviously doesn’t divide 17

Prime Number 13, we’ll multiply by 50 to get 650 subtract from 611 which leaves 39,behold!13 divides into 39, and hence 611 is not a prime.

This method is the quickest, and gets easier the more experience you have with primes,and the better you are with addition, multiplication, subtraction and division. Supposeyou were dealing a large number, like 8827 we know 952 = 9025, so we’ll look for factorprimes less than 95, but what if I don’t know which numbers are prime, obviously 95 and93 are composite, but what about 91? Well, check using euclid’s algorithm on that!, andonce you figure it’s primality, you can continue with original problem.

There are some other rules, but remember, they can only cast or remove some doubtabout primality of a number.

3

Page 4: Mental Math

OMC 2011 Math Magic and The Mastery of Mystical Math Madness Lecture 20

Mersenne Primes: Mersenne Primes are of 2p − 1, for some prime integer p, so if theexponent is not prime, then the number is not prime, for example 291 − 1 is composite,since 91 is composite, but what about other numbers? such as 267 − 1? That was afamous problem actually, and [Professor] “Cole then moved to the other side of the boardand wrote 193,707,721 x 761,838,257,287, and worked through the tedious calculationsby hand. Upon completing the multiplication and demonstrating that the result equalledM67, Cole returned to his seat, not having uttered a word during the hour-long presenta-tion. His audience greeted the presentation with a standing ovation. Cole later admittedthat finding the factors had taken ”three years of Sundays” [source: Wikipedia]

4 Modular Arithmetic

Earlier we used modular arithmetic, to determine the primality of a number, that methodcan also be used to check the remainder of a number. Here we will use special tricks andtechniques for specific numbers, to minimize error making.

For sake of completion, I’ll go through the entire list of numbers.

For n (mod 2), it will have remainder 0 for all even integers, and 1 for odd integers.

For n (mod 3) it will have remainder 0, when the sum of the digits are a multiple of 3,so 375 divides 3, and hence so do all other combinations of those digits, 357, 537, 573, 735and 753 divide 3, because their sum adds to 15 and digits of 15 add up to 6. An easierway, and this applies to tremendously large numbers, is to ignore 3, 6, 9 and numbers thatadd up to multiples of 3, for example 382, 928, 409, 238, so ignore, the 3, 3, 9 add up the8 + 2 + 2 = 12 and now disregard everything there so far, since we don’t care anymoreabout those numbers, then again 8 + 4 so disregard, ignore 0, 9, 3 which leaves us with2, 8 which adds to 10,or 1 + 0 = 1, (mod 3)

If the number is even AND divisible by three, then we know it is divisible 6, since2 · 3 = 6

For mod 4, just check last two digits, e.g. (00)(04), (08), (12) . . . , (92), (96) and seehow far difference is.

For mod 5, number must end in 0 or 5, just can’t how many one’s unit away from 0or 5 a number is, so 61 ≡ (mod 1)

For mod 6 if the number is even, just use the rules for mod 3, if it’s zero mod 3, thenit’s 0 mod 6, otherwise, look at the remainder.

If it’s even, and 1 mod 3, then it’s 4 mod 6, and so on. I will let you figure out therest, since you only need to find a simple or obvious, e.g. figure out what 7, 8, 9, 10, 11are mod 6, and then mod 3 the rules you develop will be true for every single number.(I would never have been able to remember these myself)

For n (mod ()7, 11, 13)

For smaller numbers, it may be more practical to simply divide, however this methodhits three birds with one stone.

Suppose you wanted to know the modularity of 46, 786, 342 mod 7, then 11, and 13.

Add up all the even groups (2nd,4th, 6th) and add all the odd groups. Take theirAbsolute difference, and divide by 7, 11, 13, so we have (46 + 342 = 388) − 786 = −398−398, or 398, is 6 mod 7, because upon division we get 7 into 48, but 48 is one less thana multiple of 7, hence it’s 6, for (mod 11), we yield remainder 2, and for (mod 13) weyield remainder 8.

4

Page 5: Mental Math

OMC 2011 Math Magic and The Mastery of Mystical Math Madness Lecture 20

For mod 8, first check if it’s n≡ 0 (mod 4) if it is, and if all three last digits are even,then its 0 mod 8, if the 100’s place is odd, then the last two digits must be a multipleof 4 but not 8, to check to see how much a more number is then a perfect mod to yieldremainder, for example, 519, since the hundred’s place is odd, we look for multiple of 4which does not divide 8, with tens digit being one. that would be 12 and since 19 is sevenmore than twelve, seven is our remainder mod 8.

for For n (mod 9), it’s just like for mod 3, except you eliminate multiples of 9, andwhatever number adds up to, assuming it’s less than 9, that’s the remainder.

For n (mod 11) I showed a compound method earlier, for mod 7, 11, 13 but there’s asecond method. Just add all the even, and odd placed digits separately, and then subtractthe two sums. for example, 5678, (5 + 7)− (6 + 8) = 2 and we are done.

For n (mod 13) (See For n (mod 7)

5 Squaring Numbers

In the bar 12, one is often asked to square numbers. Often discussions go like this forme; ”Hey, I heard you’re good at math Shri.” ”Ehh, I’m aite shawty.” ”Prove it! Do852.” ”7225, am I hot or what?” ”Oh, you’re amazing!” Well, that may be just a slight13

stretch of the truth but being able to square numbers quickly is quite a party skill. Youcan probably make a living off of being awesome at squaring.14

So, these tricks are all about algebraic manipulation to make calculation easy. Keepthat in mind while you learn them; they’re not really tricks after all–they’re methods.

Let’s square something of the form ”a5”, where a is a series of numbers. For example,652 = 4225 or 2052 = 42025. So, basically, we have (10a + 5)2 = 25 + 100a + 100a2 =100a · (a + 1) + 25. So, in order to square something of the form ”a5”, we just write theproduct of a and a + 1 down followed by a 25. For example, 1252. a is 12 so we take12 · (12 + 1) = 156 and write it down followed by a 25 to get the correct answer, 15625.

Let’s try taking the difference of two squares next. We note that x2−y2 = (x+y)·(x−y) so we have a quick way of doing this. For example, 722− 272 = (72 + 27) · (72− 27) =(99) · (45) = (100− 1) · (45) = 4500− 45 = 4455. Notice how I rewrote 99 as 100− 1 inorder to ease the computational process up.

Now let’s consider adding two similar squares. Like x and ax. For example, x2 +(2x)2 = 5x2 or x2 + (3x)2 = 10x2 or even (2x)2 + (4x)2 = 20x2. Using these tricks makessquaring easier. Example: Find 262 + 522 in ten seconds. That’s quite absurd to do inyour head in less than ten seconds. Notice that this is (2 · 13)2 + (4 · 13)2 = 20 · 132 =20 · 169 = 3380. Bam, tell me that that isn’t impressive.15

5.1 Problems

Try deriving more interesting tricks!

1. Prove that a2 + (a + 1)2 = a · (a + 1) + 1.

2. Find and prove a formula for a2 + b2 − (a− b)2.

12Or during a sobriety test13huge14http://www.youtube.com/watch?v=M4vqr3_ROIk15If you weren’t impressed by that, good luck getting married.

5

Page 6: Mental Math

OMC 2011 Math Magic and The Mastery of Mystical Math Madness Lecture 20

3. Find a formula and prove it for the sum of two squares of the form xy and (y −1)(10− x), for example 64 and 34 or 85 and 42.16

4. Find a formula for the sum of 12 − 22 + 32 − ....(−1)n−1n2. Prove it. 17

6 Fraction Arithmetic

I’ve used a lot of techniques in this area to help me with olympiad problems. Particularlythe first example. Consider the sum a

b+ b

a. Let’s simplify. a

b+ b

a= a

b· a

a+ b

a· b

b

= a2+b2

ab= a2+b2

ab− 2 + 2 = a2+b2

ab− 2 · ab

ab+ 2 = a2−2ab+b2

ab+ 2 = 2 + (a−b)2

abThis substitution

works well a lot of the time in inequalities, but it also works well with arithmetic. For

example 57

+ 75

= (5−7)2

5·7 + 2 = 2 435

.Here is another one, courtesy of Aaron Goldsmith.18 S(m,n) = 1

m(m+1)+ 1

(m+1)(m+2)+

· · ·+ 1(n−1)n

Start with just a couple terms:

S(m,m + 1) = 1m(m+1)

S(m,m + 2) = 1m(m+1)

+ 1(m+1)(m+2)

= [/tex][tex] (m+2)+mm(m+1)(m+2)

= [/tex][tex] 2m(m+2)

S(m,m+3) = S(m,m+2)+ 1(m+2)(m+3)

= 2m(m+2)

+ 1(m+2)(m+3)

= 2(m+3)+mm(m+2)(m+3)

= 3m(m+3)

S(m,n) = n−mmn

For example 16

+ 112

+ 120

= 5−22·5 = 3

10.

6.1 Problems

1. Let Tn denote the nth triangular number. Find a formula for the sum, T (n,m),T (n,m) = 1

Tn+ 1

Tn+1+ · · ·+ 1

Tm−1+ 1

Tm.

2. Prove L.I.O.F.for fractions.

3. Find and prove (for fractions) 3 multiplication methods discussed in the multipli-cation section that can be applied to fractions.

16Use squares of digits in the trick17Triangular Numbers!18http://texasmath.org/forum/viewtopic.php?f=2&t=2838

6