mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Wagstaff PRP Search (https://www.mersenneforum.org/forumdisplay.php?f=102)
-   -   A new Wagstaff primality test ? (https://www.mersenneforum.org/showthread.php?t=27352)

JCoveiro 2022-02-09 01:28

more wagstaff simplifications
 
t3(q)={w=(2^q+1)/3;s=4;for(i=1,q,s=(s^2-2)%(6*w););if(s==14||s==194,print1(q","))}
forprime(x=1,100000,t3(x))

[CODE]3,5,7,11,13,17,19,23,31,43,61,79,101,127,167,191,199,313,347,701,1709,2617,3539,[/CODE]

JCoveiro 2022-02-09 01:54

more simplifications (2)
 
t3(q)={w=(2^q+1)/3;s=4;for(i=2,q,s=(s^2-2)%(6*w));if(ispowerful(s+2),print1(q","))}
forprime(x=1,1000,t3(x))

[CODE]3,5,7,11,13,17,19,23,31,43,61,79,101,127,167,191,199,313,347,701,[/CODE]

or

t3(q)={w=(2^q+1)/3;s=4;for(i=2,q,s=(s^2-2)%(6*w));if(issquare(s+2),print1(q","))}
forprime(x=1,1000,t3(x))

[CODE]3,5,7,11,13,17,19,23,31,43,61,79,101,127,167,191,199,313,347,701,[/CODE]


All times are UTC. The time now is 14:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.