<s>[INST] Another Congruence Proof I've been asked to attempt a proof of the following congruence.  It is found in a section of my textbook with Wilson's theorem and Fermat's Little theorem.  I've pondered the problem for a while and nothing interesting has occurred to me.
$1^23^2\cdot\cdot\cdot(p-4)^2(p-2)^2\equiv (-1)^{(p+1)/2} (\text{mod} p)$
 [/INST] To Prove : $1^2.2^2.3^2....(p-1)^2 \equiv (-1)^{\frac{p+1}{2}} \pmod p$
We know that
$$k \equiv -(p-k) \pmod p$$
Applying this repeatedly we will get
$$2.4.6.......(p-1) \equiv (-1)^{\frac{p-1}{2}} 1.3.5.......(p-2) \pmod p$$
$$\implies 1.3.5.......(p-2) \equiv (-1)^{\frac{p-1}{2}} 2.4.6.......(p-1) \pmod p$$
$$\implies 1^2.3^2.5^2.......(p-2)^2 \equiv (-1)^{\frac{p-1}{2}} 1.2.3.4.5.6.......(p-1) \pmod p$$
$$\implies 1^2.3^2.5^2.......(p-2)^2 \equiv (-1)^{\frac{p-1}{2}} (p-1)! \pmod p$$
By Wilson's Theorem
$$\implies 1^2.3^2.5^2.......(p-2)^2 \equiv (-1)^{\frac{p-1}{2}} (-1) \pmod p$$
$$\implies 1^2.3^2.5^2.......(p-2)^2 \equiv (-1)^{\frac{p+1}{2}} \pmod p$$
</s>