20211125, 17:46  #1 
Mar 2021
France
2·3^{2} Posts 
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 :) 
20211125, 18:41  #2 
"Robert Gerbicz"
Oct 2005
Hungary
1,531 Posts 

20211126, 05:21  #3  
Sep 2002
Database er0rr
3×1,327 Posts 
Quote:
You might write the code as: Code:
wag(q)=W=(2^q+1)/3;S0=S=Mod((2^(q2)+1)/3,W);for(i=2,q,S=S^22);S==S0; Last fiddled with by paulunderwood on 20211126 at 08:20 

20211126, 13:12  #4 
Mar 2021
France
2×3^{2} Posts 
Thanks for your reply :)
Unfortunately, I'm not a mathematician so I think it could be impossible for me to prove it. I try to understand the proof of the LucasLehmer test and trying to transpose it with Wagstaff primes but I don't understand completly the LucasLehmer test. So trying to find a proof for Wagstaff primes is not possible for me I guess. 
20211126, 15:13  #5  
Sep 2002
Database er0rr
3·1,327 Posts 
Quote:
So S = 1/4 mod W Therefore S0 = 1/4 S1 = (1/4)^2  2 = 31/16 S2 = (31/16)^2  2 = 449/256 .... S_{q1} = X/4^2^(q1). This will be X if W is 4PRP  aren't all Wagstaff numbers? So it remains to show X = 1 mod W iff W is prime. Last fiddled with by paulunderwood on 20211126 at 15:54 

20211126, 20:47  #6 
Mar 2021
France
2·3^{2} Posts 
I try some new seeds and I found this :
Let Wq=(2^q+1)/3, S0=q^2, and: S(i+1)=Si² (mod Wq) Wq is a prime iff: Sq−1 ≡ S0 (mod Wq) I tried until p<1000 and I found only Wagstaff prime I used this code on Paridroid : T(q)={Wq=(2^q+1)/3;S0=q^2;S=S0;print("q= ",q);for(i=1,q1,S=Mod(S^2,Wq));if(S==S0,print("prime"))} forprime(n=3,1000,T(n)) I don't know if the "2" in the iteration part is important becauses it vanishes here but it seems it works with Mersenne numbers Mq=(2^q1) too And I tried with Fq=(3^q1)/2 with S0=q³ and S(i+1)=Si³ and I found this https://oeis.org/A028491 for the prime numbers Maybe we can extend this for (n^q1)/(n1) and (n^q+1)/(n+1) with S0=q^n and S(i+1)=Si^n but I don't know 
20211126, 21:04  #7  
"Robert Gerbicz"
Oct 2005
Hungary
1531_{10} Posts 
Quote:
There is no known fast tests (at speed of LL test), though there could be! Note that here for example polcyclo(p,2)=2^p1 and we have the LL test for these. This is a same/similar problem to find a test for repunits, (10^p1)/9 because those are polcyclo(p,10). 

20211127, 13:43  #8  
Mar 2021
France
2·3^{2} Posts 
Quote:
forprime(n=3,1050,T(n)) on Pari Gp and I found for q prime : 3, 19, 23, 317, 1031, 3 is obviously wrong but the other prime seems to be ok. I think this test works for (n^p1)/(n1) when p>n (to eliminate 3 for example) but of course this is just an intuition. 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Another Wagstaff PRP Test  paulunderwood  Wagstaff PRP Search  7  20200818 22:15 
I found the primality test, there seems to be no composite numbers that pass the test  sweety439  sweety439  7  20200211 19:49 
500€ Reward for a proof for the Wagstaff primality test conjecture  Tony Reix  Wagstaff PRP Search  7  20131010 01:23 
Wagstaff number primality test?  ixfd64  Math  12  20100105 16:36 
PRIMALITY PROOF for Wagstaff numbers!  AntonVrba  Math  96  20090225 10:37 