A new Wagstaff primality test ?
Let Wq=(2^q+1)/3, S0=(2^(q2)+1)/3, and: Si+1=S2i−2 (mod Wq)
Wq is a prime iff: Sq−1 ≡ S0 (mod Wq)
I used this code on PariDroid (thanks to T.Rex) to check with some prime numbers and it seems it works for 29 and 37 I don't have Sq−1 ≡ S0 (mod Wq)
For exemple q = 29
q=29;Wq=(2^q+1)/3;S0=(2^(q2)+1)/3;print(q," ",Wq);print(Mod(S0,Wq));S=S0;for(i=1,q1,S=Mod(S^22,Wq);print(S))
This is a viable test or not ?
Thanks :)
