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?