OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Karsten Meyer, Tabelle Pseudoprimzahlen (15-4999)
Karsten Meyer, Rexx program
Eric W. Weisstein, MathWorld: Euler Pseudoprime
MAPLE
isEulPSP := proc(n, b) if isprime(n) then false; else m := modp(b &^ ((n-1)/2), n) ; if m= 1 or m = n-1 then true; else false; end if; end if; end proc:
isA181781 := proc(n) for b from 2 to n-2 do if isEulPSP(n, b) then return true; end if; end do: return false; end proc:
for n from 3 to 800 do if isA181781(n) then printf("%d, ", n) ; end if; end do: # R. J. Mathar, May 30 2011
MATHEMATICA
fQ[n_?PrimeQ, b_] = False; fQ[n_, b_] := Block[{p = PowerMod[b, (n - 1)/2, n]}, p == Mod[1, n] || p == Mod[-1, n]]; gQ[n_] := AnyTrue[Range[2, n - 2], fQ[n, #] &]; Select[2 Range[172] + 1, gQ] (* Michael De Vlieger, Sep 09 2015, after Jean-François Alcover at A006970, Version 10 *)
PROG
(See Rexx program in Links.)
CROSSREFS
KEYWORD
nonn
AUTHOR
Karsten Meyer, Nov 12 2010
EXTENSIONS
Definition corrected by Max Alekseyev, Nov 12 2010
Edited definition to be consistent with OEIS style. - N. J. A. Sloane, Nov 13 2010
STATUS
approved