Concepts2
∑MathIntermediate
Legendre's Formula
Legendre's formula gives the exponent of a prime p in n! by summing how many multiples of p, p^2, p^3, ... are ≤ n.
#legendre's formula#p-adic valuation#binomial divisibility+10
∑MathIntermediate
Lucas' Theorem
Lucas' Theorem lets you compute C(n, k) modulo a prime p by working digit-by-digit in base p.
#lucas theorem#binomial coefficient modulo p#prime power modulus+12