0

$1^2 \cdot 3^2 \cdot 5^2\cdots (p-2)^2\equiv (-1)^{\frac{p+1}{2}}\pmod p$

I saw that I can use Wilson's theorem that $(p-1)!\equiv -1 \pmod p$ and that they change something, they said put on even number $\frac{p+1}{2}$ so now you prove it but I do not understand can you help me?

1 Answers1

3

We work in the field $\Bbb F_p$ with $p$ elements. (Same as $\Bbb Z/p$, for the given prime $p$, i suppose it is a prime.)

Then $$ \begin{aligned} -1 &= 1\cdot 2\cdot 3\cdot 4\cdot 5\cdot 6\cdot \ \dots\ \cdot (p-2)\cdot(p-1) \\ &=1\color{red}{\cdot (-2)}\cdot 3\color{red}{\cdot (-4)}\cdot 5\color{red}{\cdot (-6)}\cdot \ \dots\ \cdot (p-2)\color{red}{\cdot(-(p-1))} \color{blue}{\cdot(-1)^{(p-1)/2}} \\ &=1\cdot 3\cdot 5\cdot \ \dots\ \cdot (p-2) \color{red}{\cdot (-2)\cdot (-4)\cdot (-6)\cdot \ \dots\ \cdot(-(p-1))} \color{blue}{\cdot(-1)^{(p-1)/2}} \\ &=1\cdot 3\cdot 5\cdot \ \dots\ \cdot (p-2) \color{red}{\cdot (p-2)\cdot (p-4)\cdot (p-6)\cdot \ \dots\ \cdot(p-(p-1))} \color{blue}{\cdot(-1)^{(p-1)/2}} \\ &=(1\cdot 3\cdot 5\cdot \ \dots\ \cdot (p-2))^2 \color{blue}{\cdot(-1)^{(p-1)/2}} \ . \end{aligned} $$ This leads to the answer...

dan_fulea
  • 32,856