blakedacuber
Premium Member
Greatest Common Dinominator?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
ThatGuy said:Challenge. How about finding the GCD of two insanely large numbers.
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.
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.
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.
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*.
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.
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
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
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.
![]()