OFFSET
1,1
COMMENTS
These numbers can be factored by finding k = 2^((n-1)/2) mod n and taking gcd(k-1, n) and gcd(k+1, n). This is a special case of Kraitchik's method. - Charles R Greathouse IV, Dec 27 2013
Numbers n such that 2^(n-1) == 1 (mod n) and 2^((n-1)/2) != +-1 (mod n). - Thomas Ordowski, Feb 25 2016
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Eric W. Weisstein, MathWorld: Euler Pseudoprime
Eric W. Weisstein, MathWorld: Fermat Pseudoprime
MATHEMATICA
Select[Range[1000000], PowerMod[2, #-1, #] == 1 && ! PowerMod[2, (#-1)/2, #] == 1 && ! PowerMod[2, (#-1)/2, #] == # -1 &]
PROG
(PARI) is(n)=my(k=Mod(2, n)^(n\2)); k^2==1 && n%2 && k!=1 && k!=-1 \\ Charles R Greathouse IV, Dec 27 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
José María Grau Ribas, Jul 02 2013
STATUS
approved