← Back

Lucas Theorem

Compute binomial coefficients mod prime using base-p digits.

mathnumber-theorycombinatoricsUpdated 2025-09-01

Representation

  • n = Σ n_i p^i
  • k = Σ k_i p^i

Formula

  • C(n,k) ≡ Π C(n_i,k_i) (mod p)