OFFSET
1,1
EXAMPLE
MATHEMATICA
q[p_] := ! PrimeQ[(p - 1)/2] && AllTrue[Range[p], ! PrimeQ[#] || PowerMod[2, p - 1, 3*p*#] > 1 &]; Select[Prime[Range[4, 4000]], q] (* Amiram Eldar, Mar 01 2023 *)
PROG
(PARI) forprime(p=11, 40000, if(!isprime((p-1)/2), forprime(div=5, p-1, if(Mod(2, div)^(p-1)==1, next(2))); print1(p, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Alain Rocchelli, Feb 22 2023
STATUS
approved