Thread: Another Wagstaff PRP Test View Single Post
2020-08-18, 18:18   #6
T.Rex

Feb 2004
France

16328 Posts

Quote:
 Originally Posted by paulunderwood Here are tests for Wagstaff (2^p+1)/3: If p==1 mod 6: Code: w1(p)=s=Mod(4,(2^p+1)/3);for(k=1,p-2,s=s^2-2);s==4 If p==5 mod 6: Code: w5(p)=s=Mod(4,(2^p+1)/3);for(k=1,p-1,s=s^2-2);s==-4 Can you prove or disprove either of these?
This holds also when 4 is replaced by: 52, 724, 10084, 140452, 1956244, or 27246964 .

Found by means of (Pari/gp):

L = [5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 61, 79, 101, 127, 167, 191, 199, 313, 347, 701, 1709, 2617, 3539]

T(x)={for(i=1,length(L),q=L[i];m=q%6;W=(2^q+1)/3;y=Mod(x,W);
if(m==1,J=q-2;S=lift(y),J=q-1;S=W-lift(y));
if(q==29||q==37,v=0,v=1);
S0=Mod(y,W);s=S0;for(j=1,J,s=s^2-2);
F=0;if(lift(S)==s,if(v==0,F=1),if(v==1,F=1));if(F==1,break));
if(F==0,print(x," OK"))}

for(i=2,30000000,T(i))
4 OK
52 OK
724 OK
10084 OK
140452 OK
1956244 OK
27246964 OK

And we have:
52 = 14*4 -4
724 = 14*52 -4
10084 = 14*724 -52
140452 = 14*10084 -724
1956244 = 14*140452 -10084
27246964 = 14*1956244 -140452
379501252
5285770564
...
which can be easily built by:
a=4;b=4;for(i=3,20,a=14*b-a;print(a);b=14*a-b;print(b))
52
724
10084
140452
1956244
27246964
379501252
5285770564
73621286644
1025412242452
...........

Does it help?