prove or disprove :
if $p$ is a prime such that $p \equiv 1 \pmod 4$ then the product of all the quadratic residues $\pmod p$ is congruent to $1$ mod $p$.
I think it is false statement for $p=5$ and all the quadratic residues will be look like $n^2$ where $n$ from $1$ and $2$
so $1 \cdot 4 =4 \equiv 4 \not \equiv 1 \pmod 5$ but I do not know how can I explain that , could you please help me?
We will prove that this product is congruent $-1\pmod p$.
Let $p=4k+1$. Let $g$ be a primitive root modulo $p$. All quadratic residues modulo $p$ have form $g^{2s}$ for some $0\leq s\leq 2k-1$. Hence, product of all quadratic residues equal to $g^{\sum_{s=0}^{2k-1}2s}$, or $g^{2k(2k-1)}$. Note that $g^{2k}\equiv -1 \pmod p$, since $g$ is primitive root modulo $p$. Therefore, product of quadratic residues equal to $-1$.