Abstract
We revisit the problem of tabulating Carmichael numbers. Carmichael numbers have been tabulated up to \(10^{21}\) using an algorithm of Pinch (Math Comp 61(203):381–391, 1993). In finding all Carmichael numbers with d prime factors, the strategy is to first construct pre-products P with \(d-2\) prime factors, then find primes q and r such that Pqr satisfies the Korselt condition. We follow the same general strategy, but propose an improvement that replaces an inner loop over all integers in a range with a loop over all divisors of an intermediate quantity. This gives an asymptotic improvement in the case where P is small and expands the number of cases that may be accounted as small. In head-to-head timings this new strategy is faster over all pre-products in a range, but is slower on prime pre-products. A hybrid approach is shown to improve even the case of prime pre-products.
Similar content being viewed by others
Data Sharing
Data sharing not applicable to this article as no datasets were generated or analyzed during the current study.
References
Beeger, N.G.W.H.: On composite numbers \(n\) for which \(a^{n-1}\equiv ({\rm mod}\, n)\) for every \(a\) prime to \(n\). Scripta Math. 16, 133–135 (1950)
Carmichael, R.D.: Note on a new number theory function. Bull. Am. Math. Soc. 16(5), 232–238 (1910)
Crandall, R., Pomerance, C.: Prime Numbers. A Computational Perspective, 2nd edn. Springer, New York (2005)
Duparc, H.J.A.: On Carmichael numbers. Simon Stevin 29, 21–24 (1952)
Granville, Andrew, Pomerance, Carl: Two contradictory conjectures concerning Carmichael numbers. Math. Comput. 71(238), 883–908 (2002)
Heath-Brown, D.R.: Carmichael numbers with three prime factors. Hardy-Ramanujan J. 30, 6–12 (2007)
Helfgott, H.A.: An improved sieve of Eratosthenes. Math. Comput. 89(321), 333–350 (2020)
Pinch, R.G.E.: The Carmichael numbers up to \(10^{15}\). Math. Comput. 61(203), 381–391 (1993)
Pinch, R.G.E.: The Carmichael numbers up to \(10^{16}\), (March, 1998). arXiv:math.NT/9803082
Pinch, R.G.E.: The Carmichael numbers up to \(10^{17}\), April (2005). arXiv:math.NT/0504119
Pinch, R.G.E.: The Carmichael numbers up to \(10^{18}\), (April, 2006). arXiv:math.NT/0604376
Pinch, R.G.E.: The Carmichael numbers up to \(10^{21}\), (May, 2007). s369624816.websitehome.co.uk/rgep/p82.pdf
Pomerance, C.: Carmichael numbers. Nieuw Arch. Wisk. (4) 11(3), 199–209 (1993)
Sorenson, J.P.: Two compact incremental prime sieves. LMS J. Comput. Math. 18(1), 675–683 (2015)
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Shallue, A., Webster, J. Tabulating Carmichael numbers \(n = Pqr\) with small P. Res. number theory 8, 84 (2022). https://doi.org/10.1007/s40993-022-00384-z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s40993-022-00384-z