Mental Calculation

ThatGuy said:
Challenge. How about finding the GCD of two insanely large numbers.

I don't know of a way to do this very quickly (i.e. shortcut). I would probably prime factorize the number and calculate it that way.

Btw, there is a very simply way to construct a divisibility rule for any prime number (except 2 and 5).

For example, I would like a rule to know when a number is divisible by 17. To do this I need to multiply 17 by a number until the result ends in a nine. I will multiply 17 by 7 to do this, and get 119. Now I truncate the ones place from 119 to make it 11, and lastly add 1 to this to get 12. 12 is a number very closely related to 17 in terms of divisibility. The method I learned called 12 the "X-factor" of 17.

Ok, so now that we have the X-factor of 17, we have a very simple divisibility rule for 17. I will use 17^3 = 4913 to show this. We know that 4913 is divisible by 17, but let's use the X-factor for this.

1) First truncate the ones digit off the 4913. This gives us:

491 | 3

Multiply the truncated 3 by 17's X-factor. 3*12=36. Now add this result to the remaining 491 that is left over.

491
_36
----
527

If this result is divisible by 17, so is our original number. 527 is divisible by 17, but you can iterate the process if you do this mentally.

52 | 7
7*12 = 84

52
84
--
136 (divisible by 17, and therefore our original number is as well)

13 | 6
6*12 = 72

13
72
--
85 (divisible by 17, and therefore our original number is as well).

----------------------------------------

There is one other useful thing to know about doing this. 12 is the X-factor of 17, and 17-12 = 5 is the complement X-factor.

So I could have done this much easier with the complement X-factor.

491 | 3
3*5 = 15

And if you use the complement X-factor you subtract the result.

491
_15
----
476

47 | 6
6*5 = 30

47
30
---
17 (and so 4913 is divisible by 17)

---------------------------

I also find it fun to prime factorize larger numbers using the X-factors of all the primes less than or equal to its square root. You could then use the prime factorizations of each of the two numbers to calculate the greatest common divisor.

Chris
 
ThatGuy said:
Challenge. How about finding the GCD of two insanely large numbers.

I don't know of a way to do this very quickly (i.e. shortcut). I would probably prime factorize the number and calculate it that way.

Btw, there is a very simply way to construct a divisibility rule for any prime number (except 2 and 5).

For example, I would like a rule to know when a number is divisible by 17. To do this I need to multiply 17 by a number until the result ends in a nine. I will multiply 17 by 7 to do this, and get 119. Now I truncate the ones place from 119 to make it 11, and lastly add 1 to this to get 12. 12 is a number very closely related to 17 in terms of divisibility. The method I learned called 12 the "X-factor" of 17.

Ok, so now that we have the X-factor of 17, we have a very simple divisibility rule for 17. I will use 17^3 = 4913 to show this. We know that 4913 is divisible by 17, but let's use the X-factor for this.

1) First truncate the ones digit off the 4913. This gives us:

491 | 3

Multiply the truncated 3 by 17's X-factor. 3*12=36. Now add this result to the remaining 491 that is left over.

491
_36
----
527

If this result is divisible by 17, so is our original number. 527 is divisible by 17, but you can iterate the process if you do this mentally.

52 | 7
7*12 = 84

52
84
--
136 (divisible by 17, and therefore our original number is as well)

13 | 6
6*12 = 72

13
72
--
85 (divisible by 17, and therefore our original number is as well).

----------------------------------------

There is one other useful thing to know about doing this. 12 is the X-factor of 17, and 17-12 = 5 is the complement X-factor.

So I could have done this much easier with the complement X-factor.

491 | 3
3*5 = 15

And if you use the complement X-factor you subtract the result.

491
_15
----
476

47 | 6
6*5 = 30

47
30
---
17 (and so 4913 is divisible by 17)

---------------------------

I also find it fun to prime factorize larger numbers using the X-factors of all the primes less than or equal to its square root. You could then use the prime factorizations of each of the two numbers to calculate the greatest common divisor.

Chris

Let's start with two smaller number, lets say 17 and 7.
17=(2)7+3
7=(3)2+1
2= (1)2+0
Once you reach 0 look at the previous line and find the remainder, which in this case is 1. That number is the GCD of those two numbers.

24 16
24=(1)16+8
16=(2)8+0
So 8 is the GCD.
This can be proven using modular arithmetic.
http://en.wikipedia.org/wiki/Euclidean_algorithm

So, if we take two large numbers we can apply many different mental calculations as well as memory.
 
Last edited:
ThatGuy said:
Challenge. How about finding the GCD of two insanely large numbers.

I don't know of a way to do this very quickly (i.e. shortcut). I would probably prime factorize the number and calculate it that way.

Btw, there is a very simply way to construct a divisibility rule for any prime number (except 2 and 5).

