20180105, 19:41  #199  
Feb 2017
3×5×11 Posts 
Quote:
Post #60 

20180105, 19:50  #200  
Feb 2017
245_{8} Posts 
Quote:
Thanks for the link....the way things are going, soon I am going to become very math literate, and as a consequence, much more of a gentleman and a scholar! 

20180105, 19:54  #201  
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
9,433 Posts 
Quote:
Quote:
Every 2^p1 will be called prime by this method. You could just as well use this test in its equivalent form:Input: 2^p1. Return: prime! That is why nobody uses 2PRP method on Mersenne numbers. You get no new information. You run some calculation for some time and get a result: prime! My great test is so much better: Input: 2^p1. Return: prime! Do you understand? Or do you need this repeated to you by five more people? They will! 

20180105, 19:56  #202 
Feb 2012
Prague, Czech Republ
253_{8} Posts 
That's not Pari code, that's Go code. No wonder I was not able to find it.
However, your interpretation of the results is mistaken. The "algorithm" simply clasified every single candidate exponent in the range tested (below 10.000 BTW, not 1.000.000) as a probable prime, ie. the code demonstrated it's completely useles. However, the side effect is that such "test" really has no false negatives, admitted. Crosspoted with #201 above. Last fiddled with by jnml on 20180105 at 19:58 Reason: s/positives/negatives/ 
20180105, 20:01  #203 
"Forget I exist"
Jul 2009
Dumbassville
20300_{8} Posts 

20180105, 20:02  #204  
Feb 2017
A5_{16} Posts 
Quote:
Regards 

20180105, 20:05  #205  
Feb 2017
3×5×11 Posts 
Quote:


20180105, 21:32  #206  
Feb 2017
3×5×11 Posts 
Quote:
The algorithm does not return "positive" for all mersenne numbers 2^n1 Algorithm: 2^n1 mod (n+2) = (n+1)/2...if true (n+2) is prime, else composite, barring false positives :( Check n = 5, 7, 9, 11 & 13...checking primality for (n+2) n=05........2^n1 mod (n+2) = 0031 mod 07 = 03 ........= (n+1)/2..........True, hence (n+2) is Prime n=07........2^n1 mod (n+2) = 0127 mod 09 = 01 ........<> (n+1)/2........False, hence (n+2) is Composite n=09........2^n1 mod (n+2) = 0511 mod 11 = 05 ........= (n+1)/2..........True, hence (n+2) is Prime n=11........2^n1 mod (n+2) = 2047 mod 13 = 06 ........= (n+1)/2..........True, hence (n+2) is Prime n=13........2^n1 mod (n+2) = 8191 mod 15 = 01 ........= (n+1)/2..........False, hence (n+2) is Composite Last fiddled with by gophne on 20180105 at 21:47 Reason: correction to logic 

20180105, 21:36  #207  
"Forget I exist"
Jul 2009
Dumbassville
20300_{8} Posts 
Quote:
Last fiddled with by science_man_88 on 20180105 at 21:45 

20180105, 22:07  #208  
Aug 2006
3^{2}·5·7·19 Posts 
Quote:
2^n1 mod (n+2) =? (n+1)/2 2^2045  1 mod 2047 =? 1023 1023 = 1023 but note that 2047 = 23*89. 

20180105, 22:13  #209 
Feb 2017
3×5×11 Posts 
Hi science_man _88
Sorry "11" was a logic error, I corrected my post for that subsequently. Correct. For n=341 and (n+2) =341 returns as a false prime (1st false prime of the algorithm). There are 750 false primes up to 10,000,000 as per SAGEMATH code that I ran...[result subject to confirmation by others] Sorry for the mistake, due to cut & paste. 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
gpuOwL: an OpenCL program for Mersenne primality testing  preda  GpuOwl  2709  20210512 13:37 
GQQ: a "deterministic" "primality" test in O(ln n)^2  Chair Zhuang  Miscellaneous Math  21  20180326 22:33 
AouessareEl HaddouchiEssaaidi "test": "if Mp has no factor, it is prime!"  wildrabbitt  Miscellaneous Math  11  20150306 08:17 
"New primality proving test from Alex Petrov"  ewmayer  Math  11  20070423 19:07 
P1 B1/B2 selection with "Test=" vs "Pfactor="  James Heinrich  Software  2  20050319 21:58 