![]() |
![]() |
#12 |
Sep 2002
Database er0rr
5·29·31 Posts |
![]() |
![]() |
![]() |
![]() |
#13 |
Dec 2017
24×3×5 Posts |
![]() |
![]() |
![]() |
![]() |
#14 |
Sep 2002
Database er0rr
5·29·31 Posts |
![]()
I now have a new test to add to the previous 2:
Code:
f(p)=mp=2^p-1;a=Mod(2,mp);for(b=1,p-1,a=a/2+1/a);a==2 f(p)=mp=2^p-1;a=Mod(2,mp);for(b=1,p-1,a=a/2+3/a);a==0 f(p)=mp=2^p-1;a=Mod(2,mp);for(b=1,p-1,a=a/2-1/a);a==0 [new] |
![]() |
![]() |
![]() |
#15 |
Einyen
Dec 2003
Denmark
2·32·191 Posts |
![]()
I do not think I understand them, I do not use Pari/GP.
f(p)=mp=2^p-1;a=Mod(2,mp);for(b=1,p-1,a=a/2+1/a);a==2 You start with a=2 and then you to (p-1) steps: a=(a/2 + 1/a)%Mp where 1/a is the modular inverse mod Mp, and the result after (p-1) steps a==2 for Mersenne primes? What about a/2 when a is odd? is that integer division? |
![]() |
![]() |
![]() |
#16 | |
"Forget I exist"
Jul 2009
Dartmouth NS
100000111000102 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#17 | |
Sep 2002
Database er0rr
106178 Posts |
![]() Quote:
Inverses are usually computed by the "extended Euclidean algorithm" which really slows down "f". Last fiddled with by paulunderwood on 2018-05-02 at 23:47 |
|
![]() |
![]() |
![]() |
#18 | |
Sep 2002
Database er0rr
118F16 Posts |
![]() Quote:
f(p)=wp=2^p+1;a=Mod(2,wp);for(b=1,p-1,a=a/2-1/a);a==-1||a==2 (You have to fiddle with Mod and lift to get a good result for W3.) I have not tested this very far. Last fiddled with by paulunderwood on 2018-05-03 at 00:09 |
|
![]() |
![]() |
![]() |
#19 | |
"Forget I exist"
Jul 2009
Dartmouth NS
20E216 Posts |
![]() Quote:
.......... 2 3 1 4 5 3 6 3 2 3 In other words. Last fiddled with by science_man_88 on 2018-05-03 at 00:07 |
|
![]() |
![]() |
![]() |
#20 | |
Einyen
Dec 2003
Denmark
2×32×191 Posts |
![]() Quote:
So testing all 3 algorithms for all primes up to 11K they finds all Mersenne Primes up to 11213, but that does not prove them. Though it would be weird for them to find so many Mersenne Primes and then fail for higher primes. Last fiddled with by ATH on 2018-05-03 at 00:59 |
|
![]() |
![]() |
![]() |
#21 | |
Sep 2002
Database er0rr
106178 Posts |
![]() Quote:
Or if a is even ">>1", else "<<t", but testing for even is slow in Pari-gp. The hard thing remains computing of 1/s (mod Mp). Last fiddled with by paulunderwood on 2018-05-03 at 03:05 |
|
![]() |
![]() |
![]() |
#22 |
Sep 2002
Database er0rr
5·29·31 Posts |
![]()
Here is another test for Wagstaff (2^p+1)/3:
Code:
f(p)=wp=2^p+1;a=Mod(1/2,wp);for(b=1,p-1,a=a/2-1/a);lift(a*2)%(wp/3)==1 Last fiddled with by paulunderwood on 2018-05-04 at 11:40 |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fulsorials | a1call | Miscellaneous Math | 46 | 2020-08-03 00:31 |
Java applet alternative | a1call | Programming | 19 | 2019-11-08 22:31 |
alternative ( points of view ) | cmd | cmd | 51 | 2019-09-28 14:56 |
CEMPLLA: An alternative to GIMPS ? | CEMPLLA Author | Data | 233 | 2019-06-28 17:18 |
free alternative to EasyFit? | ixfd64 | Software | 1 | 2008-04-26 21:28 |