login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A354694
Least Euler pseudoprime to base 2 through base prime(n).
1
341, 1729, 1729, 46657, 46657, 162401, 399001, 399001, 399001, 399001, 488881, 3057601, 3057601, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 3828001, 17098369, 17098369, 17098369, 17098369, 17236801, 17236801
OFFSET
1,1
COMMENTS
a(n) is coprime to A002110(n).
LINKS
Eric Weisstein's World of Mathematics, Euler Pseudoprime.
PROG
(PARI) a(n) = my(b, m, p=factorback(primes(n))); forcomposite(k=9, oo, if(gcd(k, p)==1, b=2; while((m=Mod(b, k)^(k\2)) == 1 || m == k-1, b++); if(b>prime(n), return(k))));
CROSSREFS
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Jun 04 2022
STATUS
approved