Number of $\binom{n}{m}$ not divisible by a prime $p$ Problem:
In the first volume of (English) Kvant Selecta Algebra and Analysis, the first article is The Arithmetic of Binomial Coefficients by DB Fuchs and MB Fuchs. On page 9, they leave an assertion to be proved:

In all, there are $\dfrac{p^r(p^r + 1)}{2}$ numbers $\binom{n}{m}$,
with $0 \le n \le p^r, 0 \le m \le n$, of which exactly $\dfrac{p^r(p + 1)^r}{2^r}$ are not divisible by $p$.

They mention that here, $p$ is a prime and $r$ is a natural number.
Attempt:
Let, $0 \le m \le n \le a$ for some number $a$. Then I showed that the total number of binomial coefficients is $\dfrac{(a + 1)(a + 2)}{2}$. Now the number of distinct coefficients is different for odd and even $n$. And I couldn't proceed further than this towards the proof.
Can somebody give a hint as to how to proceed from here? Thanks for your help.
Edit:
I made a mistake in understanding of the statement given above, the authors were not referring to the distinct $\binom{n}{m}$. Further there was a typo in the book itself, the range for $n$ should be $0 \le n < p^r$.
 A: As I mention in my question, the number of $\displaystyle\binom{n}{m}$ when $0 \le n \le a$ is $\dfrac{(a+1)(a+2)}{2}$. Hence, we first get that for $0 \le n < p^r$ we have $\dfrac{p^r(p^r + 1)}{2}$ binomial coefficients.
They prove the following result in the article, however for continuity I'm also including a proof here.
If $n = lp + s, m = kp +t$ with $0 \le s,t \le p-1$, we have, $$\binom{n}{m} \equiv \binom {l}{k} \binom{s}{t} \, \bmod p$$.

Proof:
Consider $(1+x)^n = \displaystyle \sum_{m=0}^{n} \binom{n}{m} x^m$.
But, $(1+x)^n = (1+x)^{lp+s} = (1+x)^{lp} \cdot (1+x)^s \equiv
> (1+x^p)^l \cdot (1+x)^s \, \pmod p.$
Hence, $[x^m](1+x)^n = \displaystyle \binom{n}{m} \equiv \displaystyle
 \binom{l}{k} \binom{s}{t} \, \bmod p$.

Now consider the base-$p$ expansions, $$n = \displaystyle\sum_{i = 0}^{r-1} n_ip^i \qquad m=\displaystyle\sum_{i = 0}^{r-1} m_ip^i \qquad (0 \le n_i, m_i < p \, \forall i)$$ We clearly have, $\displaystyle \binom{n}{m} \equiv \prod_{i=1}^{r-1} \binom{n_i}{m_i} \, \bmod p$.
Let, $g(n)$ be the number of $\displaystyle\binom{n}{m}$ which are not divisible by $p$. Using the the above result, and because $\displaystyle\binom{n_i}{m_i} = 0$ for $m_i > n_i$, we get that $$g(n) = \displaystyle \prod_{i=0}^{r-1} (n_i + 1)$$
If $f_r$ be the required number of binomial coefficients that are not divisible by $p$, then, $f_r = \displaystyle\sum_{n=0}^{p^r - 1} g(n)$. Now let $n' = n - n_{r-1}p^{r-1}$. Clearly, $g(n) = (n_{r-1} + 1)g(n')$. Hence,
$f_r = \displaystyle\sum_{n_{r-1} = 0}^{p-1} \sum_{n'=0}^{p^{r-1}-1} (n_{r-1} + 1)g(n') = \dfrac{p(p+1)}{2} f_{r-1}$
As all the binomial coefficients are not divisible by $p$ when $r=1$, we prove that $f_r = \left(\dfrac{p(p+1)}{2}\right)^r$ as claimed.
