![]() |
![]() |
#23 |
"Forget I exist"
Jul 2009
Dartmouth NS
100000111000102 Posts |
![]()
yeah I'm confused but mostly because I don't see the math of the (Mp-1) part I see how x is easily 0 mod Mp ( both terms use Mp).
|
![]() |
![]() |
![]() |
#24 |
"Forget I exist"
Jul 2009
Dartmouth NS
2·3·23·61 Posts |
![]() Code:
(11:16)>(-Mp^2 + 2*Mp)%(Mp^2-Mp) %232 = Mp |
![]() |
![]() |
![]() |
#25 | |
"Forget I exist"
Jul 2009
Dartmouth NS
100000111000102 Posts |
![]() Quote:
Code:
(12:44)>Mp^2*(p-1) - Mp*(p-2) %1 = (p - 1)*Mp^2 + (-p + 2)*Mp (12:44)>%%(Mp-1) %2 = 1 (12:45)>Mp^2*(p-1) - Mp*(p-2) %3 = (p - 1)*Mp^2 + (-p + 2)*Mp (12:45)>%%(Mp) %4 = 0 (12:45)> |
|
![]() |
![]() |
![]() |
#26 |
"Forget I exist"
Jul 2009
Dartmouth NS
100000111000102 Posts |
![]()
and now the simplification I got the last time is lining up to the same, almost like I didn't have simplify on.
|
![]() |
![]() |
![]() |
#27 | |
Einyen
Dec 2003
Denmark
65528 Posts |
![]() Quote:
x-1 = Mp2*(p-1) - Mp*(p-2) - 1 = Mp2*p - Mp2 - Mp*p + 2*Mp - 1 = (Mp-1) * (Mp*p-Mp+1) I don't know why I couldn't see this before, of course it's Fermat's PRP test :( Last fiddled with by ATH on 2011-05-20 at 16:20 |
|
![]() |
![]() |
![]() |
#28 |
"Bob Silverman"
Nov 2003
North of Boston
11101010100102 Posts |
![]() |
![]() |
![]() |
![]() |
#29 |
Einyen
Dec 2003
Denmark
2·17·101 Posts |
![]()
See the OP. This was meant to be a new primality test for mersenne numbers, not a PRP test, written in an obscure way. I cleaned up the expressions some but missed the last step that showed it was just a Fermat PRP test.
Probably because I was hoping this was a new and interesting primality test and disregarding the logic of how improbable it all was, also because numerically it seemed to work. Last fiddled with by ATH on 2011-05-20 at 17:49 |
![]() |
![]() |
![]() |
#30 | |
"Forget I exist"
Jul 2009
Dartmouth NS
2·3·23·61 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#31 | |
"Bob Silverman"
Nov 2003
North of Boston
750610 Posts |
![]() Quote:
Modular exponentiation is certainly not any easier than LL. Any purported new tests must perform fewer than p multiplications to test M_p, otherwise it is just re-inventing a square wheel. |
|
![]() |
![]() |
![]() |
#32 |
"Forget I exist"
Jul 2009
Dartmouth NS
20E216 Posts |
![]()
so (p-2) squaring + (p-2) subtraction + (p-2) remainder = p multiplication ?
|
![]() |
![]() |
![]() |
#33 |
Aug 2006
5,987 Posts |
![]()
The squarings and modulus you speak of are parts of a single modular squaring (which may not have distinct "squaring" and "reducing" steps). The subtractions are cheap compared to the squarings. Technically, squaring is different from (easier than) multiplication, but at a minimum a test designed to supplant LL can't do more than p full-length multiplications, because those alone would take longer than the LL.
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
(M48) NEW MERSENNE PRIME! LARGEST PRIME NUMBER DISCOVERED! | dabaichi | News | 571 | 2020-10-26 11:02 |
Another way to PRP test Mersenne numbers | paulunderwood | Miscellaneous Math | 18 | 2017-01-26 20:33 |
How do I test if it is a mersenne prime on GIMPS? | spkarra | Math | 21 | 2015-01-23 18:13 |
another mersenne prime test | jocelynl | Math | 8 | 2006-10-20 19:36 |
The 40th known Mersenne prime, 220996011-1 is not PRIME! | illman-q | Miscellaneous Math | 33 | 2004-09-19 05:02 |