Thread: A new Wagstaff PRP test ? View Single Post
2021-11-26, 15:13   #5
paulunderwood

Sep 2002
Database er0rr

102728 Posts

Quote:
 Originally Posted by paulunderwood Code: wag(q)=W=(2^q+1)/3;S0=S=Mod((2^(q-2)+1)/3,W);for(i=2,q,S=S^2-2);S==S0;
4*S = (2^q+4)/3 == 1 mod W.

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_{q-1} = X/4^2^(q-1). This will be X if W is 4-PRP -- aren't all Wagstaff numbers? So it remains to show X = 1 mod W iff W is prime.

Last fiddled with by paulunderwood on 2021-11-26 at 15:54