I have a question which is as following:
If $2p+1$ is a prime number, then $(p!)^2+(-1)^p$ is divisible by $2p+1$.
Whenever I see questions involving factorial sign, I try to use Wilson theorem, but I don't know weather I can use it here or not, If yes then how??
Please help.
Since it is given that $(2p+1)$ is a prime number. So we can use Wilson theorem for $2p+1$ as:
$$ ((2p + 1)-1)! + 1\equiv 0 \mod(2p + 1) $$
$$(2p)!+1\equiv 0 \mod(2p + 1)$$
$$1\times2\times3\times4\times5\times6....(p)\times(p + 1)\times(p + 2)....(2p - 1)\times(2p) + 1\equiv 0 \mod(2p + 1)$$
$$p! [(2p+1-p)]\times [2p+1-(p-1)]\times[2p+1-(p-2)]\times[2p+1-(1)]+1\equiv 0 \mod (2p+1)$$
$$p![M(2p + 1)+(-1)\times(p)\times(p-1)\times(p-2)....3\times2\times1] +1\equiv 0 \mod(2p + 1)$$
$$p![M(2p + 1)+(-1)^p {p!}] + 1\equiv 0 \mod(2p + 1)$$
$$[p!M(2p + 1)]+[(-1)^p {p!}^2] + 1\equiv 0 \mod(2p + 1)$$
Notice that $[p!M(2p + 1)]$ is already divisible by $(2p + 1)$, So,
$$[(-1)^p {p!}^2] + 1\equiv 0 \mod(2p + 1)$$
Which was needed to be proved.
:) :) :) :)