Documentation

Mathlib.NumberTheory.CarmichaelNumber

Carmichael numbers #

This file defines Carmichael numbers and proves Korselt's criterion about them.

Main definitions #

Main results #

TODO #

References #

https://en.wikipedia.org/wiki/Carmichael_number

We say a natural number n is a Carmichael number if it is greater than 2, composite and for all natural numbers b coprime to n we have n ∣ b ^ (n - 1) - 1.

Equations
Instances For
    theorem Nat.IsCarmichael.two_lt {n : } (h : n.IsCarmichael) :
    2 < n
    theorem Nat.IsCarmichael.zmod_unit_pow_sub_one {n : } (s : (ZMod n)ˣ) (hn : n.IsCarmichael) :
    s ^ (n - 1) = 1
    theorem Nat.IsCarmichael.odd {n : } (h : n.IsCarmichael) :
    Odd n

    A Carmichael number is odd.

    A Carmichael number is squarefree.

    theorem Nat.IsCarmichael.prime_sub_one_dvd {n p : } (h : n.IsCarmichael) (hp : Prime p) (hpn : p n) :
    p - 1 n - 1
    theorem Nat.isCarmichael_iff_korselt {n : } :
    n.IsCarmichael 2 < n ¬Prime n Squarefree n ∀ (p : ), Prime pp np - 1 n - 1

    Korselt's criterion for Carmichael numbers: n is a Carmichael number if and only if it is greater than two, composite, squarefree, and for each prime divisor p of n, we have p - 1 ∣ n - 1.

    Korselt's criterion stated in a form suitable for concrete calculations.

    561 is a Carmichael number.

    1105 is a Carmichael number.