Prime Numbers, Mental Calculation, and Memorization

This thread is related to the conversations on savantism and memory competitions. I haven’t finished reading all the materials yet, but thought that other people might be interested in the links:

Here is a study that looks at whether savants can calculate prime numbers:


Here is an interesting PDF document from 2008 about mental calculation:
http://myreckonings.com/wordpress/wp-content/uploads/LightningCalculators/lightningcalculators.pdf

There is some information in there about prime number calculation.

Here is a webpage about prime numbers in general:
http://primes.utm.edu/

Let me know what you think…

There’s an excellent blog post here taking a look at claims of savants calculating prime numbers:
http://www.pepijnvanerp.nl/articles/oliver-sackss-twins-and-prime-numbers/

I am deeply skeptical about any claims that savants can calculate prime numbers in some kind of mysterious innate way.

Learning a certain number of prime numbers is easily explainable by memorisation.

Some reports of prime number savants include reports of recognising much larger prime numbers, which can’t so easily be explained by memorisation. However, while identifying large prime numbers with 100% reliability is exceptionally hard, as there are no real shortcuts, making an unreliable guess using shortcuts is relatively easy. So to evaluate whether someone really has exceptional ability with prime numbers, carefully controlled testing, checking carefully for accuracy and carefully choosing the questions asked, is essential.

Most of the widely reported claims of prime number savants - such as Oliver Sacks’s, don’t appear to involve any such careful testing, so they are unconvincing as evidence of mysterious extraordinary abilities.

Thanks for the link. Here is a video of the twins from that article:

This post was also mentioned:

Interesting comment:

There doesn't seem to be the slightest reason to think the 20-digit numbers were actually prime. They might have been, but it's plausible that the twins had slightly different interests. For example, instead of thinking about primality in any strict sense, maybe they were just impressed by numbers for which they could think of no proper factors. In fact, it could have been a game: one twin proposes a number, and the other wins if he can find a proper factor. Perhaps over time they got very good at avoiding composites, but they enjoyed playing it despite its eventual predictability.

Interesting that the article begins by giving the names of “John” and “Michael”, and then claims that they’re the twins in that video. The twins in that video are George and Charles Finn.

It looks to me that “John” and “Michael” are just pseudonyms that Sacks is using for George and Charles. This is supported by other sources (eg Darold Treffert’s “Extraordinary People” p40) which imply that Sacks is talking about George and Charles.

I know one!

When you multiply something with 11, you can do an easy calculation:
Let something be = 23459, then

11 x 23459 =

answer is easy,

the first number is the first of 23452, so 2
The second number is the sum of second and third number so, 2 + 3 = 5
The third…sum of third and fourth, so 3 + 4 = 7,
The fourth… 4+5 = 9
The fifth… 5 + 2 = 7,
the last is always the last number of which you multiplied 11, = 2

257972 !!!

11 x 22 =

first number of 22 = 2
second number is sum of the first number and the second of 22, = 4
third number is the last number of 22, = 2

11 x 22 =242

Also a funny site is calculationrankings.c, you can do a calculation game with clock to practice your numerical skills and add a ranking!

Greetz Chip

If you can memorize a fair amount of primes it’s not too hard to check if something is prime with some quick mental division. Any number can be written as a “unique product of primes” so the more primes you know the higher you can check. Also, you only have to check up to the square root of the number, because then you start to check duplicates, for example:
100 (sqrt is 10)
1100
2
50
425
5
20
1010
but now that we have checked the square root, we have already seen all of it’s factors. If we continue, we get to 20 and find 20
5, but we already did 5*20. (if that makes sense)

