It is given that $p = 2q+1$, and $p$ is a prime number. Prove that $(q!)^2 +(-1)^q$ is a multiple of $p$.

283 Views Asked by At

It is given that $p = 2q+1$, and $p$ is a prime number. Prove that $$(q!)^2 +(-1)^q$$ is a multiple of $p$.

Attempt:

$q = \frac{p-1}{2}$

\begin{align} \therefore (q!)^2 +(-1)^q &= \frac{1}{4} [(p-1)!]^2 +(-1)^q \\ &=\frac{1}{4} \left[\frac{p!}{p}\right]^2 +(-1)^q \end{align}

The first part is clearly divisible by $p$. I dont know what to do with the $-1$.

2

There are 2 best solutions below

1
On BEST ANSWER

From $p=2q+1$, we get $q={\large{\frac{p-1}{2}}}$

At the start of your attempt, you made a serious error . . .

From $q={\large{\frac{p-1}{2}}}$, it follows that $$q^2=\left({\small{\frac{1}{4}}}\right)(p-1)^2$$ but it doesn't follow that $$(q!)^2=\left({\small{\frac{1}{4}}}\right)\Bigl((p-1)!\Bigr)^2$$

You made another error when you suggested that $$\left(\frac{p!}{p}\right)^2$$ "is clearly divisible by $p$".$\;$It's definitely not divisible by $p$.

Starting over, you can argue as follows . . .

Applying Wilson's Theorem, we get \begin{align*} &(p-1)! \equiv -1\;(\text{mod}\;p)\\[4pt] \implies\;& \bigl((1)(p-1)\bigr) \bigl((2)(p-2)\bigr) \cdots \bigl((q)(p-q)\bigr) \equiv -1\;(\text{mod}\;p) \\[4pt] \implies\;& \bigl((1)(-1)\bigr) \bigl((2)(-2)\bigr) \cdots \bigl((q)(-q)\bigr) \equiv -1\;(\text{mod}\;p) \\[4pt] \implies\;& (-1)^q(q!)^2 \equiv -1\;(\text{mod}\;p) \\[4pt] \implies\;& (-1)^{2q}(q!)^2 \equiv -(-1)^q\;(\text{mod}\;p) \\[4pt] \implies\;& (q!)^2 \equiv -(-1)^q\;(\text{mod}\;p) \\[4pt] \implies\;& (q!)^2+(-1)^q \equiv 0\;(\text{mod}\;p) \\[4pt] \end{align*}

0
On

Hint: By Wilson's theorem [ https://en.wikipedia.org/wiki/Wilson%27s_theorem ] $(p-1)!\equiv -1 \mod p$.