Binomial Coefficient involving Prime

Theorem
Let $p$ be a prime number.

Let $\dbinom n p$ be a binomial coefficient.

Then:
 * $\dbinom n p \equiv \left \lfloor {\dfrac n p}\right \rfloor \pmod p$

where:
 * $\left \lfloor {\dfrac n p}\right \rfloor$

denotes the floor function.

Proof
Follows directly from Lucas' Theorem:


 * $\dbinom n k \equiv \dbinom {\left \lfloor {n / p} \right \rfloor} {\left \lfloor {k / p} \right \rfloor} \dbinom {n \bmod p} {k \bmod p} \pmod p$

where $k = p$.

Then:
 * $k \bmod p = 0$

and so by Binomial Coefficient with Zero:
 * $\dbinom {n \bmod p} {k \bmod p} = 1$

Also:
 * $\left \lfloor {k / p} \right \rfloor = 1$

and by Binomial Coefficient with One:
 * $\dbinom {\left \lfloor {n / p} \right \rfloor} {\left \lfloor {k / p} \right \rfloor} = \left \lfloor {\dfrac n p} \right \rfloor$

Thus:
 * $\dbinom n p \equiv \left \lfloor {\dfrac n p}\right \rfloor \times 1 \pmod p$

Hence the result.