the prime power dividing a factorial
In 1808, Legendre showed that the exact power of a prime p dividing n! is
K∑i=1⌊npi⌋ |
where K is the largest power of p being ≤n.
Proof.
If p>n then p doesn’t divide n!, and its power is 0, and the sum
above is
empty. So let the prime p≤n.
For each 1≤i≤K, there are ⌊npi⌋-⌊npi+1⌋ numbers between 1 and
n with
i being the greatest power of p dividing each. So the power of p
dividing n! is
K∑i=1i⋅(⌊npi⌋-⌊npi+1⌋). |
But each ⌊npi⌋,i≥2 in the sum appears with factors i and i-1, so the above sum equals
∑i=1K⌊npi⌋. |
∎
Corollary.
K∑k=1⌊npK⌋=n-δp(n)p-1, |
where δp denotes the sums of digits function in base p.
Proof.
If n<p, then δp(n)=n and ⌊np⌋ is 0=n-δp(n)p-1. So we assume p≤n.
Let nKnK-1⋯n0 be the p-adic representation of n. Then
n-δp(n)p-1 | =K∑k=1nk(k-1∑j=0pj) | |||
=∑0≤j<k≤Kpj.nk | ||||
=(n1+n2p+…+nKpK-1) | ||||
+(n2+n3p+…+nKpK-2) | ||||
⋱ | ||||
+nK | ||||
=K∑k=1⌊npk⌋. |
∎
Title | the prime power dividing a factorial![]() |
---|---|
Canonical name | ThePrimePowerDividingAFactorial |
Date of creation | 2013-03-22 13:22:34 |
Last modified on | 2013-03-22 13:22:34 |
Owner | Thomas Heye (1234) |
Last modified by | Thomas Heye (1234) |
Numerical id | 10 |
Author | Thomas Heye (1234) |
Entry type | Theorem |
Classification | msc 11A51 |