View Single Post
Old 2020-08-18, 22:15   #8
T.Rex
 
T.Rex's Avatar
 
Feb 2004
France

2×461 Posts
Default

Let's also note that the product of all s:
for i=1 to q-2, when p==5 mod 6, equals 1
for i=1 to q-1, when p==1 mod 6, equals -1
We have a similar property when using Vbra-Reix, starting at s0=1/4 and q-1 steps.

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);P=W-1,J=q-1;S=W-lift(y);P=1);
if(q==29||q==37,v=0,v=1);S0=Mod(y,W);s=S0;p=Mod(1,W);
for(j=1,J,s=s^2-2;p=p*s);
F=0;Fp=0;if(lift(p)!=P,Fp=1);
if(lift(s)==S,if(v==0,F=1),if(v==1,F=1));if(F==1,if(Fp==1,break,print("pb ",F," ",Fp," ",p))));if(F==0&&Fp==0,print(x," OK"))}


T(1025412242452)
1025412242452 OK
T.Rex is offline   Reply With Quote