<s>[INST] What is the logic/theorem/derivation behind finding the exponent of p in n! By [n/p] + [n/p^2] + [n/p^3] + ....? The exponent of prime number of 3 in 100! is 48.
It means 100! is divisible by $3^48$
$$E_3(100!) = \left\lfloor\frac{100}3\right\rfloor + \left\lfloor\frac{100}{3^2}\right\rfloor + \left\lfloor\frac{100}{3^3}\right\rfloor + \left\lfloor\frac{100}{3^4}\right\rfloor 
= 33+11+3+1 = 48$$
What is the derivation/math behind the above logic?
 [/INST] suppose $p$ is prime number
  $$1,2,3,4,5,...,p,p+1,p+2,....,2p,....3p,3p+1,...,p^2,p^2+1,....2p^2,...p^3,p^3+1,...$$ obviously : every p number has multiple of  p
  every $p^2 $number has multiple of $p^2$
  every $p^3 $number has multiple of $p^3$
  and so on
sum of the p multiple is :sum of $$\left \lfloor \frac{n}{p^1} \right \rfloor+\left \lfloor \frac{n}{p^2} \right \rfloor +\left \lfloor \frac{n}{p^3} \right \rfloor +...$$
</s>