So for instance, let’s check 2013.
I’ll estimate the sqrt at around 45 (40 gives 1600, 50 gives 2500, I’ll split the difference. In reality, 45^2 = 2025, but that’s pretty close.
So now we would have to check the prime numbers (and only the primes) up to 45. If 2013 does not divide by any of those, it is prime also.
2 doesn’t work, since 2013 is odd
3 does work, since 2+0+1+3 = 6 which is divisible by 3.
So 2013 is not a prime number.

That example didn’t work too well, I wanted to try something that would be prime… What about 1969 (moon landing). I estimate the square root at 45 again, (44 is too small).
2 doesn’t divide, since 1969 is odd
3 doesn’t work, since 1+9+6+9 = 25, not divisble by 3
5 doesn’t work, since 1969 doesn’t end in 0 or 5
7 is a bit harder. I know that 1400 is a factor of 7 (2007), so I’ll subtract that from 1969 and I’m left with 569. I can get rid of 490 now (770), giving 79. I can get rid of 77 now (711), leaving me with 2, so it isn’t divisible by 7 either.
11: alternate the sum of the digits. So 1-9+6-9 = -11. That is a multiple of 11 (11
-1), so that means that 1969 is divisible by 11 and not a prime number

And I think you can see how this works. If it wasn’t divisible by 11, then we’d check 13, 17, 19, 23, 29, 31, 37, 41, 43. We don’t need to check 53 (the next prime), since that would pass our estimated square root. If it was divisible by 53, then we would have already checked that earlier in the calculations. (1969/53 is about 37.1).
That’s what I do to check if it’s prime or not.

I completely agree with Tomasyi that there is very much reason to be sceptical of this claim.
First of all, the authors clearly has very little mathematical knowledge and doesn’t seem to have researched methods for determining if a number is prime at all. There is probabilistic polynomial-time methods (for instance Miller-Rabins primality test) that can determine if a number is prime with success probability 50%. The test can, however, be done several times to achieve an arbitrary small failure probability. Also, there is similar deterministic algorithms and also algorithms that have been around for longer then the Miller-Rabin test which is quite recent. However, those tests requires multiplications which the twins didn’t seem to be capable of.
This is, however, very different from factoring a number which is believed to be very difficult and any such claims would be even more remarkable.

http://mathscount.blogspot.in/

i have also written aarticle on prime number check

Interesting video of the twins. I checked two of the dates using wolframalpha, and they are correct. One downfall I can see to the test is, they always used july 19th. In Greymatters blog, here, he tells us how to calculate the day of the week using simple math. It’s simple, day code+month code+ year code+ century code. When the experimenter always uses July 19th, it eliminates two components, so they just have to calculate the year code and the century code. The century code repeats every 4 centuries, they just have to eliminate all multiples of 4 for centuries.

Lets do it: July 19th 92,860
July(5) 19th(5)=3(they already know this)
92860, right away can eliminate 80000, leaves 12860, eliminate 12000, leaves 860. 860 is also a multiple of 4(century), so its 0, which just leaves 60. 60/4 = 15. 15+60=75. Eliminate 7s, its 5. 5+3= 8. 8-7 = 1=Monday.

Not too hard. With practice, one could instantly recognize 92860 is 0, because 928 divides by 4.

But it seems that these twins, and savants such as kim peek, do this automatically, their brains figured out on their own how days of the week progress, and just do it automatically.

My record is 82 calendar dates per minute (52 in the last MC World Cup). But I don’t use codes for month. Only Doomsday.

Nodas

1 Like

About my MCWC training for suprise tasks of primes or factorization, I divide the primes into 2 categories:

Trivial primes (2, 3, 5, 11) and non-trivial primes(all the other):

Non-trivial primes up to 100: 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 (21 numbers in total)

Finding divisibility with ‘trivial primes’ is very easy
2: check if odd or even
3: addition of digits should have mod3=0
5: ends in 0 or 5
11: alternate digits should be 0mod11

There are 25 numbers up to 100, and 168 primes up to 1000. But with the following trick, only memorisation of 70 special composites are needed.

So, if you want know all the primes up to 1000, it’s useful to just memorise only the 70 ‘non-trivial composites’: 91, 119, 133, 161, 203, 217, 221, 247, 259, 287, 299, 301, 323, 329, 343, 371, 377, 391, 403, 413, 427, 437, 469, 481, 493, 497, 511, 527, 533, 551, 553, 559, 581, 589, 611, 623, 629, 637, 667, 679, 689, 697, 703, 707, 713, 721, 731, 749, 763, 767, 779, 791, 793, 799, 817, 833, 851, 871, 889, 893, 899, 901, 917, 923, 931, 943, 949, 959, 973, 989. (that’s only 70 numbers to remember)
which of course are
7X13=91, 7X17=119, 7X19=133, 7X23=161, 7X29=203, 7X31=217, 13X17=221, 13X19=247, 7X37=259, 7X41=287, 13X23=299, 7X43=301, 17X19=323, 7X47=329, 7X7X7=343, 7X53=371, 13X29=377, 17X23=391, 13X31=403, 7X59=413, 7X61=427, 19X23=437, 7X67=469, 13X37=481, 17X29=493, 7X71=497, 7X73=511, 17X31=527, 13X41=533, 19X29=551, 7x79=553, 13x43=559, 7x83=581, 19x31=589, 13x47=611, 7x89=623, 17x37=629, 13X7X7=637, 23X29=667, 7X97=679, 13X53=689, 17X41=697, 19X37=703, 7X101=707, 23X31=713, 7X103=721, 17X43=731, 7X107=749, 7X109=763, 13X59=767, 19X41=779, 7X113=791, 13X61=793, 17X47=799, 19X43=817, 17X7X7=833, 23X37=851, 13X67=871, 7X127=889, 19X47=893, 29X31=899, 17X53=901, 917, 13X71=923, 19X7X7=931, 7X131=943, 13X73=949, 7X137=959, 7X139=973, 23X43=989.

So all the numbers up to 1000 fall either into any of the 168 primes or the 70 non-trivial composites (see above) or the rest 762 ‘trivial composite’ numbers which fall into any of those category 0=mod2, 0=mod3, 0=mod5, 0=mod11, which like I said are calculated very easily, almost instantly, by seeing the number.

So, to sum up actually for memorization of primes up to 1000,
there 3 categories of 3-digit numbers

  1. The 168 primes
  2. The 832 non-primes.
    These 832 are categorised into
  • 70 difficult ’ non-trivial’ composites
  • 762 easy composites ( which have either 0=mod2, 0=mod3, 0=mod5, 0=mod11). By learning those 70 difficult ’ non-trivial’ composites, makes it much easier to instantly see if a 3-digit number is prime or not.
    I think most people with good mnemonics techniques in this forum will not have any difficulty memorising those 70 numbers, if they are interested in knowing if a number is prime or not.

e.g. When I see a 3-digit number and want to factorise it, I firstly check for divisibility by 2, then by 3, then by 5, then by 11.(easy to do). If nothing is found then I recall if that number is actually contained inside my 70-number ‘special composite’ list. If not, then it’s prime.

For 4-digit numbers and above, the Eratosthenes sieve is very useful, and also important to check for div(n) only until root(n), e.g. if you see 2501 you only check 7, 13, 17, 19, 23, 29, 31, 37, 41, 43, and 47.

In MCWC-2010 we were asked about 5-digit number factorisation in one of the surprise tasks:
http://www.recordholders.org/downloads/worldcup/tasks-2010/tasks2010.pdf
I did not know many factorization methods back then so I didn’t do my best in that competition. Also it was one the last tasks during MCWC so I was somewhat tired to check for so many divisibility criteria. The surprise task was 10 minutes for about 20 numbers. So, we were supposed to factorise each of the 5-digit numbers in about 30 seconds probably. That was a tough nut to crack. Anyway. Jerry Newport from Tuckson,USA won that primes’ task. I think Mr. Newport and Mr. Bouman have memorised all the primes up to 10,000, which of course helps a lot.

Also, recently my friend Robert Fountain and his UK team won the Chinese Brain show when he identified a 5-digit code that was a prime number. That was great feat indeed. Nice to see that this show has probably seen by millions of people in China already.

Nodas

P.S (Nov.'15):Broken link of MCWC pdf updated,due to new server transfer

1 Like