OFFSET
1,1
COMMENTS
Computed terms are prime. Is this a possible primality test or are there pseudo primes? Terms are of the form 8k+1.
The Fermat number F(5) = A000215(5) = 4294967297 = 641*6700417 is the smallest composite counterexample. - Hugo Pfoertner, Sep 26 2020
MATHEMATICA
Select[Range[3, 10^6, 2], PowerMod[2, (# - 1)/2, #*(# - 2)] == 1 &] (* Amiram Eldar, Sep 26 2020 *)
PROG
(PARI) is(n) = n%2 && n>=3 && Mod(2, n*(n-2))^((n-1)/2) == 1
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 26 2020
STATUS
approved