
The Dying Art of Mental Math Tricks - jimsojim
http://blog.tanyakhovanova.com/2015/06/the-dying-art-of-mental-math-tricks/
======
askafriend
Is 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
My 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
Yeah, 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
Showing 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.

~~~
Cyph0n
That's a trivial calculation to do, so I think it would be hard to make a
mistake. I think you could have provided a better example.

Edit:

To the poster below, you only need the multiplication tables and basic
addition. I don't see the big deal.

18 * 10 = 180

10 * 6 = 60

8 * 6 = 48

= 288

~~~
hueving
12x12 is the max for most memorized multiplication tables (at least in the
US). 16x18 is going to require some actual mental work that is prone to
errors.

~~~
kqr
For computer people, 16×18 is easily split into 16×20 - 16×2, which in turn is
320 - 32. If you don't know instinctively that 16×2 is 32 it might be a bit
harder though.

~~~
Cyph0n
Or a better way for us programmers:

16 * 16 = 256

16 * 2 = 32

256+32 = 288

~~~
cozzyd
Even better:

16 * 18 = (17-1)*(17+1) = 17^2-1 = 289-1 = 288.

Provided of course you know your squares.

~~~
Cyph0n
Ah that's a good one. I had powers of 2 in mind.

------
wjnc
If 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-
engin...](https://mitpress.mit.edu/books/art-insight-science-and-engineering)

~~~
rogeryu
Thanks!

------
nefitty
This Android alarm clock has dramatically increased my speed and ability to do
simple arithmetic:
[https://play.google.com/store/apps/details?id=com.alarmclock...](https://play.google.com/store/apps/details?id=com.alarmclock.xtreme.free)

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
Has it decreased the median delay between the first alarm and you getting out
of bed?

~~~
nefitty
I'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.

------
kriro
Cool 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."""

------
ranko
Reminds 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
That is a very cool story. Feynman tells through his books a lot of this
tricks to do arithmetic.

------
jackcosgrove
Mental 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
If 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.

------
Cyph0n
My 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.

------
yread
I 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=20071020225048A...](https://answers.yahoo.com/question/index?qid=20071020225048AAfcZr6)

[2] [http://www.johndcook.com/blog/2015/07/04/when-the-last-
digit...](http://www.johndcook.com/blog/2015/07/04/when-the-last-digits-of-
powers-dont-change/)

------
codeshaman
I 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 ;)

------
joshmn
My 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
Multiply by x by ten, substract x?

~~~
booli
I was wondering why no one was suggesting this, isn't this the most obvious
one?

------
bumbledraven
Two 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.

------
siegecraft
I 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.

------
tzs
> 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.

~~~
pklausler
I 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
For year_day(2016), I get 145 (using the 1900 option). Can you check your
formula?

~~~
pklausler
145 = 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
Thanks! I can use this now.

------
refrigerator
Here'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)

------
ch
Naturally there is a Dover book that covers this topic too:

[http://store.doverpublications.com/048620295x.html](http://store.doverpublications.com/048620295x.html)

------
lutusp
"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
>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
I 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.

------
quickquicker
Let's play Numberwang!
[http://youtu.be/qjOZtWZ56lc](http://youtu.be/qjOZtWZ56lc)

------
alfiedotwtf
If 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-
Mathem...](http://www.amazon.com/Trachtenberg-Speed-System-Basic-
Mathematics/dp/4871877094)

------
mettamage
I 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).

------
bumbledraven
The 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.

------
leecarraher
like 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.

------
stratigos
Anyone 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.

------
Practicality
Looking at this thread there is clearly a community (overlapping significant
portions of the HN community) where this is not a dying art.

------
Omnipresent
Are there any known resources for learning math tricks like the ones mentioned
in the blog post? Perhaps a book...

~~~
blub
Secrets of mental maths is one book that I heard of a long time ago.

Note: didn't read it myself.

------
strongai
Indeed. In my UK primary school in the 1960s, 'Mental Arithmetic' was a
distinct curriculum subject.

------
MichaelBurge
It took me a couple seconds, but I did this mentally:

75^2 = (70 + 5)^2 = 4900 + 2 * 70 * 5 + 25 = 5600 + 25 = 5625

~~~
biot
You 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
You'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
That'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.

~~~
dipakmehara05
96 81 676761

