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