Wilson's Theorem: (p-1)! ≡ -1 mod p Statement: As an immediate deduction from wilson's theorem we see that if p is prime with p ≡ 1 mod 4 then the congruence x2 ≡ -1 mod p has solutions x = +-(r!), where r = (p-1)/2. How do I plug in p ≡ 1 mod 4 into wilsoms theorem so I can see this? I'm missing something here an I'd be grateful if someone could explain... Thanks.