how to prove $V_{p}(n!) = \frac{n-Wt_{p}(n)}{p-1}$? How to prove
$$V_{p}(n!) \stackrel{?}{=} \frac{n-Wt_{p}(n)}{p-1}$$
in $p$-adic theory, where


*

*$V_p(n) = k$ if $p^{k}|n$ and $p^{k+1}\not\mid n$, and

*$Wt_{p}(n) = \sum_{i=0}^{r}a_{i}$ if $n = a_{0}+a_{1}p+a_{2}p^2+\cdots+a_{r}p^r$;

 A: *

*First, notice that we can write
$$ V_p(n) = \sum_{j=1}^{\infty} \mathbf{1}_{p^j \mathbb{Z}}(n), $$
where the indicator function $\mathbf{1}_{p^j \mathbb{Z}}(n)$ takes value $1$ if $n \in p^j\mathbb{Z}$ and $0$ otherwise. Then by the complete multiplicativity of $V_p$,
$$
V_p(n!)
= \sum_{i=1}^{n} V_p(i)
= \sum_{i=1}^{n} \sum_{j=1}^{\infty} \mathbf{1}_{p^j \mathbb{Z}}(i)
= \sum_{j=1}^{\infty} \sum_{i=1}^{n} \mathbf{1}_{p^j \mathbb{Z}}(i)
= \sum_{j=1}^{\infty} \left\lfloor \frac{n}{p^j} \right\rfloor,
$$
Here, the last equality follows from the fact that $\sum_{i=1}^{n} \mathbf{1}_{p^j \mathbb{Z}}(i)$ counts the number of integers in $[1,n]\cap\mathbb{Z}$ that is divisible by $p^j$, which is exactly $\lfloor n/p^j\rfloor$.

*Now if we write $n = \sum_{k=0}^{\infty} a_k p^k$ in $p$-adic expansion (where of course $a_k \in \{0, \cdots, p-1\}$ for each $k$), then
$$ \left\lfloor \frac{n}{p^j} \right\rfloor = \sum_{k=j}^{\infty} a_{k} p^{k-j} $$
and hence 
$$
V_p(n!)
= \sum_{j=1}^{\infty} \sum_{k=j}^{\infty} a_{k} p^{k-j}
= \sum_{k=1}^{\infty} \sum_{j=1}^{k} a_{k} p^{k-j}
= \sum_{k=1}^{\infty} a_{k} \cdot \frac{p^k - 1}{p - 1}
= \frac{n - Wt_p(n)}{p-1}.
$$
