Carmichael Number Sequence Generator
Generate Carmichael numbers using Korselt's criterion. Find pseudoprimes that satisfy Fermat's little theorem for all coprime bases.
| # | Carmichael Number | Prime Factorization | Digits |
|---|
About
Carmichael numbers are composite integers n that satisfy an−1 ≡ 1 (mod n) for every integer a coprime to n. They are the absolute Fermat pseudoprimes and represent a direct threat to any primality test relying solely on Fermat's little theorem. The smallest is 561 = 3 × 11 × 17, discovered by Robert Carmichael in 1910. Alford, Granville, and Pomerance proved in 1994 that infinitely many exist. Their density up to x is approximately x2⁄7, making them sparse but never absent.
This generator applies Korselt's criterion: n is Carmichael if and only if n is square-free and for every prime factor p of n, (p − 1) divides (n − 1). This algebraic test avoids the exponential cost of checking all coprime bases. Note: computation time grows substantially beyond 108 due to the factorization step required for each odd composite candidate.
Formulas
A composite integer n is a Carmichael number if it passes the Fermat primality test for all bases coprime to it. The direct definition states:
Testing every base is computationally infeasible. Instead, this generator uses Korselt's criterion (1899), which provides an equivalent algebraic characterization:
The algorithm proceeds in three stages for each candidate n:
2. Check square-free: all prime exponents = 1
3. Check divisibility: (n − 1) mod (pi − 1) = 0 for all i
Where n is the candidate composite number, p represents each distinct prime factor of n, and the notation (p − 1) | (n − 1) means "p − 1 divides n − 1". Candidates are restricted to odd numbers with at least 3 prime factors, since all Carmichael numbers are odd and have ≥ 3 prime factors.
Reference Data
| # | Carmichael Number | Prime Factorization | Number of Factors | Digits |
|---|---|---|---|---|
| 1 | 561 | 3 × 11 × 17 | 3 | 3 |
| 2 | 1105 | 5 × 13 × 17 | 3 | 4 |
| 3 | 1729 | 7 × 13 × 19 | 3 | 4 |
| 4 | 2465 | 5 × 17 × 29 | 3 | 4 |
| 5 | 2821 | 7 × 13 × 31 | 3 | 4 |
| 6 | 6601 | 7 × 23 × 41 | 3 | 4 |
| 7 | 8911 | 7 × 19 × 67 | 3 | 4 |
| 8 | 10585 | 5 × 29 × 73 | 3 | 5 |
| 9 | 15841 | 7 × 31 × 73 | 3 | 5 |
| 10 | 29341 | 13 × 37 × 61 | 3 | 5 |
| 11 | 41041 | 7 × 11 × 13 × 41 | 4 | 5 |
| 12 | 46657 | 13 × 37 × 97 | 3 | 5 |
| 13 | 52633 | 7 × 73 × 103 | 3 | 5 |
| 14 | 62745 | 3 × 5 × 47 × 89 | 4 | 5 |
| 15 | 63973 | 7 × 13 × 19 × 37 | 4 | 5 |
| 16 | 75361 | 11 × 13 × 17 × 31 | 4 | 5 |
| 17 | 101101 | 7 × 11 × 13 × 101 | 4 | 6 |
| 18 | 115921 | 13 × 37 × 241 | 3 | 6 |
| 19 | 126217 | 7 × 13 × 19 × 73 | 4 | 6 |
| 20 | 162401 | 17 × 41 × 233 | 3 | 6 |
| 21 | 172081 | 7 × 13 × 31 × 61 | 4 | 6 |
| 22 | 188461 | 7 × 13 × 19 × 109 | 4 | 6 |
| 23 | 252601 | 41 × 61 × 101 | 3 | 6 |
| 24 | 278545 | 5 × 17 × 29 × 113 | 4 | 6 |
| 25 | 294409 | 37 × 73 × 109 | 3 | 6 |