Modular arithmetic and some applications Show that if $p> 2$ is a prime number, then $p$ divides $(p-2)! - 1$. I have tried using Fermat's Theorem, but I could not solve it.

This follows from Wilson's theorem, which states that

$$(p-1)!\equiv_p -1$$ if and only if $p$ is a prime

If you accept this, then the rest follows easily since $(p-1)!\equiv_p (p-2)!(-1)\equiv_p-1$ implies: $$(p-2)!\equiv_p 1$$
This is the same as saying that $p$ divides $(p-2)!-1$.
Now for the proof of this theorem. In $\mathbb{Z}_p$ every non-zero element has an inverse, in particular $-1$ and $1$ are their own inverses, which means that if you multiply all these numbers you'll get: $$1\cdot 2\cdot\ldots\cdot (p-1)=(p-1)!\equiv_p 1\cdot 1\cdot\ldots\cdot 1\cdot (-1)\equiv_p-1$$
