OFFSET
1,1
COMMENTS
Counterexamples (pseudoprimes) to the hypothesis that this congruence is sufficient to prove that an odd number is prime.
Compare with Proth's theorem.
MATHEMATICA
Select[Range[1, 2.5*10^6, 2], CompositeQ[#] && PowerMod[2, (# - 1)/2, #] == # - 1 &] (* Amiram Eldar, Aug 19 2022 *)
PROG
(PARI) forstep(k=3, 10^8, 2, isprime(k)&&next(); Mod(2, k)^((k-1)/2)==-1&&print1(k, ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeppe Stig Nielsen, Aug 19 2022
STATUS
approved