TITLE: Is $-\det\big[\big(\frac{i^2+j^2}p\big)\big]_{1\le i,j\le (p-1)/2}$ always a square for each prime $p\equiv 3\pmod 4$?
QUESTION [13 upvotes]: Let $p$ be an odd prime and let $S_p$ denote the determinant
$$\det\left[\left(\frac{i^2+j^2}p\right)\right]_{1\le i,j\le (p-1)/2}$$
with $(\frac{\cdot}p)$ the Legendre symbol. By Theorem 1.2 of my paper arXiv:1308.2900 available from http://arxiv.org/abs/1308.2900, $-S_p$ is a quadratic residue modulo $p$. Here I ask a further question.
QUESTION. Is it true that for each prime $p\equiv3\pmod4$ the number $-S_p$ is always a positive square divisible by $2^{(p-3)/2}$? 
Define $a_p=\sqrt{-S_p}/2^{(p-3)/4}$ for any prime $p\equiv3\pmod4$. Then
\begin{gather*}a_3=a_7=a_{11}=1,\ a_{19}=2,\ a_{23}=1,\ a_{31}=29,\ a_{43}=254,
\\a_{47}=367,\ a_{59}=9743,\ a_{67}=305092,\ a_{71}=29,\ a_{79}=1916927.
\end{gather*}
I have computed the values of $a_p$ for all primes $p\equiv3\pmod4$ with $p<2000$. Based on the numerical data, I conjecture that the above question has an affirmative answer but I'm unable to prove this. 
Any ideas towards the solution? Your comments are welcome!

REPLY [13 votes]: It can be seen that $S_p$ is not divisible by $p$. The argument about the decomposition of the matrix as $\frac{2}{i\sqrt{p}}A^2$ suggested above implies that $-S_p$ is a square in $\mathbb{Q}[\zeta_p][\sqrt{\lambda_p}]$, where $\lambda_p=-2i\sqrt{p}$. Writing $-S_p=(a\sqrt{\lambda_p}+b)^2$ with $a,b\in\mathbb{Q}[\zeta_p]$, we have $ab=0$ (since $S_p^2\in\mathbb{Z}\subset\mathbb{Q}[\zeta_p]$ and $\sqrt{\lambda_p}\not\in\mathbb{Q}[\zeta_p]$). The case $b=0$ is impossible as then $S_p$ is divisible by $p$, which follows from the fact that the norm of $\lambda_p$ is divisible by an odd power of $p$. Thus $-S_p=b^2$ with $b\in\mathbb{Q}[\zeta_p]$, which implies $-S_p$ is a square since $S_p$ is not divisible by $p$.