OFFSET
1,6
COMMENTS
a(12) was calculated by Pinch (2000).
a(1)-a(15) were calculated from the b-file by Max Alekseyev at A006935.
a(16) is from Pomerance and Wagstaff (2021, Table 2).
Beeger (1951) proved that there are infinitely many even pseudoprimes, and Li (1996) provided an upper bound for their counts for a sufficiently large limit (see Pomerance and Wagstaff, 2021, p. 54).
REFERENCES
Shuguang Li, On the distribution of even pseudoprimes, unpublished, 1996.
LINKS
N. G. W. H. Beeger, On even numbers m dividing 2^m-2, Amer. Math. Monthly, Vol. 58, No. 8 (1951), pp. 553-555.
Richard G. E. Pinch, The Pseudoprimes up to 10^13, International Algorithmic Number Theory, 4th International Symposium, ANTS-I V Leiden, The Netherlands, 2-7 July 2000, Springer Berlin Heidelberg, 2000, pp. 459-473; ResearchGate link.
Carl Pomerance and Samuel S. Wagstaff, Jr., Some thoughts on pseudoprimes, Bulletin (Académie serbe des sciences et des arts, Classe des sciences mathématiques et naturelles, Sciences mathématiques), Vol. 46 (2021), pp. 53-72; arXiv preprint, arXiv:2103.00679 [math.NT], 2021; JSTOR link; author's link.
EXAMPLE
Below 10^6 there are 2 even pseudoprimes, 161038 and 215326. Therefore a(6) = 2.
PROG
(PARI)
even_fermat_psp(A, B, k, base) = A=max(A, vecprod(primes(k))); local(f); (f = (m, l, lo, k) -> my(list=List()); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(list)); if(k==1, forstep(p=lift(1/Mod(m, l)), hi, l, if(isprimepower(p) && gcd(m*base, p) == 1, my(n=m*p); if(n >= A && (n-1) % znorder(Mod(base, p)) == 0, listput(list, n)))), forprime(p=lo, hi, base%p == 0 && next; my(z=znorder(Mod(base, p))); gcd(m, z) == 1 || next; my(q=p, v=m*p); while(v <= B, list=concat(list, f(v, lcm(l, z), p+1, k-1)); q *= p; Mod(base, q)^z == 1 || break; v *= p))); list); vecsort(Set(f(2, 1, 3, k)));
a(n) = my(N=10^n, count=0); for(k=2, oo, if(vecprod(primes(k)) > N, break); count += #even_fermat_psp(3, N, k, 2)); count; \\ Daniel Suteu, Feb 06 2026
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Amiram Eldar, Jan 24 2026
EXTENSIONS
a(17)-a(18) from Max Alekseyev, Feb 16 2026
STATUS
approved
