R(p,n)=i=1∑∞⌊pin⌋
where R(p,n) to be n!'s a largest exponent of a prime factor p. and ⌊x⌋ is the floor function.
Proof
since n! is each multiply of {1,2,..,n}, ⌊pn⌋ is the number of multiple of p in {1,..,n}. also ⌊p2n⌋ is a number of multiple of p2 in {1,..,n}. adding all these number take the infinite sum for R(p,n).
R(p,n)=p−1n−sp(n).
where sp(n) is sum of nl,nl−1,...,n0 such that n=nlpl+nl−1pl−1+⋯+n0.
Proof
R(p,n)=i=1∑l⌊pin⌋=i=1∑lnlpl−i+⋯+ni=i=1∑lj=i∑lnjpj−i=j=1∑li=1∑jnjpj−i=j=1∑lnjp−1pj−1=j=1∑lnjp−1pj−1=p−11j=1∑lnj(pj−1)=p−11(j=1∑lnjpj−j=1∑lnj+n0−n0)=p−11(j=0∑lnjpj−j=1∑0nj)=p−11(n−sp(n))
Example
for n=6, 6!=720=24⋅32⋅51.
R(2,6)R(3,6)R(5,6)=i=1∑∞⌊2i6⌋=⌊26⌋+⌊46⌋=3+1,=i=1∑∞⌊3i6⌋=⌊36⌋=2,=i=1∑∞⌊5i6⌋=⌊56⌋=1.