Exponent of prime p in n!
Proof:

n! = 1 × 2 × 3 × .... n

Let 's' be the largest positive integer such that
ps ≤ n < ps + 1
In n! expansion, there are numbers which are of the form
r1 p, r2P2, r3P3,....... rsPs ≤ n
where r1, r2, r3 ...... rs are integers.
Maximum possible value for r1 = = max (r1)
So there are number of 'p' terms in n!
Similarly maximum possible value for r2 =
So there are number of 'p2' terms in n!
But all of them are repeated once in r1 p terms.
So effective contribution from r2P2 terms is only and not 2
Similarly for r3P3, the effective number of prime powers =
And so on.
∴ Exponent of prime p in n! =