12 ms·
The Dying Art of Mental Math Tricks
- tzs 11y ago> John H. Conway is a master of mental calculations. He even invented an algorithm to calculate the day of the week for any day. He taught it to me, and I too can easily calculate that July 29 of 1926 was Thursday. This is not useful any more. If I google “what day of the week is July 29, 1926,” the first line in big letters says Thursday. It takes me under 10 seconds to do that one, which is as fast or faster than opening a new window and Googling, especially on mobile, so I think this is still useful. For the contribution from the year I use my own algorithm that I find faster than Conway's algorithm. Here's mine. In the following, assume a/b means floor(a/b), and odd(k) is true iff k is odd. In a C-like notation, my expression for the year contribution is -(y/2 - (odd(y) ? 1 : 0) - (odd(y/2) ? 3 : 0) mod 7 For example, for 26, that gives -(13 - 0 - 3) = 4. The way I would do this mentally is to note that 26 is even so I'm not going to have a subtract 1 step later, divide it by 2 to get 13, note that is odd so subtract 3 giving 10. I then do the negation mod 7 by simply noting how much I have to add to reach a multiple of 7, which in the case is 4 (10 + 4 is a multiple of 7). That gives the final result, 4. My inner dialog would be "26...13...10...4". If we were doing year xx27, it would go like this "27...13...10...9...5". xx28 would go "28...14...0". xx29 would go "29...14...13...1". That illustrates all four cases. I find this simpler than Conway's method, which is (y/12 + y%12 + (y%12)/4) mod 7, although I might find Conway's faster if I would get off my lazy ass and memorize the multiples of 12 up to 100. I also find it simpler than the odd + 11 method, which is: T := y + (odd(y) ? 11 : 0) T := T/2 T := T + (odd(T) ? 11 : 0) T := -T mod 7 Odd + 11 has the nice property that you only carry one number of state, whereas mine requires carrying whether the initial year was odd or even. However, it can start out increasing the number you are working with, which slows me down a little with years near the end of a century. Mine always starts out dividing by 2, and then might subtract, so is always going toward lower numbers. One could remedy this in odd + 11 by changing the first step to the equivalent T := y - (odd(y) ? 17 : 0) when dealing large y values, at the cost of having to do a -17 instead of a +11. (These are equivalent because of the 28 year cycle in the pattern of days of the week within a century. You can start off any of these Doomsday methods by adding 28 to or subtracting 28 from the year. So, if you have an odd year and subtract 28 before starting, and then add 11 under odd + 11, that is the same as subtracting 17 from the original year). While I'm here, there is one other place that can use improvement. The Wikipedia article on the Doomsday rule gives the rule for calculating the century contribution when using the Julian calendar as: 6 x (c mod 7) mod 7 + 1 That's fine, but if you just blindly follow it you'll be doing more work than you need to. It can be simplified to this simple expression: -c + 1 mod 7 For example, let's do June 15, 1215 (date of the Magna Carta) on the Julian calendar. Century component: -12 + 1 mod 7. I'd do this by noting that I have to add 2 to 12 to get a multiple of 14 (that's the -12 part), and adding the 1, so I'd mentally just go "12...2...3". The century component is 3. Year component: "15...7...4...3...4". Year component is 4. Month component for June is 1, and day is 15 = 1, so we have 1 + 1 + 4 + 3 = 2 = Monday. For the month component, I just memorize it using Conway's suggested mnemonics, which gives 6, but since the month component is subtracted I want the negative of that, and I use the same trick I use everywhere of simply noting what I have to add to reach a multiple of 7. 6 + 1 = 7, so that's where the one comes from. Trivia: that date is also a Monday on the Gregorian calendar. A couple other things that might be useful to those wanting to play around with doing calendar calculations in your head. If you want to go backwards on the year component, and find a year with year contribution M, the first year of the form 4N with year contribution M is (3M % 7)x4. For example, suppose I want to know a year this century (century factor is 3 for 20xx) where Christmas falls on a Tuesday. The month contribution for December is -12 = -5 = 2. So I want 3 + M + 2 + 25 = 3 mod 7. Thus, I want M = 1. Plugging that into (3M % 7)x4 I get 12, so 2012 has Christmas on Tuesday. That's already past. I want to know upcoming years with Christmas on Tuesday. We can make use of another pattern to deal with that. The next year after Y within the same century that has the same year contribution is: Y + 6 if Y is of the form 4N or 4N + 1 Y + 11 if Y is of the form 4N + 2 Y + 5 if Y is of the form 4N + 3 So, starting with a year Y of the form 4N, we have these years all have the same year contribution: Y, Y+6, Y+6+11, Y+6+11+6 and then it starts over again at Y+28, which is Y+6+11+6+5. Using this, and starting from 2012 (a 4N year), we get that Christmas will also be on Tuesday on 2018 (a 4N+2 year = 2012+6), 2029 (a 4N+1 year = 2018+11), and 2035 (a 4N+3 year = 2029+6), and then the 28 year cycle repeats starting at 2040 (a 4N year = 2035 + 5 = 2012 + 28). An alternative to the (3M%7)x4 approach for going from M to Y is to just memorize this: M First Y for M 0 0 1 1 2 2 3 3 4 9 5 4 6 5 and use the 28 year cycle to jump up by multiples of 28 if you are interest in a Y for your M that is farther into the century, and use the 6,11,6,5 pattern to move around in shorter ranges.
- userbinator 11y agoIf you were really using C, that expression could be simplified to something like -(y/2 - (y&3) - (y&2)/2) % 7
- pklausler 11y agoI also have my own algorithm for computing the day of the week, and I think that you're doing it the hard way. Of course, if it works for you, no problem. My technique: day_of_week = (year_day(Y) + month_day[M] + D - leapyear(Y,M)) mod 7 year_day(Y) = let Y' = Y-1900 (or Y-1984) in Y' + trunc(Y' / 4) month_day[] = { 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 } leapyear(Y,M) = 1 if M is Jan or Feb in a leap year, else 0 The year_day() is a constant for any year; in 2016, it's 5. The month_day[] table is easy to memorize in an inverted form that groups all the months that start on the same of the week in non-leap years: 0: Oct, Jan 1: May 2: Aug 3: Feb, Mar, Nov 4: Jun 5: Sep, Dec 6: Jul, Apr And that's it. Today (13 Jan 2016) is 5 + 0 + 13 - 1, or 17 which is 3 mod 7, or Wed. (EDITED to fix line spacing issues.)
- WolfeReader 11y agoFor year_day(2016), I get 145 (using the 1900 option). Can you check your formula?
- pklausler 11y ago145 = 5 mod 7, and I'll often reduce terms mod 7 when doing the math mentally. EDIT: I mean of course that 145 is equivalent to 5 (mod 7).
- WolfeReader 11y agoThanks! I can use this now.
- tzs 11y agoIf you use Saturday = 0, like Conway does, instead of Sunday = 0, then your month_day table becomes 1, 4, 4, 0, 2, 5, 0, 3, 6, 1, 4, 6. Martin Gardner gave a good suggestion for making that easy to memorize. Group it into sets of 3, giving 1 4 4 0 2 5 0 3 6 1 4 6 You can memorize the first three lines as 12^2, 5^2, and 6^2, and then just have to remember that the last line is 2 more than the first.
- wjnc 11y agoIf you want to practice skills like these, try: Street-Fighting Mathematics [1] and The Art of Insight in Science and Engineering by Sanjoy Mahajan (MIT) [2]. Free downloads via: [1] https://mitpress.mit.edu/books/street-fighting-mathematics https://mitpress.mit.edu/books/street-fighting-mathematics [2] https://mitpress.mit.edu/books/art-insight-science-and-engineering https://mitpress.mit.edu/books/art-insight-science-and-engin...
- rogeryu 11y agoThanks!
- joshmn 11y agoMy favorite is still the multiples of 9 by putting down one finger. It amazes me. Of course it only works with a full set of fingers, but still.
- venomsnake 11y agoMultiply by x by ten, substract x?
- booli 11y agoI was wondering why no one was suggesting this, isn't this the most obvious one?
- wingerlang 11y agoI always found 9 to be easy because whatever you multiply with (2-10) you just had to remove 1 from that number, and maybe memorise the second digit. e.g. 9*3 = 3-1 = 2 (+ the 7 that I just memorised) But actually the finger trick is amazing, and I just used it to double check the numbers as it was a loooong time I did it.
- kayge 11y agoThe "remove 1" trick is sort of how I learned it, except instead of memorizing "2 goes with 7" I learned that the 2 digits should add back up to 9: 9*3 = 27 (3-1 = 2,7 = 9-2) 9*4 = 36 (4-1 = 3,6 = 9-3) ... 9*9 = 81 (9-1 = 8,1 = 9-8) Fun stuff :)
- downtide 11y ago9s are easy if you know how: http://www.trachtenbergsystem.org/multiplication-9/ http://www.trachtenbergsystem.org/multiplication-9/
- jarcane 11y agoA fun property I learned that helps me remember the 9s: The digits of every multiple of 9, when totaled, eventually add up to nine. For 9 times x, for 2-10 at least, this can be reverse engineered: The 10s digit of the product will be x-1, and then the 1s digit will be whatever number remains that's needed for the digits to add up to 9. So 9 times 7: 7-1 = 6, 6+3 = 9, therefore 9*7 = 63. There may be a similar trick for bigger numbers, but I rarely need to do them quickly so I've never found one.
- nefitty 11y agoThis Android alarm clock has dramatically increased my speed and ability to do simple arithmetic: https://play.google.com/store/apps/details?id=com.alarmclock.xtreme.free https://play.google.com/store/apps/details?id=com.alarmclock... It allows the user to set an alarm that can only be turned off by solving math problems. You can imagine how quickly one's brain improves at this task when the reward is a snooze or a removal of a blaring alarm at 5 in the morning.
- rahimnathwani 11y agoHas it decreased the median delay between the first alarm and you getting out of bed?
- nefitty 11y agoI'd say so. The only way it ever seemed to really work was when I set more than four math problems on the hardest level.
- ranko 11y agoReminds me of yet another cool story from Richard Feynman about beating an abacus salesman with mental arithmetic: http://www.ee.ryerson.ca/~elf/abacus/feynman.html http://www.ee.ryerson.ca/~elf/abacus/feynman.html
- int0x80 11y agoThat is a very cool story. Feynman tells through his books a lot of this tricks to do arithmetic.
- askafriend 11y agoIs this still a relevant skill-set to be good at these days? I feel like it's a bit like writing cursive or being able to have good handwriting in general. It's just not that useful anymore unless you're in very specialized fields that require you to be good at mental math and even then how many situations are you in where you're put on the spot that you have to mentally solve something? There's probably more useful things to keep in your brain than these types of tricks. I don't mean to be so negative though. I certainly think it's very fascinating and interesting just from a pure mathematical perspective. However we also have to consider the utilitarian perspective when asking "why" many people aren't good at something like this anymore.
- efaref 11y agoMy maths teachers at school, like probably everyone else's, loved to tell us that we wouldn't be able to carry calculators around with us all the time when we're adults. The joke's on them. I carry a supercomputer with wireless access to the collective knowledge of humanity in my pocket. More seriously, if we assume we only have limited time and capacity to learn things, these tools surely free us from learning mundane "tricks" and allow us to further explore more interesting subjects. Sure, an understanding of arithmetic is important, so that we can verify our tools are working. But once that's obtained, let's move on.
- jarcane 11y agoYeah, except you look like a prick taking out your smartphone just to do some basic arithmetic. It's weird to me that a class of people who like to puff about how intelligent they are are so proud of refusing to function at an incredibly basic human skill.
- babuskov 11y agoShowing your intelligence at full usually requires that you are not distracted. That is hard to come by these days. I can calculate 16x180 in my head, but I would still pull out my smartphone to do it if the result is in any way important. Not because I'm lazy, but I know that the device won't make some silly mistake while doing it.
- refrigerator 11y agoHere's a cool site for practicing mental math (only 4 operations involving numbers up to 12 though): http://www.speedsums.com http://www.speedsums.com
- quickquicker 11y agoLet's play Numberwang! http://youtu.be/qjOZtWZ56lc http://youtu.be/qjOZtWZ56lc
- kriro 11y agoCool article and I love the writing style with subtle historic comments like the last sentence here: """I was good at mental arithmetic and saved myself a lot of money back in the Soviet Union. Every time I shopped I calculated all the charges as I stood at the cash register. I knew exactly how much to pay, which saved me from cheating cashiers. To simplify my practice, the shelves were empty, so I was never buying too many items."""
- MichaelBurge 11y agoIt took me a couple seconds, but I did this mentally: 75^2 = (70 + 5)^2 = 4900 + 2 * 70 * 5 + 25 = 5600 + 25 = 5625
- biot 11y agoYou can also do this by (ab)using the "square of a number close to 50" trick. Take 57^2 for example: this is the square of 50 plus 100 times the difference of the number from 50 plus the square of the difference of the number from 50, which is 2500 + 100x7 + 7^2, or 3249. For 43^2 it would be 2500 + 100x-7 + (-7)^2, which is 2500 - 100x7 + 49, or 1849. With 75, that's 2500 + 100x25 + 25^2. Hopefully you've memorized that 25^2 is 625, which makes this an easy 2500 + 2500 + 625, or 5625.
- MichaelBurge 11y agoYou're saying that x^2 = (50 + (x-50))^2 = 2500 + 2 * 50 * (x-50) + (x-50)^2 = 2500 + 100 * (x-50) + (x-50)^2. I'd be a little worried about the number of double-digit squares in this method. I can't do them as easily as single-digit squares, which using the multiple of 10 closest to the number ensures. For example, I'd have to use another trick to calculate 13^2 = 100 + 2 * 10 * 3 + 9 = 169 in the middle of the calculation for 63^2 = 2500 + 100*13 + 13^2. But 63^2 = 3600 + 2 * 60 * 3 + 9 = 3969 is almost immediate.
- biot 11y agoThat's why it's an abuse of the "number close to 50" trick. It really is meant for single digit differences from 50. The only reason it works for 75 is because hopefully 25^2 comes up often enough that people have it memorized. I know I memorized it long ago after seeing it a number of times: "twenty-five times twenty-five? six twenty-five" is easy for me to remember. If people don't have 25^2 memorized, the trick kind of falls down. Otherwise, you're right. You can break down the square of any number into (x+y)(x+y) = x^2 + 2xy + y^2. For 50, the "2x" term equals 100, and multiplying by 100 and adding to 2500 is dirt simple for anybody to do.
- lutusp 11y ago"I was good at mental arithmetic and saved myself a lot of money back in the Soviet Union." This reveals a weakness in western education. People in the former Soviet Union learned a lot of mathematics in the traditional way (a mixture of clever mental calculating skills and a good grounding in theory) simply because they had no alternative and there were many problems to be solved requiring higher math skills. Americans, on the other hand, (as well as being famously lazy about math) now rely almost completely on calculators and computers and are gradually abandoning both mental calculation and deep theory in mathematics. An EMP will someday zap all our electronics and we'll get our comeuppance, and we'll have to try to remember exactly why the integral of x^2 is x^3/3 + constant. As I sailed solo around the world 25 years ago I spent a lot of my free time practicing mental math. One day in Israel I read my receipt at a restaurant and realized the waitress had inflated the cost by performing a creative kind of addition. I corrected her figures, lectured her, and paid the difference as a tip. It occurs to me that she could get away with creative addition with 99% of people, even well-educated people, because nearly no one checks the addition on a receipt. Hans Bethe and Richard P. Feynman were both formidable mental calculators, at a time when that skill was valuable. There are stories about how (when they were both at Los Alamos) they would have contests to see which could produce the quickest result using somewhat different methods. This was at a time when a matrix calculation required a roomful of "calculators" sitting at mechanical adding machines all day long, sometimes for weeks, estimating the yield of a nuclear explosion.
- pbhjpbhj 11y ago>and we'll have to try to remember exactly why the integral of x^2 is x^3/3 + constant. // I could never remember such things when I was younger (it's worse now), which was why I loved maths so much because when I couldn't remember - provided I could remember basic principles - I could work it out. So as long as we know the basic principles of integration we won't need to remember that particular sum.
- kqr 11y agoI am terrible with remembering a bunch of facts, but I'm pretty good at working things out from basic principles. It's funny because many of my friends look at me figuring something out from basic principles and they think it looks like so much work – then they go back to taking a few hours to memorise things they could just as well work out from basic principles! Who's doing the work now? I guess we both are, only I postpone it to when I really need it.
- yread 11y agoI was wondering why last digit of 5th power is the same as original number and the answer [1] is to look at x^5-x which is x(x²+1)(x+1)(x-1) and prove that it is divisible by 5 and 2 (by going through the possibilities) so it must be divisible by 10. Or [2] use euler theorem. There is a comment that (spoiler) the most general form is "The last digit of, any integer and its nth power, are the same, where n=4k+1." [1] https://answers.yahoo.com/question/index?qid=20071020225048AAfcZr6 https://answers.yahoo.com/question/index?qid=20071020225048A... [2] http://www.johndcook.com/blog/2015/07/04/when-the-last-digits-of-powers-dont-change/ http://www.johndcook.com/blog/2015/07/04/when-the-last-digit...
- Cyph0n 11y agoMy favorite trick is one my father taught me after I first learned multiplication in school. The result of any two digit number mutiplied by 11 can be found by taking the sum of the two digits and inserting it between the original digits. Example: 54 * 11 = 5(5+4)4 = 594 In case the sum is greater than 9, carry the tens digit to the first digit of the result. Example: 56 * 11 = 5(5+6)6 = (5+1)(1)(6) = 616 I used to challenge my fellow students to see if they could find the result faster using a calculator. They thought I was some genius.
- mettamage 11y agoI didn't read all the comments, so this might have been said already. But I think there are some professions where quick mental arithmetic provides an edge. At one point I was learning how to play professional poker and while I had the common situations memorized, I'd calculate the less common situations. There are more use cases than just poker, chance estimation in general, or in a casual discussion where the other might not have a lot of patience. Compared to the old days however it has been in decline, but just like writing -- even cursive writing -- it still has its uses (cursive writing: exposing yourself to multiple ways of writing allows for a more fluent writing style in my experience).
- deleted 11y ago[deleted]
- siegecraft 11y agoI memorized a bunch of these for high school math competitions. You got very familiar with squares up to 100, prime numbers up to 100, converting fractions and repeating decimals. A sample test from back in the day: http://www.texasmath.org/DL/NS/NS9394.pdf http://www.texasmath.org/DL/NS/NS9394.pdf Of course, I've forgotten most of the tricks because they were so specific to the test.
- alfiedotwtf 11y agoIf you find Speed Maths interesting, you'll probably want to check out Trachtenberg's "Speed System of Basic Mathematics" book: http://www.amazon.com/Trachtenberg-Speed-System-Basic-Mathematics/dp/4871877094 http://www.amazon.com/Trachtenberg-Speed-System-Basic-Mathem...
- ch 11y agoNaturally there is a Dover book that covers this topic too: http://store.doverpublications.com/048620295x.html http://store.doverpublications.com/048620295x.html
- strongai 11y agoIndeed. In my UK primary school in the 1960s, 'Mental Arithmetic' was a distinct curriculum subject.
- Omnipresent 11y agoAre there any known resources for learning math tricks like the ones mentioned in the blog post? Perhaps a book...
- blub 11y agoSecrets of mental maths is one book that I heard of a long time ago. Note: didn't read it myself.
- leecarraher 11y agolike any science, math is more about problem solving skills versus the rote action, and mental math nowadays is nothing more than a 'fun' game. However some insight can be gained from mental math tricks that help solve deeper problems (log addition versus product computation for bayesian nets to avoid overflow), but the cost of teaching these tricks conveys to students that the trick is the goal, missing the point of mathematics as a science. At worse teaching such tricks results in us losing otherwise amazingly talented future mathematicians because they weren't particularly good at the 'tricks' part.
- Practicality 11y agoLooking at this thread there is clearly a community (overlapping significant portions of the HN community) where this is not a dying art.
- codeshaman 11y agoI bet this art is not dying, but actually flourishing like never before. The sheer amount of information in the form of websites, books, videos and so on should be a pointer. I mean just google "mental math tricks".. It's true that we can offload complicated brain tasks like number crunching to computers, but people do a lot of hard things also because the process gives them satisfaction. They climb mountains and walk thousands of miles not because they want to get somewhere, but because it's exciting and hard. For this reason, I think people will continue to study and invent new mental math tricks... More people, more free time, almost infinite info available... No, this art isn't going anywhere ;)
- stratigos 11y agoAnyone who has undergone a gauntlet of "cargo cult" style technical interviews knows full well that these "tricks" arent a dying art - they sometimes determine eligibility for a job.
- jackcosgrove 11y agoMental math is extremely useful when making financial decisions, especially because often you have to think on your feet to decide against an impulse buy and salesmen are actively trying to confuse you. That said schools have never done a good job of teaching finance basics, such as rules of thumb for calculating compound interest, or even what a reasonable interest rate is (hint: inflation is usually 2-3%, while the stock market usually grows at 6-7%).
- gist 11y agoIf you ever need more time "to think and decide" (and feel that you are being rushed) simply ask a question (almost any question will do but one that isn't a simple yes or no is better obviously) or make a statement and use that time to give more thought to what you are trying to make your mind up on.
- tosseraccount 11y agoStock market annual total return average is 11.41% (1928-2015). Total return means dividends re-invested; not inflation adjusted. (source : http://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/histretSP.html http://pages.stern.nyu.edu/~adamodar/New_Home_Page/datafile/... )
- bumbledraven 11y agoTwo excellent books on the subject are Secrets of Mental Math by Arthur Benjamin (for beginners) and Dead Reckoning: Calculating Without Instruments by Ronald Doerfler (more advanced). The Mind Your Decisions blog (http://mindyourdecisions.com/blog/tag/mental-math/ http://mindyourdecisions.com/blog/tag/mental-math/) has a lot of neat mental math tricks, but they're not really organized into a unified presentation there as in the books above.
- bumbledraven 11y agoThe First Sunday Doomsday Algorithm is the simplest way to calculate the day of the week for any date in your head. http://firstsundaydoomsday.blogspot.com http://firstsundaydoomsday.blogspot.com It brings together a bunch of great mnemonics, like the new "odd+11" rule for calculating the 2-digit year code, as well as Conway's classic "I work 9-5 at the 7-11" for the month code.