OFFSET
19,1
LINKS
Richard Pinch, Tables relating to Carmichael numbers.
Andrew Shallue and Jonathan Webster, Algorithms for Carmichael numbers, arXiv:2506.09903 [math.NT], 2025-2026.
EXAMPLE
There are two Carmichael numbers less than 10^19 that have 12 prime factors: 7156857700403137441 = 11 * 13 * 17 * 19 * 29 * 37 * 41 * 43 * 61 * 97 * 109 * 127 and 9219669366496075201 = 11 * 13 * 17 * 19 * 29 * 37 * 41 * 61 * 71 * 73 * 113 * 127. Therefore, a(19) = 2.
PROG
(PARI)
carmichael_count(A, B, k) = A=max(A, vecprod(primes(k+1))\2); local(f); (f = (m, l, lo, k) -> my(count=0); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(count)); 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((m*p-1)%(p-1) == 0 && isprime(p), count++)), forprime(p=lo, hi, if(gcd(m, p-1) == 1, count += f(m*p, lcm(l, p-1), p+1, k-1)))); count); f(1, 1, 3, k);
a(n) = carmichael_count(1, 10^n, 12); \\ Daniel Suteu, Mar 03 2026
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Amiram Eldar, Jan 24 2026
STATUS
approved
