Skip to content

Carmichael number

A composite integer that satisfies the Fermat congruence for every integer base, so it systematically imitates prime behavior under the basic Fermat test.

Version
v2 · 2026-09-19 · History
Domain-specific #
3597
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomain
Computational Number Theory → Mathematics

Core Idea

A Carmichael number is a positive composite n such that b^n is congruent to b modulo n for every integer b; equivalently, b^(n-1) is congruent to one for every b coprime to n. Its square-free prime factors satisfy Korselt's divisibility criterion, making every coprime base pass the Fermat congruence even though the number is composite. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

How would you explain it like I'm…

The Sneaky Fake Prime

Some numbers, called primes, can't be split into equal groups except in the boring ways. There's a quick number test that every prime always passes. A Carmichael number is a sneaky number that is not prime but still passes that test every single time, like a fake coin that passes every check with one particular tool.

Numbers That Fool the Test

A prime number can only be divided evenly by 1 and itself. Fermat's test is a quick check that every prime number always passes: you raise some number b to a power and look at the remainder. Most non-prime numbers fail the test for lots of choices of b, which shows they are not prime. A Carmichael number is a non-prime number that passes the test for every b that shares no common factor with it, so the test can never catch it. That is why these numbers matter to people who check whether huge numbers are prime.

Universal Fermat Pseudoprimes

A Carmichael number is a composite (non-prime) positive number n for which b^n ≡ b (mod n) for every integer b, or equivalently b^(n−1) ≡ 1 (mod n) for every b coprime to n. Fermat's little theorem says every prime satisfies this, so Fermat's primality test checks it; Carmichael numbers pass that test for every coprime base despite being composite. Korselt's criterion gives an exact test: n is a Carmichael number if and only if it is composite, square-free (no prime appears twice in its factorization), and for every prime p dividing n, p − 1 divides n − 1. They differ from ordinary Fermat pseudoprimes, which only fool the test for some bases, not all coprime ones.

 

A Carmichael number is a composite positive integer n satisfying b^n ≡ b (mod n) for every integer b, equivalently b^(n−1) ≡ 1 (mod n) for all b with gcd(b, n) = 1. Fermat's little theorem guarantees this congruence for every prime, so Carmichael numbers are composites that pass the Fermat test for every coprime base. Korselt's criterion characterizes them: n is Carmichael exactly when it is composite, square-free, and p − 1 divides n − 1 for each prime divisor p of n. The mechanism is that the multiplicative group modulo each prime factor has order p − 1, so these divisibility conditions force b^(n−1) ≡ 1 modulo every prime factor and hence, by square-freeness and the Chinese remainder theorem, modulo n. This distinguishes them from Fermat pseudoprimes to a particular base, which need only pass for that base. Their existence shows that the Fermat test alone cannot certify primality, motivating stronger tests.

Scope of Application

Carmichael number belongs to computational number theory and is useful where the analyst can specify the typed computational number theory carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, then evaluate n is composite, square-free, and every prime divisor p of n has p minus one dividing n minus one, equivalently the universal Fermat congruence holds. The scope is broad within that domain but bounded by the need for n is composite, square-free, and every prime divisor p of n has p minus one dividing n minus one, equivalently the universal Fermat congruence holds. The entry records a descriptive analytical identity; practical use requires the governing domain's evidence, standards, and safety obligations.

Clarity

The abstraction clarifies a crowded vocabulary by making n is composite, square-free, and every prime divisor p of n has p minus one dividing n minus one, equivalently the universal Fermat congruence holds the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test. A bare label is insufficient because the name Carmichael number can be used for a formal identity, an implementation, or a neighboring result unless carrier and convention are stated.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Carmichael number. Carmichael number compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: the typed computational number theory carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets. Reject examples whose alleged carrier belongs to a different problem.
  2. Lock the constitutive rule. Express n is composite, square-free, and every prime divisor p of n has p minus one dividing n minus one, equivalently the universal Fermat congruence holds independently of one notation or implementation.

Knowledge Transfer

Knowledge transfers strongly among subfields of computational number theory because they reuse the typed computational number theory carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, Its square-free prime factors satisfy Korselt's divisibility criterion, making every coprime base pass the Fermat congruence even though the number is composite., and type the carrier, state every parameter and convention in the definition, test that n is composite, square-free, and every prime divisor p of n has p minus one dividing n minus one, equivalently the universal Fermat congruence holds, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Carmichael numberParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Carmichael numberDOMAINPrime abstraction: Adversarial Signal Imitation — is a kind ofAdversarialSignal ImitationPRIME

Current abstraction Carmichael number Domain-specific

Parents (1) — outgoing typed relations

  • Carmichael number is a kind of Adversarial Signal Imitation Prime

    What makes it its own entry: the domain-specific identity determined by n is composite, square-free, and every prime divisor p of n has p minus one dividing n minus one, equivalently the universal Fermat congruence holds.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Carmichael number sits in a crowded region of the domain-specific corpus (10th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Integer & Divisor Number Theory (45 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25