For example, I would like a rule to know when a number is divisible by 17. To do this I need to multiply 17 by a number until the result ends in a nine. I will multiply 17 by 7 to do this, and get 119. Now I truncate the ones place from 119 to make it 11, and lastly add 1 to this to get 12. 12 is a number very closely related to 17 in terms of divisibility. The method I learned called 12 the "X-factor" of 17.

Ok, so now that we have the X-factor of 17, we have a very simple divisibility rule for 17. I will use 17^3 = 4913 to show this. We know that 4913 is divisible by 17, but let's use the X-factor for this.

1) First truncate the ones digit off the 4913. This gives us:

491 | 3

Multiply the truncated 3 by 17's X-factor. 3*12=36. Now add this result to the remaining 491 that is left over.

491
_36
----
527

If this result is divisible by 17, so is our original number. 527 is divisible by 17, but you can iterate the process if you do this mentally.

52 | 7
7*12 = 84

52
84
--
136 (divisible by 17, and therefore our original number is as well)

13 | 6
6*12 = 72

13
72
--
85 (divisible by 17, and therefore our original number is as well).

----------------------------------------

There is one other useful thing to know about doing this. 12 is the X-factor of 17, and 17-12 = 5 is the complement X-factor.

So I could have done this much easier with the complement X-factor.

491 | 3
3*5 = 15

And if you use the complement X-factor you subtract the result.

491
_15
----
476

47 | 6
6*5 = 30

47
30
---
17 (and so 4913 is divisible by 17)

---------------------------

I also find it fun to prime factorize larger numbers using the X-factors of all the primes less than or equal to its square root. You could then use the prime factorizations of each of the two numbers to calculate the greatest common divisor.

Chris

Let's start with two smaller number, lets say 17 and 7.
17=(2)7+3
7=(3)2+1
2= (1)2+0
Once you reach 0 look at the previous line and find the remainder, which in this case is 1. That number is the GCD of those two numbers.

24 16
24=(1)16+8
16=(2)8+0
So 8 is the GCD.
This can be proven using modular arithmetic.
http://en.wikipedia.org/wiki/Euclidean_algorithm

So, if we take two large numbers we can apply many different mental calculations as well as memory.

:fp Euclidean algorithm, nice... Should have thought of that lol.

But you do have to admit, that X-factor stuff is pretty cool. I always hated it when my teachers used to say that the divisibility rule for 7 was "so incredibly difficult that it will melt your mind into a goo, and that goo will then have to be scraped off the classroom floor" or something to that effect ;)

7 has a complement X-factor of 2, so following the same process as above you have a relatively easy divisibility rule for 7.

Chris
 
I remember in 6th grade the teacher gave us a wrong divisibility by 7 so I ended up thinking that none existed. I didn't really do much thinking about it until I went to Ross and then I was like OMG so this is where so much of the random stuff they tell us comes from.
 
Wow, good thread to bump.

I've been trying to work on squaring 3-digit numbers completely mentally.
Some people don't understand my method as to doing this, but you guys might.

Try this on paper, first. It helps a LOT.

Okay, say the number is 139, and you must mentally square it.
Already knowing after about 35 seconds that the answer is 19,321, I'll show you how I got it.

Okay. So I split the number 139 into two parts. You can do this in two ways:
13|9 or 1|39.
Square the figures on either side of the split.
I'd personally use the first split.
13^2 = 169; 9^2 = 81.
Form these two results as one five-or-six-digit number.
In this case, I'd join 169 to 81 to form 16981.
Remember 16981! Or write it down for reference.

