Let $p$ always be a prime. $n! = \prod_{p\leq n}p^{\lfloor \frac{n}{p}\rfloor}$. Then $\binom{n}{r} = \prod_{p\leq r}p^{\lfloor n/p \rfloor -\lfloor (n-r)/p \rfloor - \lfloor r/p \rfloor} \times ...$ It's kind of long to write out but there are two other product symbols with ranges $n-r \lt p \leq n$ and $r \lt p \leq n-r$.
-
The first formula is wrong for $n \geq 4$. – Douglas S. Stones Aug 28 '13 at 02:55
-
How is it wrong? $n!$ is a product of primes. The prime $p$ occurs approx $n/p$ times, and there's no danger of overcounting because we're using primes. – Daniel Donnelly Aug 28 '13 at 02:58
-
1Wrong, as in it's not right. E.g., $4!=24$ and $\prod_{p \leq 4} p^{\lfloor 4/p \rfloor}=2^2 \times 3=12$. – Douglas S. Stones Aug 28 '13 at 03:00
-
Crap, i see, it is wrong. Thanks – Daniel Donnelly Aug 28 '13 at 03:00
-
I'm wondering if it can be fixed by using something like "prime power p" or something similar. It's still not right, but a correction term perhaps could be introduced. – Douglas S. Stones Aug 28 '13 at 03:01
-
The highest exponent of $p$ in $m!$ is $\lfloor \frac{m}{p}\rfloor+\lfloor \frac{m}{p^2}\rfloor+\cdots$. From this one can get a similar more complicated looking formula for the highest power of $p$ that divides a binomial coefficient. – André Nicolas Aug 28 '13 at 03:05
-
This works then: $n!=\prod_{p^a \leq n} p^{\lfloor n/p^a \rfloor}$ where the sum is over all primes $p$ and $a \geq 1$ such that $p^a \leq n$. – Douglas S. Stones Aug 28 '13 at 03:10
-
Yeah, that seems to work. I'm using this to try and analyse a complicated binomial sum in another post. – Daniel Donnelly Aug 28 '13 at 03:12
-
$p^\alpha \leq n$ is not necessary. If $p^\alpha > n$ the term contributes nothing. – Zavosh Aug 28 '13 at 03:12
-
Dear EM, If you want to analyze prime powers dividing $n^!$, there is a variant of your formula which is standard, and perhaps more helpful: let $s(n)$ denote the sum of the digits of $n$, when $n$ is written in base $p$. Then the largest power of $p$ (a prime) dividing $n!$ equals $(n - s(n))/(p-1)$. I've frequently found this helpful in studying binomial-type coefficients. Regards, – Matt E Aug 28 '13 at 03:54
-
Thank you! I encountered that before when studying p-adic notes. I don't know which version will be more helpful yet. – Daniel Donnelly Aug 28 '13 at 04:20
1 Answers
Thanks to the comments we have that
$$ n! = \prod_{p\,\,prime}\prod_{k\geq 1}p^{\lfloor \frac{n}{p^k}\rfloor}$$
Alternatively, if we let $k_p(n)$ be the highest power of $p$ dividing $n$. We have $k_p(n) = \sum_{k\geq 1} \lfloor \frac{n}{p^k}\rfloor$ and
$$ n! = \prod_{p\,\,prime}p^{k_p(n)}$$
A bound on $k$ in the sum can be made and also the bound $p \leq n$ can be imposed. And we can come up with a formula for $\binom{n}{r}$. We have for $r \lt n-r$
$$ \binom{n}{r} = (\prod_{n-r\lt p\leq n} p^{k_p(n)})(\prod_{r\lt p\leq n-r} p^{k_p(n) - k_p(n-r)})(\prod_{p\leq r}p^{k_p(n)-k_p(n-r)-k_p(r)}) $$
We assumed $r \lt n-r$. If that's not the case then substitute $n-r$ where you see $r$ and vise versa and use the formula $\binom{n}{n-r} = \binom{n}{r}$.
- 22,288