My question relates, at least superficially, to thisthese old oneones:
The value $\pm 1$ for the square root of Wilson's theorem, ((p-1)/2)! mod p
Primes P such that ((P-1)/2)!=1 mod P
When $p\equiv 1 \mod 4$, if $x=((p-1)/2)!$, then $x^2 = -1 \mod p$.
For what primes does $x \in \{1,\ldots,(p-1)/2\}$ (the elements of the set regarded as residues $\mod p$)?
One gets "yes" for $5,13,29,41,53,61,73,89,97,\ldots$ and "no" for $17,37,101,\ldots$. Despite the slow start for "no", the counts substantially even out, say, when looking at primes up to 100000. Can one prove that the ratio approaches $1/2$?