Finding Exponent of prime number p in factorial of n (n!)


#1

I came across an interesting question asked by a student Find the exponent of 2 in 50!

After going through a few solutions, I would like to share with you this quick and easy method of Finding Exponent of prime number p in factorial of n (n!)

Step 1 - Express n as [n/p]p

[n/p] denotes the greatest integer less than or equal to n/p

In this case, p=2 n=50

Step 2 - Finding the exponent of p in factorial of n

Exponential of prime number p in the factorial n can be denoted as Ep(n!)

Ep(n!) = Ep(1.2.3…(n-1).n) = Ep(p.2p.3p…[n/p]p) = [n/p]+ Ep(1.2.3…[n/p])

Ep(n!) = [n/p] + [n/p^2]+…+[n/p^k]

Where k is the largest positive integer such that p^k≤n≤p^k+1

So in this question,

E2(50!) = [50/2] + [50/4] + [50/8] + [50/16] + [50/32] = 25 + 12 + 6 + 2 = 46.


#3

How can we solve find the exponent of 3 in 100! Please explain once more !