Let $p$ be a prime number and $S\_p=\{(n!)^2 \bmod p, n=1,2,\dotsc,p-1\}$ the set of residues mod $p$ of squares of factorials. This set is obviously a subset of the group of quadratic residues mod p. For $p=3,5,7,13,17,23,29$ it is also a group for multiplication mod $p$, i.e. a subgroup of the group of quadratic residues.



> 
> Question: Are there infinitely many primes $p$ for which $S\_p$ is a group modulo $p$?
> 
> 
> 



Quadratic character of factorials
In view of the identity $(n!)^2/((n-1)!)^2=n^2$, the set $S\_p$ generates the subgroup $Q\_p<\mathbb F\_p^\times$ of quadratic residues; thus, if $S\_p$ is a subgroup, then in fact $S\_p=Q\_p$. Clearly, a necessary and sufficient condition for this to happen is that the sequence of factorials $\{1!,\dotsc,(p-1)!\}$ hits at least one element out of each pair $(a,p-a)$, $1\le a\le (p-1)/2$.


The sequence $\{n!\}\_{1\le n\le p-1}$ has been studied by a number of authors (see, for instance, [this recent paper](https://arxiv.org/abs/1505.01198) and those referenced therein), and is known to be surprisingly difficult. I therefore doubt anything definite can be proved in this direction.


