login
A090088
Smallest even pseudoprimes to odd base=2n-1, not necessarily exceeding n. See also A007535 and A090086, A090087.
4
4, 286, 4, 6, 4, 10, 4, 14, 4, 6, 4, 22, 4, 26, 4, 6, 4, 34, 4, 38, 4, 6, 4, 46, 4, 10, 4, 6, 4, 58, 4, 62, 4, 6, 4, 10, 4, 74, 4, 6, 4, 82, 4, 86, 4, 6, 4, 94, 4, 14, 4, 6, 4, 106, 4, 10, 4, 6, 4, 118, 4, 122, 4, 6, 4, 10, 4, 134, 4, 6, 4, 142, 4, 146, 4, 6, 4, 14, 4, 158, 4, 6, 4, 166, 4, 10
OFFSET
1,1
COMMENTS
For an even base there are no even pseudoprimes.
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