login
A326614
Smallest Euler-Jacobi pseudoprime to base n.
2
9, 561, 121, 341, 781, 217, 25, 9, 91, 9, 133, 91, 85, 15, 1687, 15, 9, 25, 9, 21, 221, 21, 169, 25, 217, 9, 121, 9, 15, 49, 15, 25, 545, 33, 9, 35, 9, 39, 133, 39, 21, 451, 21, 9, 481, 9, 65, 49, 25, 49, 25, 51, 9, 55, 9, 55, 25, 57, 15, 481, 15, 9, 529, 9, 33, 65, 33, 25, 35, 69, 9
OFFSET
1,1
COMMENTS
a(n) = 9 for n == 1 or 8 mod 9 (see A056020).
LINKS
MATHEMATICA
ejpspQ[n_, b_] := CoprimeQ[n, b] && CompositeQ[n] && Mod[b^((n - 1)/2) - JacobiSymbol[b, n], n] == 0; leastEJpsp[b_] := Module[{k=9}, While[!ejpspQ[k, b], k+=2]; k]; Array[leastEJpsp, 100] (* Amiram Eldar, Jul 15 2019 *)
PROG
(PARI) isok(k, n) = ((k%2==1) && (gcd(k, n)==1) && Mod(n, k)^((k-1)/2)==kronecker(n, k) && !isprime(k));
a(n) = my(k=2); while (! isok(k, n), k++); k; \\ Michel Marcus, Jul 15 2019
CROSSREFS
Cf. A047713, A048950, A090086 (least Fermat pseudoprime to base n), A298756 (least strong pseudoprime to base n).
Sequence in context: A317347 A357229 A267548 * A007324 A354692 A373882
KEYWORD
nonn
AUTHOR
Richard N. Smith, Jul 14 2019
STATUS
approved