Natural number multiplicity #
This file contains lemmas about the multiplicity function (the maximum prime power dividing a number) when applied to naturals, in particular calculating it for factorials and binomial coefficients.
Multiplicity calculations #
nat.multiplicity_factorial: Legendre's Theorem. The multiplicity ofpinn!isn/p + ... + n/p^bfor anybsuch thatn/p^(b + 1) = 0.nat.multiplicity_factorial_mul: The multiplicity ofpin(p * n)!isnmore than that ofn!.nat.multiplicity_choose: The multiplicity ofpinn.choose kis the number of carries whenkandn - kare added in basep.
Other declarations #
nat.multiplicity_eq_card_pow_dvd: The multiplicity ofminnis the number of positive natural numbersisuch thatm ^ idividesn.nat.multiplicity_two_factorial_lt: The multiplicity of2inn!is strictly less thann.nat.prime.multiplicity_something: Specialization ofmultiplicity.somethingto a prime in the naturals. Avoids having to providep ≠ 1and other trivialities, along with translating betweenprimeandnat.prime.
Tags #
Legendre, p-adic
The multiplicity of m in n is the number of positive natural numbers i such that m ^ i
divides n. This set is expressed by filtering Ico 1 b where b is any bound greater than
log m n.
Legendre's Theorem
The multiplicity of a prime in n! is the sum of the quotients n / p ^ i. This sum is expressed
over the finset Ico 1 b where b is any bound greater than log p n.
The multiplicity of p in (p * (n + 1))! is one more than the sum
of the multiplicities of p in (p * n)! and n + 1.
The multiplicity of p in (p * n)! is n more than that of n!.
A prime power divides n! iff it is at most the sum of the quotients n / p ^ i.
This sum is expressed over the set Ico 1 b where b is any bound greater than log p n
A lower bound on the multiplicity of p in choose n k.