View Single Post
Old 2022-01-11, 21:40   #2
T.Rex
 
T.Rex's Avatar
 
Feb 2004
France

39F16 Posts
Default

The formula for Wagstaff numbers seems OK.

With Pari/gp .

Code:
t(q)={w=(2^q+1)/3;S0=4;print("w: ",w);S=S0;for(i=1,q-1,S=Mod(S^2-2,w));s1=lift(Mod(S-5-9,w));s2=lift(Mod(S-5+9,w));print(s1," ",s2)}

? t(11)
w: 683
665 0

? t(13)
w: 2731
0 18

? t(17)
w: 43691
43673 0

? t(19)
w: 174763
0 18

? t(23)
w: 2796203
2796185 0

? t(29)
w: 178956971           Not prime
59834419 59834437

? t(31)
w: 715827883
0 18

? t(37)
w: 45812984491                  Not prime
24875527143 24875527161

? t(41)
w: 733007751851                 Not prime
634893124730 634893124748

? t(43)
w: 2932031007403
0 18

? t(61)
w: 768614336404564651
0 18
T.Rex is offline   Reply With Quote