# nt.number theory – A determinant involving the cotangent function

Let $$n>1$$ be odd. In my 2019 preprint On some determinants involving the tangent function, I proved that
$$detleft(tanpifrac{aj+bk}nright)_{1le j,kle n-1}=left(frac{-ab}nright)n^{n-2}$$
for any integers $$a$$ and $$b$$ with $$gcd(ab,n)=1$$, where $$(frac{cdot}n)$$ denotes the Jacobi symbol; in particular,
$$detleft(tanpifrac{j-k}nright)_{1le j,kle n-1}=n^{n-2}.$$

Note that
$$tanpi x=frac{2sinpi x}{2cospi x}=ifrac{1-e^{2pi ix}}{1+e^{2pi i x}}.$$
So I actually evaluated the determinant
$$detleft(frac{1-zeta^{j-k}}{1+zeta^{j-k}}right)_{1le j,kle n-1}$$
with $$zeta=e^{2pi i/n}$$. For $$j,k=1,ldots,n-1$$ let’s define
$$f(j,k)=begin{cases}cotpifrac{j-k}n&text{if} jnot=k,\0&text{if} j=k.end{cases}tag{*}$$
When $$jnot=k$$, we have
$$f(j,k)=-ifrac{1+zeta^{j-k}}{1-zeta^{j-k}}$$
Thus
begin{align*}det(f(j,k))_{1le j,kle n-1}=&sum_{tauin D(n-1)}mathrm{sign}(tau)(-i)^{n-1}prod_{j=1}^{n-1}frac{1+zeta^{j-tau(j)}}{1-zeta^{j-tau(j)}} \=&(-1)^{(n-1)/2}sum_{tauin D(n-1)}mathrm{sign}(tau)prod_{j=1}^{n-1}frac{1+zeta^{j+tau(j)}}{1-zeta^{j-tau(j)}}, end{align*}
where
$$D(n-1)={tauin S_{n-1}: tau(j)not=j text{for all} j=1,ldots,n-1}.$$

Motivated by the above and Question 403025 of mine, I have formulated the following new conjecture.

Conjecture. Let $$n>1$$ be an odd number. Then
$$sum_{tauin D(n-1)}mathrm{sign}(tau)prod_{j=1}^{n-1}frac{1+zeta^{j-tau(j)}}{1-zeta^{j-tau(j)}}=frac{(-1)^{(n-1)/2}}n((n-2)!!)^2tag{1}$$
for any primitive $$n$$-th root $$zeta$$ of unity; in particular,
$$det(f(j,k))_{1le j,kle n-1}=frac{((n-2)!!)^2}ntag{2}$$
with $$f(j,k)$$ given by $$(*)$$.

My numerical computaton supports this conjecture.

QUESTION. Is the conjecture true? Can one supply a proof?