OFFSET
0,1
COMMENTS
For an even base there are no even pseudoprimes.
Conjecture: There are infinitely many even pseudoprimes in every odd base.
Records: 4, 286, 16806, 526974, 815866, 838246, ..., and they occur at indices: 0, 1, 3, 21, 503, 691, ...
LINKS
Eric Chen, Table of n, a(n) for n = 0..999 (a(0) corrected by Georg Fischer, Jan 20 2019)
Eric Weisstein's World of Mathematics, Fermat pseudoprime
Wikipedia, Fermat pseudoprime
MATHEMATICA
f[n_] := Block[{k = 2 * n + 2}, While[PrimeQ[k] || OddQ[k] || PowerMod[2 * n + 1, k - 1, k] != 1, k++ ]; k]; Table[ f[n], {n, 0, 60}]
PROG
(PARI) a(n) = for(k=n+1, 2^24, if(!isprime(2*k) && Mod(2*n+1, 2*k)^(2*k-1) == Mod(1, 2*k), return(2*k)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Chen, May 17 2015
STATUS
approved