OFFSET
1,1
REFERENCES
Allan Cunningham, Haupt-exponents of 2, The Quarterly Journal of Pure and Applied Mathematics, Vol. 37 (1906), pp. 122-145.
PROG
(Magma) [p: p in PrimesUpTo(1709) | #Factorization(p-1) ge 2 and Modexp(2, Truncate((p-1)/Factorization(p-1)[2][1]), p) eq 1];
(PARI) forprime(p=2, 1709, v=Vec(factor(p-1))[1]; if(#v>1, t=0; e=v[2]; x=floor(p^(1/e))+1; until(x==p||t==2, if(Mod(x, p)^e==2, t++); x++); if(t==2, print1(p, ", "))));
(PARI) isok(p) = my(v=Vec(factor(p-1))[1]); isprime(p) && #v>1 && Mod(2, p)^((p-1)/v[2])==1;
CROSSREFS
KEYWORD
nonn
AUTHOR
Arkadiusz Wesolowski, Jul 15 2023
STATUS
approved