Highest power of a prime $p$ dividing $N!$ How does one find the highest power of a prime $p$ that divides $N!$ and other related products?
Related question: How many zeros are there at the end of $N!$?

This is being done to reduce abstract duplicates. See 
Coping with *abstract* duplicate questions. and List of Generalizations of Common Questions for more details.

Walking down the street I realized how to proof the formula in a very simple way. The key idea is to know how many numbers contain a given prime in the exact $q$-th power.
Let us denote the set of all numbers up to $n$ (inclusive) that are divisible by $q$-th power of prime $p$ but not divisible by the greater ($q+1, q+2, ...$) power of that prime:
$$
M^p_q(n) := \{ m : m \le n, p^q | m, p^{q+1} \nmid m\}
$$
How many numbers in that set? Well, obviously, the number of those that are divisible by $p^q$ minus the number of those which are divisible by $p^{q+1}$:
$$
|M^p_q(n)| = \bigg\lfloor \frac{n}{p^q}\bigg\rfloor - \bigg\lfloor \frac{n}{p^{q+1}}\bigg\rfloor
$$
OK. Each of the numbers in $M^p_q$ gives us the $q$-th power of $p$ in $n!$ so we need just add them all:
$$
s_p(n!)=\sum_{q=1}^{\infty}q|M^p_q(n)|
$$
Which is the desired result.
