TITLE: Does $n^2$ divide $\det\left[\left(\frac{i^2+2ij+3j^2}n\right)\right]_{1\le i,j\le n-1}$ for each odd integer $n>3$?
QUESTION [13 upvotes]: For any odd integer $n>1$ and integers $c$ and $d$, define
$$(c,d)_n:=\det\left[\left(\frac{i^2+cij+dj^2}n\right)\right]_{1\le i,j\le n-1},$$
where $(\frac{\cdot}n)$ is the Jacobi symbol. It is easy to show that $(c,d)_n=0$ if $(\frac dn)=-1.$
QUESTION: Does $n^2$ divide $(2,3)_n$ for each odd integer $n>3$?
My computation led me to conjecture that $n^2\mid (2,3)_n$ for any odd integer $n>3$ and also $n^2\mid (6,15)_n$ for any odd integer $n>5$.
For any positive integer $n\equiv\pm5\pmod{12}$, we have $(\frac 3n)=-1$ and hence $(2,3)_n=0$. Also, I observe that $(2,3)_n=0$ if $n>3$ and $n\equiv 3\pmod 6$. But I don't see why $(2,3)\equiv0\pmod{n^2}$ for each positive integer $n\equiv\pm1\pmod{12}$. Note that
$$\frac{(2,3)_{11}}{11^2}=-2^3\ \ \text{and}\ \ \frac{(2,3)_{37}}{37^2}=2^{44}\times467^2.$$
I also have some other questions concerning $(c,d)_n$. For example, I conjecture that $(6,1)_n=0$ for any positive integer $n\equiv 3\pmod4$. For more such questions, one may consult my preprint On some determinants with Legendre symbol entries.
Any ideas helpful to the question ?

REPLY [3 votes]: This is not an answer, either. Just some attempts to attack the problem.
Let $r(n)$ be the square-free part of $(2, 3)_n$, i.e. $r(n)$ is square-free and we have $(2, 3)_n = r(n) B^2$ for some integer $B$. We have the following table of the values of $r(n)$:
n       r(n)
11      -2
23      2
37      1
47      -6
59      -2
61      1
71      -2
73      -5
83      6
97      -3
107     -6
109     -1
131     6
157     -7
167     2
179     -6
181     7
191     3
193     -1
227     -2
229     -5
239     2
241     7
251     -10
253     -1
263     -1
277     -1
313     -13
337     -1
347     2
349     -7
359     -10
373     -7
383     -1
397     5

Note the composite number $253 = 11 \times 23$, with $r(253) = r(11)r(23)$. This seems to be true in general (identities in $\mathbb{Q}^\times/\mathbb{Q}^{\times 2}$):
n       r(n)
11*23   -1      = r(11) * r(23)
11*37   -2      = r(11) * r(37)
11*47   3       = r(11) * r(47)
11*59   1       = r(11) * r(59)
23*37   2       = r(23) * r(37)
23*47   -3      = r(23) * r(47)

This observation might be proved by using Chinese remainder theorem to rewrite the matrix as some sort of tensor product (not sure about the details, but seems doable). For non-square-free $n$, however, the determinant seems always zero.
This suggests that we could concentrate on the case where $n = p$ is a prime number.
In this case, the original conjecture (i.e. $p^2$ divides $(2, 3)_p$) is implied by the following two statements:

$p$ divides $(2, 3)_p$;
$p$ does not divide $r(p)$.


Now 1. might be easier (than the original problem) to prove, since we can then do calculations in $\mathbb{F}_p$, and write the Jacobi symbol as $x^{p-1}$. This is again just a very rough idea.
As to 2., the thing to notice is that, although $(2, 3)_n$ is extremely large, the numbers $r(n)$ are surprisingly small. I don't see any explanation to this phenomenon.

Concerning generalizations of these statements:
Statement 2. seems to be quite general. For almost arbitrary choice of parameters $(c, d)$, one always observes very small values of $r(n)$.
Statement 1., however, depends strongly on the choices of $(c, d)$. So far I only see this phenomenon occuring for the following choices:
"good" (c, d)
(2, 3)
(4, 12)
(6, 27)
(8, 48)
......

(6, 15)
(12, 60)
(18, 135)
(24, 240)
......

Of course, a pair $(c, d)$ is not quite different from $(ac, a^2d)$, since the columns are just permuted, and the determinants only possibly differ by sign. So essentially there are only two "primitive" cases: $(c, d) = (2, 3), (6, 15)$. These two are essentially different, as can be seen from the difference between the $r(n)$ values.
I have no idea how to find more examples of "good" pairs $(c, d)$.

UPDATE:
I think it might be more natural to look at the $n \times n$ matrix, by adding the indices with $i = 0$ or $j = 0$. Let us call the determinant of this larger matrix $[2, 3]_n$.
It appears that in most cases $[2, 3]_n$ is a multiple of $(2, 3)_n$. In particular, when $n = p$ is a prime number for which $(2, 3)_p$ is non-zero, then we have $[2, 3]_p = \frac{p - 1}{2}(2, 3)_p$. When $n = pq$ is a product of two primes for which $(2, 3)_n$ is non-zero, then we have $[2, 3]_n = \frac{p-1}{2}\frac{q-1}{2}(2,3)_n$.
The advantage of considering $[2, 3]_n$ is the following obvious formula:
$$ [2, 3]_{nm} = [2, 3]_n^m [2, 3]_m^n, $$
whenever $n, m$ are coprime. This then reduces the statements above to the case of prime numbers.