20200207, 16:26  #34 
"Jeppe"
Jan 2016
Denmark
11^{2} Posts 
forprime(p=2,2^(67/2),(2^671)%p==0&&return(p))
(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 presieved. 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^671)%p==0&&return(p)) Any slower? /JeppeSN 
20200207, 16:38  #35 
Undefined
"The unspeakable one"
Jun 2006
My evil lair
3×1,847 Posts 

20200208, 02:59  #36 
Aug 2006
13346_{8} Posts 
There is a glorious algorithm proudly posted on Stack Overflow:
Code:
isPrime(testNum) { if ( testNum <= 1 ) return false; for ( primeFactor = 2; primeFactor < testNum; primeFactor++ ) if ( isPrime(primeFactor) ) if ( testNum % primeFactor == 0 ) return false; return true; } 
20200208, 03:49  #37  
"Ben"
Feb 2007
5×653 Posts 
Quote:
[edit] 2731988490 calls to prove 127 prime. Last fiddled with by bsquared on 20200208 at 04:54 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Got an email from prof. Keller  ET_  FermatSearch  2  20161103 17:00 
big factor  lfm  Data  15  20100330 21:18 
New factor  fivemack  ElevenSmooth  4  20080507 19:28 
Prime 95 + BSOD issues Win xp Prof sp2  matt00926  Hardware  3  20050316 00:15 
Shortest time to complete a 2^67 trial factor (no factor)  dsouza123  Software  12  20030821 18:38 