Proving $(x^{p}-x)^{a} \equiv 0\pmod{p^{a}}$ as a step to another problem? I have a problem where I have to use that $a^n\equiv a \pmod p$ to show that there exist non-zero polynomials modulo $n$ that are the zero function. I have tested some examples and figured that for the examples I tested, it seems that for $m\equiv p_1^{a_1}p_2^{a_2}\dots p_n^{a_n}$, the polynomial:
$$(x^{p_1}-x)^{a_1}(x^{p_2}-x)^{a_2}\dots(x^{p_n}-x)^{a_n} \tag{$\star$}$$
Is the zero function but I can't figure out why, I also tested some variations such as:
$$(x^{p_1^{a_1}}-x)^{a_1}(x^{p_2^{a_2}}-x)^{a_2}\dots(x^{p_n^{a_n}}-x)^{a_n}$$
But noticed they fail. I thought about writing $(\star)$ as:

$$\begin{eqnarray*}
  {(x^{p_1}-x)^{a_1}(x^{p_2}-x)^{a_2}\dots(x^{p_n}-x)^{a_n} }&\equiv &{0\pmod{p_1^{a_1}} } \\ 
  {(x^{p_1}-x)^{a_1}(x^{p_2}-x)^{a_2}\dots(x^{p_n}-x)^{a_n} }&\equiv &{0\pmod{p_2^{a_2}}} \\ 
  {\vdots\hspace{3cm}}&&{} \\ 
  {(x^{p_1}-x)^{a_1}(x^{p_2}-x)^{a_2}\dots(x^{p_n}-x)^{a_n} }&\equiv &{0\pmod{p_n^{a_n}}} 
\end{eqnarray*}$$

And realized that if that is actually true, we must have:

$$\begin{eqnarray*}
  {(x^{p_1}-x)^{a_1} }&\equiv &{0\pmod{p_1^{a_1}} } \\ 
  {(x^{p_2}-x)^{a_2} }&\equiv &{0\pmod{p_2^{a_2}}} \\ 
  {\vdots\hspace{4mm}}&&{} \\ 
  {(x^{p_n}-x)^{a_n} }&\equiv &{0\pmod{p_n^{a_n}}} 
\end{eqnarray*}$$

So it all boils down to proving that $(x^{p}-x)^{a} \equiv  0\pmod{p^{a}}$ for any $p$ prime and any positive integer $a$. But I have no clue on how to do that. Could you give me a hint?

Hint If $b \in \mathbb Z$ you know that
$$b^p-b \equiv 0 \pmod{p}$$
This means that
$$p|b^p-b$$
Deduce from here that
$$p^a|(b^p-p)^a$$
P.S. You can also show that there exist non-zero polynomials modulo $n$ that are the zero function by a very simple counting: there are finitely many functions $f: \mathbb Z/n \mathbb Z \to \mathbb Z/n \mathbb Z$ but infinitely many polynomials. Therefore, there are two polynomials $P \neq Q$ with the same function. Then $R:=P-Q$ is your polynomial. You can even restrict the degree to $\deg(R)\leq n+1$
