OFFSET
3,1
COMMENTS
If k is an odd number with at least 3 distinct prime factors, then the number of bases in (Z/kZ)^* in which k is a strong pseudoprime at most phi(k)/2^(omega(k)-1), where equality holds if and only if k is a Carmichael number with only prime factors congruent to 3 modulo 4 (A329468). See A329759 for a proof.
Data copied from A329468.
LINKS
PROG
(PARI)
carmichael_3mod4(A, B, k) = A=max(A, vecprod(primes(k+1))\2); local f; (f = (m, l, lo, k) -> my(list=List()); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(list)); if(k==1, lo=max(lo, ceil(A/m)); my(t=lift(1/Mod(m, l))); while(t < lo, t += l); forstep(p=t, hi, l, if(p%4 == 3 && (m*p-1) % (p-1) == 0 && isprime(p), listput(list, m*p))), forprime(p=lo, hi, if(p%4 == 3 && gcd(m, p-1) == 1, list=concat(list, f(m*p, lcm(l, p-1), p+1, k-1))))); list); vecsort(Vec(f(1, 1, 3, k)));
a(n) = if(n < 3, return()); my(x=1, y=2*x); while(1, my(v=carmichael_3mod4(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Mar 17 2026
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Jianing Song, Mar 11 2026
EXTENSIONS
a(11)-a(12) from Amiram Eldar, Mar 13 2026
a(13) from Daniel Suteu, Mar 17 2026
STATUS
approved
