I would like to show that Fermat's Little Theorem doesn't hold when p is not prime.
I'm assuming this would be a proof by contradiction that Fermat's Theorem only works with prime numbers, but I'm not sure how to go about writing such a proof. Would we need to show that if p isn't prime, then a to any power less than p may share a common factor with p?
Best Answer
$a^{p-1} \equiv 1 \bmod p $
let $a = 2$, $p =4$
$2^3 = 8 \bmod 4 =0$