We begin by proving a slight extension of Fermat's Theorem:

\begin{lemma*}
If $p$ is prime, then:
%
\[
m^p \equiv m \pmod{p}
\]
\end{lemma*}

\begin{proof}
If $m$ is a multiple of $p$, then both sides are congruent to 0 so the
claim holds.  If $m$ is not a multiple of $p$, then Fermat's Theorem
says:
%
\[
m^{p - 1} \equiv 1 \pmod{p}
\]
%
Now multiplying both sides by $m$ proves the claim.
\end{proof}

Now we turn to the prove the original claim.

\begin{proof}
We use induction.  Let $Q(k)$ be the proposition that
%
\[
m^{1 + (p_1 - 1)(p_2 - 1) \cdot (p_k - 1)} \equiv m \pmod{p_1 p_2
\ldots p_k}
\]
%
for all $m$.

\noindent \textit{Base case.}  We reason as follows:
%
\begin{align*}
m^{1 + (p_1 - 1)}
    & \equiv m^{p_1} \pmod{p_1} \\
    & \equiv m \pmod{p_1} \\
\end{align*}
%
The second step uses the lemma.

\noindent \textit{Inductive Step.}  Now assume that $Q(k)$ is true;
that is:
%
\[
m^{1 + (p_1 - 1)(p_2 - 1) \cdot (p_k - 1)} & \equiv m \pmod{p_1 p_2
\ldots p_k}
\]
%
This means that:
%
\[
\]


From $Q(1)$ and $Q(k)$, we have:
%
\begin{align*}

m^{p_1} & \equiv m \pmod{p_{k+1}}
\end{align*}
%
These two statements imply:
%
\begin{gather*}
p_1 p_2 \ldots p_k \mid (m^{1 + (p_1 - 1)(p_2 - 1) \cdot (p_k - 1)} - m)
p_{k+1} \mid (m^{p_1} - m)
\end{gather*}
%
Thus, the prime factorization of $m^{1 + (p_1 - 1)(p_2 - 1) \cdot (p_k
  - 1)} - m$ contains all of $p_1, \ldots, p_{k+1}$.  Thus:
%
\[
p_1 p_2 \ldots p_{k+1} \mid (m^{1 + (p_1 - 1)(p_2 - 1) \cdot (p_k - 1)} - m)
\]
%
Or, equivalently:
%
\[
m^{1 + (p_1 - 1)(p_2 - 1) \cdot (p_k - 1)} \equiv m \pmod{p_1 p_2
\ldots p_{k+1}}
\]

Therefore, $Q(k)$ is true for all $k \geq 1$ by strong induction.
