How do I prove Wilson's Theorem $$\large{(p-1)! \equiv -1 \pmod p}$$ using Euler's theorem $$ \large{a^{\varphi(n)} \equiv 1 \pmod n }$$ where $ \large{\varphi(n)} $ denotes Euler's Totient function?
Thanks in advance for any replies.
How do I prove Wilson's Theorem $$\large{(p-1)! \equiv -1 \pmod p}$$ using Euler's theorem $$ \large{a^{\varphi(n)} \equiv 1 \pmod n }$$ where $ \large{\varphi(n)} $ denotes Euler's Totient function?
Thanks in advance for any replies.
We sketch a proof of an interesting result that does the job, though admittedly it is overkill. However, it is close in spirit to the first published proof of Wilson's Theorem.
Let $p$ be prime. Let $P(x)$ be the polynomial $x^{p-1}-1$ and let $Q(x)=(x-1)(x-2)\cdots (x-(p-1))$.
By Fermat's theorem, we have $P(a)\equiv 0\pmod{p}$ for every $a$ from $1$ to $p-1$. And it is obvious that $Q(a)\equiv 0\pmod{p}$ for every such $a$. Let $D(x)=P(x)-Q(x)$. Then $D(a)\equiv 0\pmod{p}$ for all $a$ such that $1\le a\le p-1$.
But $D(x)$ has degree $\lt p-1$, and has at least $p-1$ zeros modulo $p$. It follows by a theorem due to Lagrange that all the coefficients of $D(x)$ are congruent to $0$ modulo $p$. In particular, the constant terms of $P(x)$ and $Q(x)$ are congruent modulo $p$. This is Wilson's Theorem.