CarmichaelNumbers
The Carmichael numbers -- composite Fermat pseudoprimes to every coprime base -- as a lazy indexed collection.
OEIS
A002997mathlib4Nat.IsCarmichaelCarmichaelNumbersthe composite satisfying Korselt's criterion, an infinite indexed collection.Details
- A lazy indexed collection: (Alford–Granville–Pomerance, 1994), and unranks the -th by scanning forward, testing Korselt's criterion -- squarefree, and for every prime -- which is equivalent to passing the Fermat test for every coprime to .
- OEIS A002997. is the smallest, found by Korselt in 1899 (four years before Carmichael's first published example).
- Membership goes through Element: is true, is false.
Enumeration
Examples
1 more kept as data, checked against the oracles See also: Count, At, Element, PrimeNumbers