OFFSET
1,1
COMMENTS
For an even base there are no even pseudoprimes.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16520
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000
FORMULA
a(n) = Min_{x=even number; (-1 + n^(x-1)) mod x = 0}.
EXAMPLE
n=2, 2n-2=3 as base, smallest relevant power is -1+2^(286-1) which is divisible by 286.
MATHEMATICA
Array[Block[{k = 4}, While[PowerMod[2 # - 1, k - 1, k] != 1, k += 2]; k] &, 86] (* Michael De Vlieger, Nov 13 2018 *)
PROG
(PARI) A090088(n) = { forstep(k=4, oo, 2, if(1==(Mod(n+n-1, k)^(k-1)), return (k)); ); } \\ (After code in A090086) - Antti Karttunen, Nov 10 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 25 2003
STATUS
approved