Carmichael number
In number theory, a Carmichael number is a composite number Template:Tmath which in modular arithmetic satisfies the congruence relation:
- <math>b^n\equiv b\pmod{n}</math>
for all integers Template:Tmath.[1] The relation may also be expressed[2] in the form:
- <math>b^{n-1}\equiv 1\pmod{n}</math>
for all integers <math>b</math> that are relatively prime to Template:Tmath. They are infinite in number.[3]
They constitute the comparatively rare instances where the strict converse of Fermat's Little Theorem does not hold. This fact precludes the use of that theorem as an absolute test of primality.[4]
The Carmichael numbers form the subset K1 of the Knödel numbers.
The Carmichael numbers were named after the American mathematician Robert Carmichael by Nicolaas Beeger, in 1950. Øystein Ore had referred to them in 1948 as numbers with the "Fermat property", or "F numbers" for short.[5]
The first few Carmichael numbers are:
- 561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 15841, 29341, 41041, 46657, 52633, 62745, 63973, 75361, 101101, 115921, 126217, 162401, 172081, 188461, 252601, 278545, 294409, 314821 ... (sequence A002997 in the OEIS)
Overview
Fermat's little theorem states that if <math>p</math> is a prime number, then for any integer Template:Tmath, the number <math>b^p-b</math> is an integer multiple of Template:Tmath. Carmichael numbers are composite numbers which have the same property. Carmichael numbers are also called Fermat pseudoprimes or absolute Fermat pseudoprimes. A Carmichael number will pass a Fermat primality test to every base <math>b</math> relatively prime to the number, even though it is not actually prime. This makes tests based on Fermat's Little Theorem less effective than strong probable prime tests such as the Baillie–PSW primality test and the Miller–Rabin primality test.
However, no Carmichael number is either an Euler–Jacobi pseudoprime or a strong pseudoprime to every base relatively prime to it[6] so, in theory, either an Euler or a strong probable prime test could prove that a Carmichael number is, in fact, composite.
Arnault[7] gives a 397-digit Carmichael number <math>N</math> that is a strong pseudoprime to all prime bases less than 307:
- <math>N = p \cdot (313(p - 1) + 1) \cdot (353(p - 1) + 1 )</math>
where
- <math>p = </math> Template:Zwsp
is a 131-digit prime. <math>p</math> is the smallest prime factor of Template:Tmath, so this Carmichael number is also a (not necessarily strong) pseudoprime to all bases less than Template:Tmath.
As numbers become larger, Carmichael numbers become increasingly rare. For example, there are Template:Val Carmichael numbers between 1 and 1021 (approximately one in 50 trillion (Template:Val) numbers).[8]
Korselt's criterion
An alternative and equivalent definition of Carmichael numbers is given by Korselt's criterion.
- Theorem (A. Korselt 1899): A positive composite integer <math>n</math> is a Carmichael number if and only if <math>n</math> is square-free, and for all prime divisors <math>p</math> of Template:Tmath, it is true that Template:Tmath.
It follows from this theorem that all Carmichael numbers are odd, since any even composite number that is square-free (and hence has only one prime factor of two) will have at least one odd prime factor, and thus <math>p-1 \mid n-1</math> results in an even dividing an odd, a contradiction. (The oddness of Carmichael numbers also follows from the fact that <math>-1</math> is a Fermat witness for any even composite number.) From the criterion it also follows that Carmichael numbers are cyclic.[9][10] Additionally, it follows that there are no Carmichael numbers with exactly two prime divisors.
Discovery
The first seven Carmichael numbers, from 561 to 8911, were all found by the Czech mathematician Václav Šimerka in 1885[11] (thus preceding not just Carmichael but also Korselt, although Šimerka did not find anything like Korselt's criterion).[12] His work, published in Czech scientific journal Časopis pro pěstování matematiky a fysiky, however, remained unnoticed.
Korselt was the first who observed the basic properties of Carmichael numbers, but he did not give any examples.
That 561 is a Carmichael number can be seen with Korselt's criterion. The first seven Carmichael numbers are (sequence A002997 in the OEIS):
- <math>~~561 = 3 \cdot 11 \cdot 17 \qquad (2 \mid ~~560;\quad 10 \mid ~~560;\quad 16 \mid ~~560)</math>
- <math>1105 = 5 \cdot 13 \cdot 17 \qquad (4 \mid 1104;\quad 12 \mid 1104;\quad 16 \mid 1104)</math>
- <math>1729 = 7 \cdot 13 \cdot 19 \qquad (6 \mid 1728;\quad 12 \mid 1728;\quad 18 \mid 1728)</math>
- <math>2465 = 5 \cdot 17 \cdot 29 \qquad (4 \mid 2464;\quad 16 \mid 2464;\quad 28 \mid 2464)</math>
- <math>2821 = 7 \cdot 13 \cdot 31 \qquad (6 \mid 2820;\quad 12 \mid 2820;\quad 30 \mid 2820)</math>
- <math>6601 = 7 \cdot 23 \cdot 41 \qquad (6 \mid 6600;\quad 22 \mid 6600;\quad 40 \mid 6600)</math>
- <math>8911 = 7 \cdot 19 \cdot 67 \qquad (6 \mid 8910;\quad 18 \mid 8910;\quad 66 \mid 8910).</math>
In 1910, Carmichael himself[13] also published the smallest such number, 561, and the numbers were later named after him.
Jack Chernick[14] proved a theorem in 1939 which can be used to construct a subset of Carmichael numbers. The number <math>(6k + 1)(12k + 1)(18k + 1)</math> is a Carmichael number if its three factors are all prime. Whether this formula produces an infinite quantity of Carmichael numbers is an open question (though it is implied by Dickson's conjecture).
Paul Erdős heuristically argued there should be infinitely many Carmichael numbers. In 1994, W. R. (Red) Alford, Andrew Granville and Carl Pomerance used a bound on Olson's constant to show that there really do exist infinitely many Carmichael numbers. Specifically, they showed that for sufficiently large Template:Tmath, there are at least <math>n^{2/7}</math> Carmichael numbers less than Template:Tmath.[3]
Thomas Wright proved that if <math>a</math> and <math>m</math> are relatively prime, then there are infinitely many Carmichael numbers in the arithmetic progression Template:Tmath, where Template:Tmath.[15] In 2025, it was shown that any arithmetic progression contains either infinitely many Carmichael numbers or none at all.[16]
It is also known that for any sufficiently large <math>N</math>, there are infinitely many Carmichael numbers with exactly <math>N</math> prime divisors.[17]
In 1992, Löh and Niebuhr found some very large Carmichael numbers, including one with Template:Val factors and over 16 million digits. This has been improved to Template:Val prime factors and Template:Val digits,[18] so the largest known Carmichael number is much greater than the largest known prime.
Properties
Factorizations
Carmichael numbers have at least three prime factors. The first Carmichael numbers with <math>k = 3, 4, 5, \ldots</math> prime factors are (sequence A006931 in the OEIS):
| k | |
|---|---|
| 3 | <math>561 = 3 \cdot 11 \cdot 17\,</math> |
| 4 | <math>41041 = 7 \cdot 11 \cdot 13 \cdot 41\,</math> |
| 5 | <math>825265 = 5 \cdot 7 \cdot 17 \cdot 19 \cdot 73\,</math> |
| 6 | <math>321197185 = 5 \cdot 19 \cdot 23 \cdot 29 \cdot 37 \cdot 137\,</math> |
| 7 | <math>5394826801 = 7 \cdot 13 \cdot 17 \cdot 23 \cdot 31 \cdot 67 \cdot 73\,</math> |
| 8 | <math>232250619601 = 7 \cdot 11 \cdot 13 \cdot 17 \cdot 31 \cdot 37 \cdot 73 \cdot 163\,</math> |
| 9 | <math>9746347772161 = 7 \cdot 11 \cdot 13 \cdot 17 \cdot 19 \cdot 31 \cdot 37 \cdot 41 \cdot 641\,</math> |
The first Carmichael numbers with 4 prime factors are (sequence A074379 in the OEIS):
| i | |
|---|---|
| 1 | <math>41041 = 7 \cdot 11 \cdot 13 \cdot 41\,</math> |
| 2 | <math>62745 = 3 \cdot 5 \cdot 47 \cdot 89\,</math> |
| 3 | <math>63973 = 7 \cdot 13 \cdot 19 \cdot 37\,</math> |
| 4 | <math>75361 = 11 \cdot 13 \cdot 17 \cdot 31\,</math> |
| 5 | <math>101101 = 7 \cdot 11 \cdot 13 \cdot 101\,</math> |
| 6 | <math>126217 = 7 \cdot 13 \cdot 19 \cdot 73\,</math> |
| 7 | <math>172081 = 7 \cdot 13 \cdot 31 \cdot 61\,</math> |
| 8 | <math>188461 = 7 \cdot 13 \cdot 19 \cdot 109\,</math> |
| 9 | <math>278545 = 5 \cdot 17 \cdot 29 \cdot 113\,</math> |
| 10 | <math>340561 = 13 \cdot 17 \cdot 23 \cdot 67\,</math> |
The second Carmichael number (1105) can be expressed as the sum of two squares in more ways than any smaller number. The third Carmichael number (1729) is the Hardy-Ramanujan Number: the smallest number that can be expressed as the sum of two cubes (of positive numbers) in two different ways.
Distribution
Let <math>C(X)</math> denote the number of Carmichael numbers less than or equal to Template:Tmath. The distribution of Carmichael numbers by powers of 10 (sequence A055553 in the OEIS):[8]
| <math>n</math> | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <math>C(10^n)</math> | 0 | 0 | 1 | 7 | 16 | 43 | 105 | 255 | 646 | 1547 | 3605 | 8241 | 19279 | 44706 | 105212 | 246683 | 585355 | 1401644 | 3381806 | 8220777 | 20138200 |
In 1953, Knödel proved the upper bound for some constant Template:Tmath:
- <math>C(X) < X \exp\left({-k_1 \left( \log X \log \log X\right)^\frac{1}{2}}\right)</math>
In 1956, Erdős improved this[19] by showing that for some constant Template:Tmath it holds that
- <math>C(X) < X \exp\left(\frac{-k_2 \log X \log \log \log X}{\log \log X}\right)</math>
He further gave a heuristic argument suggesting that this upper bound should be close to the true growth rate of Template:Tmath.
In the other direction, Alford, Granville and Pomerance proved in 1994[3] that for sufficiently large <math>X</math>,
- <math>C(X) > X^{2/7}.</math>
In 2005, this bound was further improved by Harman[20] to
- <math>C(X) > X^{0.332},</math>
who subsequently improved the exponent to <math>0.33336704>1/3</math>.[21]
Regarding the asymptotic distribution of Carmichael numbers, there have been several conjectures. In 1956, Erdős conjectured that there were <math>X^{1-o(1)}</math> Carmichael numbers for X sufficiently large.[19] In 1981, Pomerance sharpened Erdős' heuristic arguments to conjecture that there are at least
- <math> X \cdot L(X)^{-1 + o(1)} </math>
Carmichael numbers up to Template:Tmath, where Template:Tmath.[22]
However, inside current computational ranges (such as the count of Carmichael numbers performed by Goutier (sequence A055553 in the OEIS) up to <math>10^{22}</math>), these conjectures are not yet borne out by the data; empirically, the exponent is <math> C(X) \approx X^{0.35}</math> for the highest available count (<math>C(X)=\text{49,679,870}</math> for <math>X=10^{22}</math>).
In 2021, Daniel Larsen proved an analogue of Bertrand's postulate for Carmichael numbers first conjectured by Alford, Granville, and Pomerance in 1994.[4][23] Using techniques developed by Yitang Zhang and James Maynard to establish results concerning small gaps between primes, his work yielded the much stronger statement that, for any <math>\delta>0</math> and sufficiently large <math>x</math> (in terms of Template:Tmath), there will always be at least
- <math>\exp{\left(\frac{\log{x}}{(\log \log{x})^{2+\delta}}\right)} </math>
Carmichael numbers between <math>x</math> and
- <math>x+\frac{x}{(\log{x})^{\frac{1}{2+\delta}}}.</math>
Generalizations
The notion of Carmichael number generalizes to a Carmichael ideal in any number field Template:Tmath. For any nonzero prime ideal <math>\mathfrak p</math> in Template:Tmath, we have <math>\alpha^{{\rm N}(\mathfrak p)} \equiv \alpha \bmod {\mathfrak p}</math> for all <math>\alpha</math> in Template:Tmath, where <math>{\rm N}(\mathfrak p)</math> is the norm of the ideal Template:Tmath. (This generalizes Fermat's little theorem, that <math>m^p \equiv m \bmod p</math> for all integers Template:Tmath when Template:Tmath is prime.) Call a nonzero ideal <math>\mathfrak a</math> in <math>{\mathcal O}_K</math> Carmichael if it is not a prime ideal and <math>\alpha^{{\rm N}(\mathfrak a)} \equiv \alpha \bmod {\mathfrak a}</math> for all Template:Tmath, where <math>{\rm N}(\mathfrak a)</math> is the norm of the ideal Template:Tmath. When Template:Tmath is Template:Tmath, the ideal <math>\mathfrak a</math> is principal, and if we let Template:Tmath be its positive generator then the ideal <math>\mathfrak a = (a)</math> is Carmichael exactly when Template:Tmath is a Carmichael number in the usual sense.
When Template:Tmath is larger than the rationals it is easy to write down Carmichael ideals in Template:Tmath: for any prime number Template:Tmath that splits completely in Template:Tmath, the principal ideal <math>p{\mathcal O}_K</math> is a Carmichael ideal. Since infinitely many prime numbers split completely in any number field, there are infinitely many Carmichael ideals in Template:Tmath. For example, if Template:Tmath is any prime number that is 1 mod 4, the ideal Template:Tmath in the Gaussian integers <math>\mathbb Z[i]</math> is a Carmichael ideal.
Both prime and Carmichael numbers satisfy the following equality:
- <math>\gcd \left(\sum_{x=1}^{n-1} x^{n-1}, n\right) = 1.</math>
Lucas–Carmichael number
{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}
A positive composite integer <math>n</math> is a Lucas–Carmichael number if and only if <math>n</math> is square-free, and for all prime divisors <math>p</math> of Template:Tmath, it is true that Template:Tmath.[24] The first Lucas–Carmichael numbers are:
- 399, 935, 2015, 2915, 4991, 5719, 7055, 8855, 12719, 18095, 20705, 20999, 22847, 29315, 31535, 46079, 51359, 60059, 63503, 67199, 73535, 76751, 80189, 81719, 88559, 90287, ... (sequence A006972 in the OEIS)
Quasi–Carmichael number
Quasi–Carmichael numbers are square-free composite numbers Template:Tmath with the property that for every prime factor Template:Tmath of Template:Tmath, Template:Tmath divides Template:Tmath positively with Template:Tmath being any integer besides 0. If Template:Tmath, these are Carmichael numbers, and if Template:Tmath, these are Lucas–Carmichael numbers. The first Quasi–Carmichael numbers are:
- 35, 77, 143, 165, 187, 209, 221, 231, 247, 273, 299, 323, 357, 391, 399, 437, 493, 527, 561, 589, 598, 713, 715, 899, 935, 943, 989, 1015, 1073, 1105, 1147, 1189, 1247, 1271, 1295, 1333, 1517, 1537, 1547, 1591, 1595, 1705, 1729, ... (sequence A257750 in the OEIS)
Knödel number
{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}
An <math>n</math>-Knödel number for a given positive integer <math>n</math> is a composite number <math>m</math> with the property that each Template:Tmath coprime to <math>m</math> satisfies Template:Tmath. The Template:Tmath case are Carmichael numbers.
Higher-order Carmichael numbers
Carmichael numbers can be generalized using concepts of abstract algebra.
Based on generalized Korselt's criterion, Carmichael number of order <math>m</math> can be defined as square-free composite integer <math>n</math>, such that for every prime divisor <math>p</math> of <math>n</math> and any <math>r\leq m</math>, there is a positive integer <math>i</math> such that <math>n\equiv p^i\mod (p^r-1)</math>.
The above definition can be restated as: a square-free composite positive integer <math>n</math> is Carmichael number of order <math>m</math> if and only if the <math>n</math>th-power-raising function <math>p_n</math> is an endomorphism on every <math>(\mathbb{Z}/n\mathbb{Z})</math>-algebra that can be generated as <math>(\mathbb{Z}/n\mathbb{Z})</math>-module by <math>m</math> elements. For <math>m=1</math>, it states that <math>p_n</math> from the ring <math>\mathbb{Z}/n\mathbb{Z}</math> of integers modulo <math>n</math> to itself is the identity function. The identity is the only <math>(\mathbb{Z}/n\mathbb{Z})</math>-algebra endomorphism on <math>\mathbb{Z}/n\mathbb{Z}</math> so we can restate the definition as asking that <math>p_n</math>be an algebra endomorphism of <math>(\mathbb{Z}/n\mathbb{Z})</math>. As above, <math>p_n</math>satisfies the same property whenever <math>n</math> is prime. Carmichael numbers of order <math>m=1</math> are just the ordinary Carmichael numbers.
The <math>n</math>th-power-raising function <math>p_n</math> is also defined on any <math>(\mathbb{Z}/n\mathbb{Z})</math>-algebra <math>\mathbf{A}</math>. A theorem states that <math>n</math> is prime if and only if all such functions <math>p_n</math> are algebra endomorphisms.
An order-2 Carmichael number
According to Howe, <math>17\cdot31\cdot41\cdot43\cdot89\cdot97\cdot167\cdot331=\text{443,372,888,629,441}</math> is a Carmichael number of order 2.[25]
Properties
Korselt's criterion can be generalized to higher-order Carmichael numbers, as shown by Howe.
A heuristic argument, given in the same paper, appears to suggest that there are infinitely many Carmichael numbers of order <math>m</math>, for any <math>m</math>. However, not a single Carmichael number of order 3 or above is known.
Notes
References
- Template:Cite journal
- Template:Cite journal
- Template:Cite journal
- Template:Cite journal
- Template:Cite journal
- Template:Cite book
- Template:Cite journal
External links
- Template:Springer
- Encyclopedia of Mathematics
- Table of Carmichael numbers
- Tables of Carmichael numbers with many prime factors
- Tables of Carmichael numbers below <math>10^{18}</math>
- Template:MathPages
- {{#invoke:Template wrapper|{{#if:|list|wrap}}|_template=cite web
|_exclude=urlname, _debug, id |url = https://mathworld.wolfram.com/{{#if:CarmichaelNumber%7CCarmichaelNumber.html}} |title = Carmichael Number |author = Weisstein, Eric W. |website = MathWorld |access-date = |ref = Template:SfnRef }}
Template:Classes of natural numbers
- ↑ Template:Cite book
- ↑ Template:Cite book
- ↑ 3.0 3.1 3.2 Template:Cite journal
- ↑ 4.0 4.1 {{#invoke:citation/CS1|citation |CitationClass=web }}
- ↑ Template:Cite book
- ↑ Template:Cite journal Lehmer proved that no Carmichael number is an Euler-Jacobi pseudoprime to every base relatively prime to it. He used the term strong pseudoprime, but the terminology has changed since then. Strong pseudoprimes are a subset of Euler-Jacobi pseudoprimes. Therefore, no Carmichael number is a strong pseudoprime to every base relatively prime to it.
- ↑ Template:Cite journal
- ↑ 8.0 8.1 Template:Cite conference
- ↑ Carmichael Multiples of Odd Cyclic Numbers "Any divisor of a Carmichael number must be an odd cyclic number"
- ↑ Proof sketch: If <math>n</math> is square-free but not cyclic, <math>p_i \mid p_j - 1</math> for two prime factors <math>p_i</math> and <math>p_j</math> of Template:Tmath. But if <math>n</math> satisfies Korselt then Template:Tmath, so by transitivity of the "divides" relation Template:Tmath. But <math>p_i</math> is also a factor of Template:Tmath, a contradiction.
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Citation
- ↑ Template:Citation
- ↑ Template:Cite journal
- ↑ 19.0 19.1 Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal
- ↑ Template:Cite journal