Possible Duplicate:
Primes P such that ((P-1)/2)!=1 mod PPrimes P such that ((P-1)/2)!=1 mod P
Motivation comes from comments in this questionthis question, and it is interesting in its own right. These primes are sequence A055939 in OEIS.
So, which primes $p$ satisfy $p\\ |\\ (\frac{p-1}{2})! + 1$?
If my calculations (in sage) are correct, the following is true for all primes under 100,000. For $p > 3$: $$p\\ |\\ (\frac{p-1}{2})! + 1 \iff h(\sqrt{-p})=1 \mod{4}$$