![]() |
|
|
#12 | |
|
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
100101000001012 Posts |
Quote:
So, for the saving of 1 squaring* you are proposing something that you haven't proved. It can (?) be proven but you didn't demonstrate it. And then it will still be a PRP test, whereas LL test is a primality test at another 0.000001% cost of subtracting 2 at each iteration. Additionally, your code doesn't implement the "square_carefully" for the first and last 30-50 iterations, which could be lead to false positives and negatives for large p values. But P95 likely does. P.S. Finally, I can't shake the feeling that solving x2 + x +1 == 0 (mod mp) wasn't a red herring. Where is it used in this test? ____________ * which is a staggering 0.000001% saving! |
|
|
|
|
|
|
#13 |
|
Romulan Interpreter
Jun 2011
Thailand
7×1,373 Posts |
That is the "square root of 9" test (or square root of any quadratic residue). Because m=2^p-1 is 3 (mod 4), then -1 is a non-residue, and therefore one can apply these formulas to get the square root of 9, which, if m is prime, it is either 3 or -3. If m is not prime, you will get other numbers. But the fact that you will get another number is not proved, there are no counterexamples and it is believed to be true, but unless a proof will be available, this is only a PRP test.
|
|
|
|
|
|
#14 |
|
Sep 2002
Database er0rr
373910 Posts |
If you can solve x^2+3 == 0 (mod mp), then mp is prime, I think
|
|
|
|
|
|
#15 | |
|
"Robert Gerbicz"
Oct 2005
Hungary
22×7×53 Posts |
Quote:
|
|
|
|
|
|
|
#16 |
|
"Forget I exist"
Jul 2009
Dumbassville
203008 Posts |
I think you should try remainder math within the mersennes themselves or something like that for a while because that can be related somewhat to the reduced LL test. 2*x^2-1 etc. I do have things I've found about it around this forum and in some PM's I've sent at one point but this might help you think about modular math more ?
|
|
|
|
|
|
#17 | |
|
Sep 2002
Database er0rr
3,739 Posts |
Quote:
Last fiddled with by paulunderwood on 2016-12-31 at 21:48 |
|
|
|
|
|
|
#18 |
|
"Robert Gerbicz"
Oct 2005
Hungary
22·7·53 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Solving for x in Phi(n, x) = 0 (mod p) | carpetpool | Abstract Algebra & Algebraic Number Theory | 1 | 2017-11-04 16:53 |
| Solving systems of equations modulo n | carpetpool | carpetpool | 2 | 2017-02-05 20:40 |
| Solving x^2==1 (mod n) | paulunderwood | Miscellaneous Math | 2 | 2016-12-30 07:34 |
| New Method for Solving Linear Systems | Dubslow | Miscellaneous Math | 24 | 2012-08-24 10:46 |
| solving modular constraints | Joshua2 | Homework Help | 12 | 2010-02-19 22:59 |