In trying to determine the spectrum of a well-known ergodic transformation, I came up with the following useful (for me) result.


Let $p$ be a prime and $a$ a positive integer. Then for $M$ a positive integer, we have
$$
{{M} \choose {p^a}} \equiv {\rm floor}\left(\frac M{p^a} \right) \mod p.
$$
[The thing on the left is supposed to represent $M$ choose $p^a$, and the right side is supposed to be the floor of $M/p^a$, but on my screen, it looks confusing.] 


I have a tedious argument for this (which is probably correct), but why re-invent the binomial wheel? This identity must be known. Can someone provide a reference?



binomial/factorial identity mod p
Sorry, don't know a reference, but here is a quick argument.


If $M=p^ab+c$ with $0\leq c\leq p^a-1$, then 
$$(1+x)^M=(1+x)^{p^ab}(1+x)^c
=(1+x^{p^a})^b(1+x)^c
\mod p.
$$
In turn, this equals
$$
(1+bx^{p^a} + ...)(1+x)^c \mod p
$$
where $...$ means higher degree terms. Since $c<p^a$, there is no further 
correction after multiplying by $(1+x)^c$ (the coefficient by $x^{p^a}$ stays $b$), and you are done.


