Skip to content

CarmichaelNumbers ​

The Carmichael numbers 561,1105,1729,…561, 1105, 1729, … -- composite Fermat pseudoprimes to every coprime base -- as a lazy indexed collection.

CarmichaelNumbersthe composite nn satisfying Korselt's criterion, an infinite indexed collection.

Domain: Collections

Details
  • A lazy indexed collection: Count(CarmichaelNumbers)=+∞Count(CarmichaelNumbers) = +\infty (Alford–Granville–Pomerance, 1994), and AtAt unranks the kk-th by scanning forward, testing Korselt's criterion -- nn squarefree, and (p−1)∣(n−1)(p-1) \mid (n-1) for every prime p∣np \mid n -- which is equivalent to passing the Fermat test an−1≡1(modn)a^{n-1} \equiv 1 \pmod n for every aa coprime to nn.
  • OEIS A002997. 561=3⋅11⋅17561 = 3 \cdot 11 \cdot 17 is the smallest, found by Korselt in 1899 (four years before Carmichael's first published example).
  • Membership goes through Element: Element(561,CarmichaelNumbers)Element(561, CarmichaelNumbers) is true, Element(560,CarmichaelNumbers)Element(560, CarmichaelNumbers) is false.

Enumeration

Examples

1 more kept as data, checked against the oracles
Properties #

561 is the smallest Carmichael number

live ↗
In561∈CarmichaelNumbers561∈\mathrm{CarmichaelNumbers}OutTrue\mathrm{True}
live ↗
In560∈CarmichaelNumbers560∈\mathrm{CarmichaelNumbers}OutFalse\mathrm{False}
About
Examples3
CrosswalkOEISmathlib4

See also: Count, At, Element, PrimeNumbers