Now we take the figures of the split (13 and 9) and multiply them together.
13*9 = 117.
Now multiply that by two.
117*2 = 234.
Since the split occurred after the tens' place, add one zero at the end of 234 to make it 2340.
(Similarly, if the split was after the hundreds' place, you would add two zeroes.)

Add 2340 to 16981.
19,321.

It's a fascinating method, but it's not perfect. Take 328, and split 3|28, and see what result you get.
 
Wow, good thread to bump.

I've been trying to work on squaring 3-digit numbers completely mentally.
Some people don't understand my method as to doing this, but you guys might.

Try this on paper, first. It helps a LOT.

Okay, say the number is 139, and you must mentally square it.
Already knowing after about 35 seconds that the answer is 19,321, I'll show you how I got it.

Okay. So I split the number 139 into two parts. You can do this in two ways:
13|9 or 1|39.
Square the figures on either side of the split.
I'd personally use the first split.
13^2 = 169; 9^2 = 81.
Form these two results as one five-or-six-digit number.
In this case, I'd join 169 to 81 to form 16981.
Remember 16981! Or write it down for reference.

Now we take the figures of the split (13 and 9) and multiply them together.
13*9 = 117.
Now multiply that by two.
117*2 = 234.
Since the split occurred after the tens' place, add one zero at the end of 234 to make it 2340.
(Similarly, if the split was after the hundreds' place, you would add two zeroes.

Add 2340 to 16981.
19,321.

It's a fascinating method, but it's not perfect. Take 328, and split 3|28, and see what result you get.

Oh, I forgot to explain the other split. I assumed one would get it, but I guess not.

Okay, since the split is at 3|28, you square three and twenty-eight.
3^2 = 9; 28^2 = 784.
Since three was in the 100s' place, you're actually squaring 300, and thus the five digit number is 90784 (90000 + 784).

Since three from 328 is in the hundreds' place (as I stated before), you multiply 300 by 28, and multiply by two, since in the method before, we added the zeroes at the end.
300 * 28 * 2 = 16800.

90,784 + 16,800 = 107,584.
And that is the answer.
 
wouw... am I supposed to read all this? x'D

just to get on topic, I have tried some Mental Calculations a bit, but I calculate from right to left..

I have worked out my own method for both multiplying numbers and taking the third root of a number, if it's answer is a 2 digit number (very easy :D)

How I multiply in head(Yes, it sucks =D ):
pretty much a criss cross one... but it works :D

let's take a number: abcd * efgh = jklmnop

the numbers are just spots...

p=h*d
o=g*d+c*h+truncated(p/10)
n=b*h+c*g+d*f+truncated(o/10)
m=a*h+b*g+c*f+d*e+truncated(n/10)
l=a*g+b*f+c*e+truncated(m/10)
k=a*f+b*e+truncated(l/10)
j=a*e+truncated(k/10)

yeah =D
 
I just tried two attempts at 8 digit times 8 digit mental multiplication. The only thing I wrote down was the answer, no intermediate work. I used www.random.org to generate the numbers, and timed the attempts with netcube.

First attempt was off by quite a lot:
94819663 * 54799651 = 5196 084440 337613

I got the answer wrong with 5295 984340 337613. This attempt took 21:03.95 minutes.
---------

Second attempt was:
64602573 * 90381014 = 5838 846054 749022

and I got the answer correct for this one in 9:24.85 minutes. I have no idea why this attempt was so much faster. Probably due to lack of practice (I'm still on the steep part of the learning curve), as well as having more 0's in the two numbers on the second attempt. I'm glad for my first Stackmat time at doing this at least, but I want to wait until I do it again before I get excited.

Chris
 
Did you allow yourself to write down digits of the answer before you got the whole thing, or did you try to keep the entire thing in memory? I think I could do the multiplication in a lot under 10 minutes without writing down anything *but the answer*, but I wouldn't be able to do it without writing down anything *until I know the answer*.
 
Did you allow yourself to write down digits of the answer before you got the whole thing, or did you try to keep the entire thing in memory? I think I could do the multiplication in a lot under 10 minutes without writing down anything *but the answer*, but I wouldn't be able to do it without writing down anything *until I know the answer*.

I don't know the official rules for this, and it's something I know has discussed in the earlier posts in this same thread from a long time ago. I wrote down the digits once I was sure they were part of the final answer, but I was not done calculating as I wrote them down. So, I did technically write down only the answer, and no intermediate calculations. However, I took the entire 10 minutes, or 20 minutes, to do so.

I would rather practice this by following the official rules for mental calculation competitions, but I haven't researched enough to know what those rules are. I'll try to take a look into this and see what those who specialize in this say about it, but I hope you are allowed to write down digits without knowing the entire answer already.

Chris
 
I found this page of records for calculating which lists some rules for how the attempts were done.

Some relevant rules are:
5. The calculator should write down the answer to the calculation. If the answer is written down, this can be done left-to-right, right-to-left or in any arbitrary order.

6. The timing begins when the two numbers become visible to the competitor and ends at the end of writing the answer.

7. In some cases, the calculator may dictate the answer - then the timing ends as the calculator finishes dictating the answer.

So it seems it's similar to our blindfold solving. The total time is from when you see the numbers to when the answer is written down. I would assume from this that you should be able to write down the numbers as you calculate, and that you don't have to write it only once you know the entire answer.

Chris
 
Last edited:
when im in highschool, i used to challenge my classmates in square rooting a 5 or 6 digit perfect square mentally with a given number from a calculator
(random number x 1000)^2
anyway, my job involves mathematics, but I think I'm gonna stick with the calculators... :D
but if I gonna have free time, maybe i'm gonna try that
 
Last edited:
I tried 111x158 while I was doing nothing. I didn't really count time but I got it right :D It was sort of brute force in my head so when I tried xyz with x>1 I failed...but it was a good time passer.
 
I found this page of records for calculating which lists some rules for how the attempts were done.

Some relevant rules are:
5. The calculator should write down the answer to the calculation. If the answer is written down, this can be done left-to-right, right-to-left or in any arbitrary order.

6. The timing begins when the two numbers become visible to the competitor and ends at the end of writing the answer.

7. In some cases, the calculator may dictate the answer - then the timing ends as the calculator finishes dictating the answer.

So it seems it's similar to our blindfold solving. The total time is from when you see the numbers to when the answer is written down. I would assume from this that you should be able to write down the numbers as you calculate, and that you don't have to write it only once you know the entire answer.

Chris

I've read these before, and I thought I remembered that being the way it worked. Also, the rules for the World Cup here follow the same general guidelines.
 
Once when i was in bed a few years ago(im 16 now)i think i was 12:/ but anyway i figured out that squares have a patrn and tryed to explain this to several math teachers non oof which understood how it worked
basiclly 2^2 is 4 yes?
3^2 is 9
so 9-4=5
lets continue
4^2 is 16
16-9=7
5^2 is 25
25-16=9
so basiclly the higher up in squares you go you go to the next odd number
I know its not as effficient as your methods but it works but just alot slower
ou last odd number was 9 so the next is 11 so if you ad this to 25 (5^2) you get 36 which would be the next square

So basically, if you are trying to calculate N^2, it is addition of first N odd numbers. Nth odd number is 2*N-1. So if you want to add the numbers, you will get N/2 pairs, each adding up to 2N. So basically you are doing, 2N * N/2 which is N^2.

So if you go in the reverse order, you have a proof for your theory.
:D
 
Once when i was in bed a few years ago(im 16 now)i think i was 12:/ but anyway i figured out that squares have a patrn and tryed to explain this to several math teachers non oof which understood how it worked
basiclly 2^2 is 4 yes?
3^2 is 9
so 9-4=5
lets continue
4^2 is 16
16-9=7
5^2 is 25
25-16=9
so basiclly the higher up in squares you go you go to the next odd number
I know its not as effficient as your methods but it works but just alot slower
ou last odd number was 9 so the next is 11 so if you ad this to 25 (5^2) you get 36 which would be the next square

So basically, if you are trying to calculate N^2, it is addition of first N odd numbers. Nth odd number is 2*N-1. So if you want to add the numbers, you will get N/2 pairs, each adding up to 2N. So basically you are doing, 2N * N/2 which is N^2.

So if you go in the reverse order, you have a proof for your theory.
:D

The way I saw this was that the difference between two numbers' squares is the sum of the two original numbers if the two original numbers' difference is one.
To prove:

5*5 = 25.
6*6 = 36.
36-25 = 11.
5+6 = 11.

5*5+5 = 5(5) + 5(1) = 5*6.
5*6+6 = 6(5) + 6(1) = 6*6.
Therefore, 5*5+5+6 = 6*6.

To further prove:
2.4*2.4 = 5.76.
3.4*3.4 = 11.56.
11.56-5.76 = 5.8.
2.4+3.4 = 5.8.

2.4*2.4+2.4 = 2.4(2.4) + 2.4(1) = 24*3.4.
2.4*3.4+3.4 = 3.4(2.4) + 3.4(1) = 3.4*3.4.
Therefore, 2.4*2.4+2.4+3.4 = 3.4*3.4.

Additionally, the difference of the squares of two numbers whose difference is two is two times the sum of the two numbers given.
Basically, if y-x = 2, then y^2 - x^2 = 2(x+y).
 
I've been working on mental calculation recently again and wanted to post about it. This thread already exists, so I figure it's better to bump here than start a new thread.

I recently finished learning all my squares from 1 to 100 by memory. Some of the squares I still have to calculate quickly on the spot (larger squares that end in 5 for instance, like 65^2, 75^2, etc.), but most of them I have memorized and can recall the answer within 3-4 seconds after using various memory mnemonics.

I'm using these to be able to help with mental multiplication in general, but I am also practicing how to square 3 digit and 4 digit numbers in my head also, using something very similar to the regular multiplication of numbers method that I use for numbers 2 digits and larger, but using the memorized squares up to 99^2 to make this process much simpler and much quicker.

I know there are others on this forum who practice mental math, as evidenced by the replies in this thread from when I first posted it. I'm sort of learning things for fun without much of a solid goal right now. I guess I am loosely interested in one day maybe participating in the mental calculation world cup, but I am not really practicing for their events with any serious effort yet.

Next I plan to expand my multiplication tables from 12x12 to 25x25 from memory. I already have the squares up to 25x25 memorized as mentioned, and I'm not sure yet how I'll work on the rest. I think I'll work up to 13x13, then 14x14, then 15x15, etc but I'm not sure yet.

Not sure if others will find this interesting, but I am excited about my progress so far and wanted to post about it.
 
I used to multiply numbers. I could do two 4 digit numbers fairly easily (maybe around 30 second) and sometimes two 5 digit numbers. My method limited me to no more than 5 since that's the amount of constantly changing numbers I could keep track of.
 
Back
Top