Fermat's little theorem question: why isn't $a^p \equiv 1$? Fermat's little theorem says that $a^p \equiv a \pmod p$.
I have kind of a stupid question. Since $p \equiv 0\pmod p $, why isn't $a^p \equiv a^0 \equiv 1 \pmod p$ ?

As an intuitive counter example, Fermat's Little theorem in this form holds for all integers including zero. So $0^p \equiv 1 \mod p$ clearly does not work. If you are familiar with fields, you should realize you're staring at the additive identity, which we exclude from consideration in the multiplicative set.
A different question that should get you thinking about this: for any non-zero integer $a$ and prime $p$ then $a^{p-1} \equiv 1 \mod p$. For any integer $a$ and prime $p$ then $a^p \equiv a \mod p$. Find out how they are equivalent (hint: zero is the problem again).
