-1

How is $\left(\frac {p-1}{2}\right)! ^2 \equiv -1 \pmod p$. I was using this result for a proof ($x^2$ = -1 (mod p) ) and was stuck on this part. NOTE, this result is only when p is a prime of form 4k+1.

note: please don't delete my question without atleast informing me of the reason.

Arthur
  • 199,419
Aditya_math
  • 1,863
  • 1
    Is $ p $ prime ?. If yes, think of Wilson's theorem. – hamam_Abdallah Nov 19 '20 at 19:50
  • @hamam_Abdallah yes p is a prime, i realize that we need to apply wilson's theorem but that states p | (p-1)! + 1 so i am not sure how to apply that to this problem. – Aditya_math Nov 19 '20 at 19:52
  • You know you can enclose entire expressions in dollar signs, rather than just one symbol at a time? For instance, instead of ($\frac {p-1}{2}$)! $^2$ $\equiv$ -1 (mod p), try $(\frac {p-1}{2})! ^2 \equiv -1 \pmod p$ to get $(\frac {p-1}{2})! ^2 \equiv -1 \pmod p$. Looks better. – Arthur Nov 19 '20 at 19:53
  • @Arthur , i am sorry, i did not know that. I will keep it in mind next time. – Aditya_math Nov 19 '20 at 19:55
  • 1
    This can't be true for all primes $p$, since $-1$ is not always a square $\bmod{p}$. What you want to show is that, if $p \equiv 1 \bmod{4}$, then $\left(\frac{p-1}{2}\right)!^{2} = (p-1)!$ – xxxxxxxxx Nov 19 '20 at 20:00
  • Also, this is already answered here https://math.stackexchange.com/questions/122048/1-is-a-quadratic-residue-modulo-p-if-and-only-if-p-equiv-1-pmod4 – xxxxxxxxx Nov 19 '20 at 20:05
  • @MorganRodgers yes exactly. Thank you! i am sorry for the mistake – Aditya_math Nov 19 '20 at 20:05
  • $-1\equiv(p-1)!\equiv 1\cdot\ldots\cdot \frac{p-1}{2}\frac{p+1}{2}\cdot\ldots\cdot(p-1)\equiv\left(\left(\frac{p-1}{2}\right)!\right)^2\cdot(-1)^{\frac{p-1}{2}}\equiv\left(\left(\frac{p-1}{2}\right)!\right)^2$ , @MorganRodgers this was what i am having trouble with – Aditya_math Nov 19 '20 at 20:07
  • 3
    Does this answer your question? Why does $(\frac{p-1}{2}!)^2 = (-1)^{\frac{p+1}{2}}$ mod $p$?. With $p \equiv 1 \pmod{4}$, this gives a RHS of $-1$ while for $p \equiv 3 \pmod{4}$, it gives a RHS of $1$. – John Omielan Nov 19 '20 at 20:09
  • 1
    @Aditya_math It really is just a matter of writing out all of the terms. Try it for $p=5$ and for $p=13$. – xxxxxxxxx Nov 19 '20 at 20:09
  • 1
    @JohnOmielan thank you so much, this was exactly what i was looking for – Aditya_math Nov 19 '20 at 20:20

1 Answers1

0

Your claim seems false:

Take $ p=7$.

$$(\frac{p-1}{2})!=3!=6$$

$$6^2=36\equiv 1 \mod 7$$