![]() |
|
|
#199 | |
|
Feb 2017
3·5·11 Posts |
Quote:
Post #60 |
|
|
|
|
|
|
#200 | |
|
Feb 2017
A516 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! |
|
|
|
|
|
|
#201 | ||
|
"Serge"
Mar 2008
San Diego, Calif.
32×7×163 Posts |
Quote:
Quote:
Every 2^p-1 will be called prime by this method. You could just as well use this test in its equivalent form:Input: 2^p-1. Return: prime! That is why nobody uses 2-PRP 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^p-1. Return: prime! Do you understand? Or do you need this repeated to you by five more people? They will! |
||
|
|
|
|
|
#202 |
|
Feb 2012
Prague, Czech Republ
110010102 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 2018-01-05 at 19:58 Reason: s/positives/negatives/ |
|
|
|
|
|
#203 |
|
"Forget I exist"
Jul 2009
Dartmouth NS
846110 Posts |
|
|
|
|
|
|
#204 | |
|
Feb 2017
3×5×11 Posts |
Quote:
Regards |
|
|
|
|
|
|
#205 | |
|
Feb 2017
2458 Posts |
Quote:
|
|
|
|
|
|
|
#206 | |
|
Feb 2017
A516 Posts |
Quote:
The algorithm does not return "positive" for all mersenne numbers 2^n-1 Algorithm: 2^n-1 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^n-1 mod (n+2) = 0031 mod 07 = 03 ........= (n+1)/2..........True, hence (n+2) is Prime n=07........2^n-1 mod (n+2) = 0127 mod 09 = 01 ........<> (n+1)/2........False, hence (n+2) is Composite n=09........2^n-1 mod (n+2) = 0511 mod 11 = 05 ........= (n+1)/2..........True, hence (n+2) is Prime n=11........2^n-1 mod (n+2) = 2047 mod 13 = 06 ........= (n+1)/2..........True, hence (n+2) is Prime n=13........2^n-1 mod (n+2) = 8191 mod 15 = 01 ........= (n+1)/2..........False, hence (n+2) is Composite Last fiddled with by gophne on 2018-01-05 at 21:47 Reason: correction to logic |
|
|
|
|
|
|
#207 | |
|
"Forget I exist"
Jul 2009
Dartmouth NS
8,461 Posts |
Quote:
Last fiddled with by science_man_88 on 2018-01-05 at 21:45 |
|
|
|
|
|
|
#208 | |
|
Aug 2006
135448 Posts |
Quote:
2^n-1 mod (n+2) =? (n+1)/2 2^2045 - 1 mod 2047 =? 1023 1023 = 1023 but note that 2047 = 23*89. |
|
|
|
|
|
|
#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. |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| gpuOwL: an OpenCL program for Mersenne primality testing | preda | GpuOwl | 2938 | 2023-06-30 14:04 |
| GQQ: a "deterministic" "primality" test in O(ln n)^2 | Chair Zhuang | Miscellaneous Math | 21 | 2018-03-26 22:33 |
| Aouessare-El Haddouchi-Essaaidi "test": "if Mp has no factor, it is prime!" | wildrabbitt | Miscellaneous Math | 11 | 2015-03-06 08:17 |
| "New primality proving test from Alex Petrov" | ewmayer | Math | 11 | 2007-04-23 19:07 |
| P-1 B1/B2 selection with "Test=" vs "Pfactor=" | James Heinrich | Software | 2 | 2005-03-19 21:58 |