View Single Post
Old 2020-02-07, 16:26   #34
JeppeSN's Avatar
Jan 2016

2168 Posts


(PARI/GP) That is the worst method I can imagine. It tries every prime (ignoring the fact that Mersenne divisors have a special form), it even recalculates 2^67 every time without modular optimization. And still you have the answer in less than 5 seconds on a slow machine.

OK, the primes were pre-sieved. If you try all whole numbers, it actually becomes kind of slow (over a one minute on my slow machine): for(p=2,2^(67/2),(2^67-1)%p==0&&return(p))

Any slower?

JeppeSN is offline   Reply With Quote