View Single Post
Old 2019-09-29, 06:22   #12
CRGreathouse
 
CRGreathouse's Avatar
 
Aug 2006

133468 Posts
Default

This is the test code I used while composing the above posts to generate numbers of the OP's form; I wonder if it's similar to your code, axn?
Code:
baih(N,P=N\3)=
{
  my(p,lower,upper,k,q);
  if(P>=N/2,error("Need p small"));
  while(p%3<2,
    p=randomprime([2^(P-1),2^P-1])
  );
  lower=ceil((2^(N-1)/p-3)/(p-1));
  upper=(2^N\p-3)\(p-1);
  while(q<1,
    k=random(upper-lower)+lower;
    q=k*(p-1)+3;
    if(p*q%4==1||!ispseudoprime(q),q=0)
    );
  \\print(p);
  p*q;
}
baih(3068)
CRGreathouse is offline   Reply With Quote