Use Fermat’s little theorem to show that $8, 9, 10$ are not prime numbers.
I know that the theorem states: for all $a$ in $\mathbb Z$, if $p$ is prime and $p$ does not divide $a$ then $a^p = a$ mod $p$, which means that $a^{p-1} = 1$ mod $p$
How do I prove that $8,910$ are not prime using the above? Can I choose any counterexample, or does it have to be a general proof?
Fermat's little theorem states: "if $p$ is prime then 'for all $a$, if $p$ does not divide $a$ then $a^{p-1}\equiv 1\mod p$."
The contrapositive is "if there exists $a$ such that $p$ does not divide $a$ but $a^{p-1}\equiv 1\mod p$, then $p$ is not a prime."
So for each of $p=8,9,10$, you have to find $a$ which is not divisible by $p$ such that $a^{p-1}\not\equiv 1\mod p$.
For example, for $p=8$, take $a=2$, Since $|a|<8$ then $a$ is not a multiple of $8$, but $$a^{p-1}=2^7=128\equiv 0\mod 8.$$