Note: This post first appeared on Grey Matters in 2007. Since then, I've made it a sort of annual tradition to post it every December, with the occasional update. Enjoy!
Since the focus of this blog is largely math and memory feats, it probably won't be a surprise to learn that my favorite Christmas carol is The 12 Days of Christmas. After all, it's got a long list and it's full of numbers!
On the extremely unlikely chance you haven't heard this song too many times already this holiday season, here's John Denver and the Muppets singing The 12 Days of Christmas:
The memory part is usually what creates the most trouble. In the above video, Fozzie has trouble remembering what is given on the 7th day. Even a singing group as mathematically precise as the Klein Four Group has trouble remembering what goes where in their version of The 12 Days of Christmas (Their cover of the Straight No Chaser version):
Just to make sure that you've got them down, I'll give you 5 minutes to correctly name all of the 12 Days of Christmas gifts. Those of you who have been practicing this quiz since I first mentioned it back in 2007 will have an advantage.
Now that we've got the memory part down, I'll turn to the math. What is the total number of gifts are being given in the song? 1+2+3 and so on up to 12 doesn't seem easy to do mentally, but it is if you see the pattern. Note that 1+12=13. So what? So does 2+11, 3+10 and all the numbers up to 6+7. In other words, we have 6 pairs of 13, and 6 times 13 is easy. That gives us 78 gifts total.
As noted in Peter Chou's Twelve Days Christmas Tree page, the gifts can be arranged in a triangular fashion, since each day includes one more gift than the previous day. Besides being aesthetically pleasing, it turns out that a particular type of triangle, Pascal's Triangle, is a great way to study mathematical questions about the 12 days of Christmas.
First, let's get a Pascal's Triangle with 14 rows (opens in new window), so we can look at what it tells us. As we discuss these patterns, I'm going to refer to going down the right diagonal, but since the pattern is symmetrical, the left would work just as well.
Starting with the rightmost diagonal, we see it is all 1's. This represents each day's increase in the number of presents, since each day increases by 1. Moving to the second diagonal from the right, we see the simple sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12, which can naturally represent the number of gifts given on each day of Christmas.
The third diagonal from the right has the rather unusual sequence of 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91. This is a pattern of triangular numbers.
But what can triangular numbers tell us about the 12 days of Christmas? If you look at where the 3 in this diagonal, it's southwest (down and to the left) of the 2 in the second rightmost diagonal. If, on the 2nd day of Christmas, you gave 2 turtle doves and 1 partridge in a pear tree, you would indeed have given 3 gifts, but does the pattern hold? On the 3rd day, you would have given 3+2+1 (3 French hens, 2 turtle doves and a partridge in a pear tree) or 6 gifts total, and sure enough, 6 can be found southwest of the 3! For any of the 12 days, simply find that number, and look to the southwest of that number to see how many gifts you've given by that point! Remember when figured out that the numbers 1 through 12, when added, totaled 78? Look southwest of the 12, and you'll find that same 78!
Let's get really picky and technical about the 12 days of Christmas. It clearly states that on the first day, your true love gave you a partridge in a pear tree, and on the second day your true love gave you two turtle doves and a partridge in a pear tree. You would actually have 4 gifts (counting each partridge and its respective pear tree as one gift) by the second day, the first day's partridge, the second day's partridge and two turtle doves. By the third day, you would have 10 gifts, consisting of 3 partridges, 4 turtle doves and 3 French hens.
At this rate, how many gifts would you have at the end of the 12th day? Sure enough, the pattern of 1, 4, 10 and so on, known as tetrahedral numbers, can be found in our Pascal's Triangle as the 4th diagonal from the right.
If you look at the 2nd rightmost diagonal, you'll see the number 2, and you'll see the number 4 two steps southwest (two steps down and to the left) of it, which tells us you'll have 4 gifts on the second day. Using this same method, you can easily see that you'll have 10 gifts on the 3rd day, 20 gifts on the 4th day, and so on. If you really did get gifts from your true love in this picky and technical way, you would wind up with 364 gifts on the 12th day! In other words, you would get 1 gift for every day in the year, not including Christmas itself (also not including February 29th, if we're talking about leap years)! Below is the mathematical equivalent of this calculation:
If you're having any trouble visualizing any of this so far, Judy Brown's Twelve Days of Christmas and Pascal's Triangle page will be of great help.
One other interesting pattern I'd like to bring up is the one that happens if you darken only the odd-numbered cells in Pascal's Triangle. You get a fractal pattern known as the Sierpinski Sieve. No, this won't tell you too much about the 12 days of Christmas, except maybe the occurrences of the odd days, but it can make a beautiful and original Christmas ornament! If you have kids who ask about it, you can always give them the book The Number Devil, which describes both Pascal's Triangle and Sierpinski Sieve, among other mathematical concepts, in a very kid-friendly way.
There's another 12 Days of Christmas calculation that's far more traditional: How much would the 12 gifts actually cost if you bought them? PNC has been doing their famous Christmas Price Index since 1986, and has announced their results. Rather than repeat it here, check out their site and help them find all 12 gifts, so that you can some holiday fun and then find out the total!
Since my Christmas spending is winding up, I'm going to have to forgo the expensive version, in favor of Miss Cellania's internet-style version of The 12 Days of Christmas. Happy Holidays!
Note: This post first appeared on Grey Matters in 2007. Since then, I've made it a sort of annual tradition to post it every December, with the occasional update. Enjoy!
Imagine having someone think of a number from 1 to 100, having them cube the number using a calculator, telling you only the result, and you're able to calculate the cube root of their result (the original number they put in the calculator)!
Learning to work out cube roots of perfect cube is an impressive feat, but it's far less difficult than it appears.
We'll get right to the method, taught in the video below. You can read the MindYourDecisions.coom post New Video – Calculate Cube Roots In Your Head for further details.
Over in the Mental Gym, I have a more detailed tutorial on working out cube roots of perfect cubes, including a cube root quiz.
Back in March of 2013, Scam School also taught the cube root feat in their own unique way. If you like this feat and want to take it a step further, check out Numberphile's fifth root feat tutorial. Surprisingly, this is even easier than the cube root feat!
I apologize for not posting the past 2 Sundays, but my internet connection was down.
Grey Matters is back this week, however, with some Sunday afternoon football...postgame conference, anyway. How does this relate to math or memory? Read on!
In the November 30 Texans vs. Titans game, Texan player Ryan Fitzpatrick threw 358 yards for 6 touchdowns, setting a record for the franchise.
You'd think that would be the big talking point of the postgame press conference, but Fitzpatrick's son Brady winds up stealing the show with his mental math skills (starting about 1 minute into the video):
I'm not sure exactly how long Brady has been performing this feat, but I've found an excellent candidate. It seems that just 10 days before that conference, the Mind Your Decisions blog posted about how to perform this exact feat. You can learn it below, including how to handle numbers in the 80s:
With a little practice, you can multiply numbers like these as quickly as Brady Fitzpatrick. The next step, performing this on TV, is a little trickier, however. However, you can still perform this for your friends and family!
Sorry about missing a post last week. It turned out to be a busier weekend for me than I originally planned.
I'm back this week, and I've brought plenty of snippets with me to make up for the missing post!
• Back in September, in DataGenetics' Grid Puzzle post, an intriguing puzzle was posed: Imagine there is a grid of squares. You draw a line connecting one intersection to another intersection on the grid. The question is: How many squares does this line cross through?
The link works through the answer, including an interactive widget which may help you work it out. It turns out that the answer involves only simple arithmetic and being able to work out the greatest common divisor (GCD) of 2 numbers.
If you can work out the GCD of 2 numbers in your head, you can turn this into a mental math presentation. How do you go about that? Math-magic.com has the answer, in both webpage form and PDF form! Page 94 of Bryant Heath's Number Sense Tricks also has some great tips on finding the GCD of 2 numbers in your head.
• Also back in September, I wrote about Knight's Tours on a calendar, and included sample calendars for both September and October 2014. I figured it's time for the November 2014 version, included below. This month, 6 is most date-to-move matches I could find:
• OfPad.com seems to have a similar goal to Grey Matters, which is to improve your genius. There's plenty to explore as a result, but I'd like to draw your attention to their Mental Math Tricks posts in particular. There's lots of great tricks, some of which you may not have seen before.
• To wrap up this month's mental math snippets, I'd like to focus on one particular technique for multiplying any two 2-digit numbers together. I've seen this technique before, but the way dominatemath teaches this multiplication technique, it just made so much more sense than the other instructions I've seen for this approach.
That's all for this month's snippets. Have fun exploring them!
I've wanted to write about factoring numbers in your head for a while, but never really had a good approach to analyze and discuss.
Recently, I've come across some strategies that mesh well with what I've discussed before on this site. Learning to factor a number in your head can be tricky, but it can be done.
BASICS: Starting from a given number between 1 and 10,000, you're only going to test for divisibility from the number 2, up to the square root of the given number. If you're familiar with estimating square roots, you only need the whole number part.
For example, if you're given the number 447, you only need to estimate the square root as 21, to realize you only need to be concerned with numbers from 2 to 21.
To narrow things down even further, you're only going to test for divisibility by prime numbers from 2 up to the limit you determine (21 in the above example). Between 2 and 100, there are only 25 prime numbers (2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, and 97), so testing only for these minimizes the time it will take.
Certainly, divisibility tests for 2 (is the rightmost digit even?), 3 (do the digits add up to a multiple of 3?), and 5 (is the rightmost digit a 5 or a 0?) are well known, but how do you go about testing, and remembering the tests, for the higher primes?
TECHNIQUES: NUMBERS ENDING IN 9 - Back in April, I discussed how to work out divisibility tests for numbers ending in 9. For divisibility by 19, you would divide by 20, add up the quotient and remainder from that divisibility problem, and see if they added up to a multiple of 19. For 29, you'd run through the same process, but divide by 30, instead. For 59, you'd divide by 60, and so on.
When testing for various primes, however, working out all these quotients and remainders can quickly get confusing. Thankfully, it turns out that there's an alternative method, and it's even a little quicker!
Let's start with the test for 19. Instead of dividing by 20 and running through the process described above, split the number into the rightmost number and the rest of it, multiply that rightmost digit by 2, and add that total to the rest of the number. As an example, let's test 285 for divisibility by 19. You'd split 285 up into 28 and 5. Doubling the rightmost number, 5 × 2 = 10, so we'd add that 10 to the rest of the number, 28, to get 38. 38 is a multiple of 19, so 285 must be a multiple of 19! Wolfram|Alpha confirms that 285 is evenly divisible by 19.
For bigger numbers, you may not be sure about the result you got, so you simply run the test on your new total. For example, when testing 2,527 for divisibility by 19, you'd split it up into 252 and 7. Doubling the 7 makes 14, so you'd add 252 + 14 to get 266. Not sure whether 266 is evenly divisible by 19? We run the same test on 266, by splitting it up into 26 and 6. 6 doubled is 12, and 26 + 12 = 38, which we know is a multiple of 19! Therefore, 2,527 is a multiple of 19!
For 29 instead, you would divide up the number in the same way, but multiply the last digit by 3 instead, and then add . Why? Because 29 is right next to 30, and 30 divided by 10 equals 3 (similar to the way we used 2 as a test for 19, because 19 is next to 20). This same pattern holds for the other prime numbers ending in 9. For 59, you'd multiply the rightmost digit by 6 (59 + 1 = 60, 60 ÷ 10 = 6) and add it to the rest of the number. When testing divisibility by 79, you'd multiply the last digit by 8 before adding, and when testing divisibility by 89, you'd multiply the last digit by 9 before adding. Get the idea?
That's great for those numbers, but what about primes which don't end in 9?
SCALING NUMBERS TO END IN 9 - As also discussed in The Great Divide, you can also use this test on numbers which can be scaled up to end in 9.
This approach is particularly hand for primes ending in 3. For example, 13 × 3 = 39. Since 39 is right next to 40, you should quickly realize that you can test for divisibility by 13 by splitting the number as before, multiplying the rightmost number by 4 (40 ÷ 10 = 4), and adding that total to the rest of the number.
Is 507 evenly divisible by 13? 507 split becomes 50 and 7, multiplying 7 by 4 gives us 28, and 50 + 28 = 78. 78 is a multiple of 13, so 507 is evenly divisible by 13!
In the same way, 23 can be tested by multiplying the last digit by 7 and adding it to the rest of the number, because 23 can be scaled up to 69, and 69 is next to 70. Need to test for divisibly by 43, you split the number, multiply by 13 (do you see why?), and add as before.
Just using this approach covers 10 of the 25 prime numbers from 2 to 97. The well-known tests for 2, 3, and 5 add another 3, so you should comfortably be able to test for divisibility by more than half the prime numbers below 100!
Naturally, that brings up the question of how to handle the other half.
NUMBERS ENDING IN 1 - In my follow-up to The Great Divide, I cover a similar technique for numbers ending in 1. The big difference between the ending-in-9 technique and the ending-in-1 technique is that adding is replaced by subtracting.
Let's start by testing for divisibility by 11. The test will begin with the same splitting as before, and since 11 is next to 10, we'll multiply the last digit by 1. However, this time we'll subtract that number from the other numbers.
Is 341 evenly divisible by 11? We split 341 into 34 and 1, multiply 1 by 1, giving us 1, and subtract that from the rest of the number, 34 - 1 = 33, and since we know that 33 is evenly divisible by 11, then so is 341!
I'm sure you have the idea by now. For 31's divisibility test, you'd multiply the rightmost digit by 3 and subtract, for 41's test, you'd multiply by 4 and subtract, and so on.
SCALING NUMBERS TO END IN 1 - Just as before, this technique also applies to scaling numbers up to end in 1. For testing prime numbers ending in 7, including 7 itself, this is a big help.
The test for 7 begins by realizing that 7 can be scaled up to 21. This tells us that the rightmost number must be multiplied by 2 (remember why?) before subtracting from the rest from the rest of the number.
Is 665 evenly divisibly by 7? Let's use our knowledge of the 21 test to find out. The number is split into 66 and 5, and we double the 5 to get 10. 66 - 10 = 56, and we know 56 is a multiple of 7, so therefore 665 is evenly divisble by 7!
WIND-UP: At this point, we've covered the classic divisibility tests for 2, 3, and 5, as well as how to recall and perform easy divisibility tests for every prime number below 100 which ends in 1, 3, 7, and 9 - in other words, every test you need!
You'll need to recall that 9s and 3s require multiplying then adding, and 1s and 7s require multiplying followed by subtracting. When subtracting, note that you can always subtract the larger number from the smaller, which can prevent having to deal with negative numbers.
Since you're performing multiple tests, this won't be the quickest of mental math feats. However, being able to recall and perform tests for such a wide variety of prime numbers is still an impressive, and even useful, feat!
Earlier this year, I posted about calculating powers of e in your head, as well as powers of Pi.
This time around, I thought I'd pass on a method for calculating powers of a much more humble number: 2. It sounds difficult, but it's much easier than you may think!
BASICS: For 20 up to 210, you'll memorize precise answers. For answers to 211 and higher integer powers, you'll be estimating the numbers in a simple way that comes very close.
First, you must memorize the powers of 2 from 0 to 10 by heart. Here they are, along with some simply ways to memorize each of them:
Problem Answer Notes 20 = 1 Anything to the 0th power is 1 21 = 2 Anything to the 1st power is itself 22 = 4 22 = 2 × 2 = 2 + 2 23 = 8 3 looks like the right half of an 8 24 = 16 24 = 42 25 = 32 5 = 3 + 2 26 = 64 26 begins with a 6 27 = 128 26 × 21 28 = 256 Important in computers 29 = 512 28 × 21 210 = 1024 210 begins with a 10Take a close look at 210, which is 1024. It's very close to 1,000, so we're going to take advantage of the fact that 210 ≈ 103!
When multiplying 2x × 2y, remember that you simply add the exponents together. For example, 23 (8) × 27 (128) = 27 + 3 = 210 (1024). Similarly, you can break up a single power of 2 into two powers which add up to the original power, such as 29 (512) = 26 + 3 = 26 (64) × 23 (8).
TECHNIQUE: We'll start with 215 as an example.
Start by breaking up the given power of 2 into the largest multiple of 10 which is equal to or less than the given power, and multiply it by whatever amount is leftover, which will be a number from 0 to 9.
Using this step, 215 becomes 25 + 10, which becomes the problem 25 × 210.
For an powers from 0 to 9, you should know by heart, so you can convert these almost instantly. In the example problem we've been doing, we know that 25 is 32, so the problem is now 32 × 210.
Now we deal with the multiple of 10. For every multiple of 10 involved, you can replace 210 with 103. With our problem which is now 32 × 210, there's only a single multiple of 10 in the power, so we can replace that with 103. This turns our current problem into 32 × 103.
At this point, it's best to represent the number in scientific notation. In this feat, that simply refers to moving the decimal point to the left, so that the left number is between 0 and 10, and then adding 1 to the power of 10 for each space you moved the decimal. Converting to scientific notation, 32 × 103 becomes 3.2 × 104.
That's all there is to getting our approximation!
How close did we come? 215 = 32,768, while 3.2 × 104 = 32,000. I'd say that's pretty good for a mental estimate!
EXAMPLES: Over 6 years ago, I related the story of Dr. Solomon Golomb. While in college, he took a freshman biology class. The teacher was explaining that human DNA has 24 chromosomes (as was believed at the time), so the number of possible cells was 224. The instructor jokingly added that everyone in the class knew what number that was. Dr. Golomb immediate gave the exact right answer.
Can you estimate Dr. Golomb's answer? Let's work through the above process with 224.
First, we break the problem up, so 224 = 24 + 20 = 24 × 220.
Next, replace the smaller side with an exact amount. In this step, 24 × 220 becomes 16 × 220.
Replace 210x with 103x, which turns 16 × 220 into 16 × 106.
Finally, adjust into scientific notation, so 16 × 106 becomes 1.6 × 107.
If you know your scientific notation, that means your estimated answer is 16 million. Dr. Golomb, as it happened, had memorized the 1st through 10th powers of all the integers from 1 to 10, and new that 224 was the same as 88, so he was able to give the exact answer off the top of his head: 16,777,216. 16 million is a pretty good estimate, isn't it?
Below is the classic Legend of the Chessboard, which emphasizes the powers of 2. In the video, the first square has one (20) grain of wheat placed on it, the second square has 2 (21) grains of wheat on it, with each square doubling the previous number of grains.
The 64th square, then, would have 263 grains of wheat on it. About how many is that? I'm going to run through the process a little quicker this time.
Step 1: 263 = 23 + 60 = 23 × 260
Step 2: 23 × 260 = 8 × 260
Step 3: 8 × 260 ≈ 8 × 1018
While 263 is 9,223,372,036,854,775,808, our estimate of 8,000,000,000,000,000,000 works.
TIPS: If you're really worried about the error, there is a way to improve your estimate. Percentage-wise, the difference between 1,000 (103) and 1,024 (210) is only 2.4%. So, for every multiple of 10 to which you take the power of 2 (or every power of 3 to which you take 10), you can multiply that by 2.4% to get a percentage difference. You can then multiply that percentage difference by your estimate to improve it.
Just above, we converted 263 into 8 × 1018. Since we started with six 10s, our percentage difference would be 6 × 2.4%, or 14.4%. In other words, our estimate of 8 × 1018 could be made closer by adding 14.4% to 8.
Assuming your comfortable with doing percentages like this in your head, 8 increased by 14.4% is 8 + 1.152 = 9.152, so our improved estimate would be 9.152 × 1018. Considering the actual answer is roughly 9.223 × 1018, that's quite close!
Practice this, and you'll have an impressive skill with which to impress family, friends, and computer geeks!
Martin has turned thousands of children into mathematicians, and thousands of mathematicians into children. - Ron Graham
100 years ago today, Martin Gardner was born. After that, the world would never again be the same.
His life and his legacy are both well represented in David Suzuki's documentary about Martin Gardner, which seems like a good place to start:
As mentioned in the snippets last week, celebrationofmind.org is offering 31 Tricks and Treats in honor of the Martin Gardner centennial! Today's entry features a number of remembrances of his work in the media:
Scientific American — A Centennial Celebration of Martin GardnerThere are quite a few other ways to enjoy and remember the work of Martin Gardner, as well. The January 2012 issue of the College Mathematics Journal, dedicated entirely to Martin Gardner, is available for free online! The Gathering 4 Gardner YouTube channel, not to mention just searching for Martin Gardner on YouTube, are both filled with enjoyable treasures to be uncovered.
Included in the above article is this quiz: How Well Do You Know Martin Gardner?
NYT — Remembering Martin Gardner
Plus — Five Martin Gardner eye-openers involving squares and cubes
BBC — Martin Gardner, Puzzle Master Extraordinaire
Guardian — Can you solve Martin Gardner's best mathematical puzzles?, Alex Bellos, 21 Oct 2014
Center for Inquiry — Martin Gardner's 100th Birthday, Tim Binga
Here at Grey Matters, I've written about Martin Gardner quite a few times myself, as I have great respect for him. Enjoy exploring the resources, and take some time to remember a man who has brought joy, wonder, and mystery to the world over the past 100 years.
It's time for October's snippets, and all our favorite mathematical masters are here to challenge your brains!
• I'm always looking for a good mathematical shortcut, in order to make math easier to learn. More generally, I'm always looking for better ways to improve my ability to learn. I was thrilled with BetterExplained.com's newest post, Learn Difficult Concepts with the ADEPT Method.
ADEPT stands for Analogy (Tell me what it's like), Diagram (Help me visualize it), Example (Allow me to experience it), Plain English (Let me describe it in my own words), and Technical Definition (Discuss the formal details). This is a great model for anyone struggling to understand anything challenging. This is one of those posts I really enjoy, and want to share with as many of you as I can.
• If you enjoyed Math Awareness Month: Mathematics, Magic & Mystery back in April, you'll love the 31 Tricks and Treats for October 2014 in honor of the 100th anniversary of Martin Gardner's birth! Similar to Math Awareness Month, there's a new mathematical surprise revealed each day. It's fun to explore the new mathematical goodies, and get your brain juices flowing in a fun way!
• Over at MindYourDecisions.com, they have a little-seen yet fun mental math shortcut in their post YouTube Video – Quickly Multiply Numbers like 83×87, 32×38, and 124×126. As seen below, it's impressive, yet far easier than you might otherwise think:
They've also recently posted three challenging puzzles about sequence equations that you might want to try.
• If that's not enough, Scam School's latest episode (YouTube link) at this writing also involves three equations. If you have a good eye for detail, you may be able to spot the catch in each one before they're revealed:
That's all for this October's snippets, but it's more than enough to keep your brain puzzled through the rest of the month!