This question is related to the matrices described in [Deyi Chen's recent MO post](https://mathoverflow.net/questions/402572/euler-numbers-and-permanent-of-matrices) (look at some examples there). The main difference: we are asking for a determinant evaluation instead of a permanent, plus we have added variables. Define the sequence
$$f\_n=\mathrm{det}\left[x\_{i-j}\cdot\operatorname{sgn} \left(\tan\frac{(i+j)\pi}{2n+1} \right)\right]\_{1\le i, \,j\le 2n},$$
where $n\geq1$ and $\operatorname{sgn}$ is the sign-function; i.e. $\operatorname{sgn}(y)=1$ if $y>0$; $\operatorname{sgn}(y)=-1$ if $y<0$; $\operatorname{sgn}(0)=0$.


If we set all $x\_k=1$, user44191 offers an alternative description of the matrix: $n−1$ antidiagonals of $1$'s, $n$ antidiagonals of $-1$'s, an antidiagonal of $0$'s, $n$ antidiagonals of $1$'s, and $n-1$ antidiagonals of $-1$'s, in the given order.



> 
> **QUESTION 1.** Is this true? The determinant equals $f\_n=(-1)^nP(\dots,x\_{-2},x\_{-1},x\_0,x\_1,x\_2,\dots)^2$ for some **squared** polynomial $P$ of several variables (coefficients in $\mathbb{Z}$) so that each of its monomials is of the form $x\_{i\_1}x\_{i\_2}\cdots x\_{i\_m}$ with $i\_1+i\_2+\cdots+i\_m=0$.
> 
> 
> 



> 
> **QUESTION 2 (specialization).** Is this true? If we set $x\_k=1$, for all $k$, then $f\_n=(-1)^n$.
> 
> 
> 


**Example.** For instance,
$$f\_2=
\det\left[ \begin {array}{cccc} 
x\_0&-x\_{-1}&-x\_{-2}&0\\ 
-x\_1&-x\_0&0&x\_{-2} \\
-x\_2&0&x\_0&x\_{-1}\\ 
0&x\_2&x\_1&-x\_0
\end {array} \right]
=(x\_{-2}x\_2-x\_{-1}x\_1-x\_0^2)^2.$$


**Example.** The matrix for $n=3$ and its determinant:
$$
\left[ \begin {array}{cccccc} x\_0&x\_{-1}&-x\_{-2}&-x\_{-3}&-x\_{-4}&0\\ 
x\_1&-x\_0&-x\_{-1}&-x\_{-2}&0&x\_{-4}\\ 
-x\_2&-x\_1&-x\_0&0&x\_{-2}&x\_{-3}\\ 
-x\_3&-x\_2&0&x\_0&x\_{-1}&x\_{-2}\\ 
-x\_4&0&x\_2&x\_1&x\_0&-x\_{-1}\\ 
0&x\_4&x\_3&x\_2&-x\_1&-x\_0
\end {array} \right],
$$
\begin{align\*}
f\_3&=-(x\_{-4}x\_0x\_4 - x\_{-4}x\_{1}x\_3 + x\_{-4}x\_2^2 - x\_{-3}x\_{-1}x\_4 + x\_{-3}x\_0x\_3 \\
& \qquad + x\_{-3}x\_1x\_2 + x\_{-2}^2x\_4 + x\_{-2}x\_{-1}x\_3 - 2x\_{-2}x\_0x\_2 \\
& \qquad - x\_{-2}x\_1^2 - x\_{-1}^2x\_2 - x\_0^3)^2.
\end{align\*}



Determinants of striped Hankel matrices
**to Question 1:** Yes.


To prove this, let me fix a positive integer $n$ and denote your matrix (whose
determinant $f\_{n}$ is) by $A$. The notation $\left[ k\right] $ shall be
used for the set $\left\{ 1,2,\ldots,k\right\} $ whenever $k$ is an integer.
The notation $M\_{i,j}$ will be used for the $\left( i,j\right) $-th entry of
any matrix $M$. Thus,
\begin{equation}
A\_{i,j}=x\_{i-j}\cdot\operatorname\*{sgn}\left( \tan\dfrac{\left( i+j\right)
\pi}{2n+1}\right)
\label{eq.darij1.1}
\tag{1}
\end{equation}
for any $i,j\in\left[ 2n\right] $.


Let $B$ be the $2n\times2n$-matrix obtained by "turning $A$ upside down",
i.e., reversing the order of the rows of $A$. Explicitly, this means that
\begin{equation}
B\_{i,j}=A\_{2n+1-i,j}\qquad\text{for all }i,j\in\left[ 2n\right]
.
\label{eq.darij1.2}
\tag{2}
\end{equation}
We note that $B$ can be obtained from $A$ by $n$ row-swaps (i.e., by $n$
steps, where each step swaps a pair of rows). Indeed, all we need to do is to
swap the $1$-st and the last row, then to swap the $2$-nd and the
$2$-nd-to-last row, etc., until we reach the middle of the matrix. Since each
of these swaps multiplies the determinant by $-1$, this entails that
\begin{equation}
\det B=\left( -1\right) ^{n}\det A.
\label{eq.darij1.3}
\tag{3}
\end{equation}


Now, I claim that the matrix $B$ is alternating -- i.e., that
\begin{equation}
B\_{i,i}=0\qquad\text{for all }i\in\left[ 2n\right]
\label{eq.darij1.4}
\tag{4}
\end{equation}
and
\begin{equation}
B\_{i,j}=-B\_{j,i}\qquad\text{for all }i,j\in\left[ 2n\right]
.
\label{eq.darij1.5}
\tag{5}
\end{equation}


Indeed, in order to prove \eqref{eq.darij1.4}, it suffices to observe that
\begin{align\*}
B\_{i,i} & =A\_{2n+1-i,i}=x\_{\left( 2n+1-i\right) -i}\cdot\operatorname\*{sgn}
\left( \tan\dfrac{\left( \left( 2n+1-i\right) +i\right) \pi}
{2n+1}\right) \\
& =x\_{2n+1-2i}\cdot\underbrace{\operatorname\*{sgn}\left( \tan\dfrac{\left(
2n+1\right) \pi}{2n+1}\right) }\_{=\operatorname\*{sgn}\left( \tan\pi\right)
=\operatorname\*{sgn}0=0}=0.
\end{align\*}
The proof of \eqref{eq.darij1.5} is not much harder (using the fact that
$\dfrac{\left( 2n+1-i+j\right) \pi}{2n+1}=\pi-\dfrac{\left( i-j\right)
\pi}{2n+1}$ and therefore
\begin{align}
\tan\dfrac{\left( 2n+1-i+j\right) \pi}{2n+1}=\tan\left( \pi-\dfrac{\left(
i-j\right) \pi}{2n+1}\right) =-\tan\dfrac{\left( i-j\right) \pi}{2n+1},
\end{align}
and furthermore $\tan$ is an odd function).


Thus, we know that the matrix $B$ is alternating. Hence, as for any
alternating $2n\times2n$-matrix, its determinant is the square of its
[Pfaffian](https://en.wikipedia.org/wiki/Pfaffian). In other words,
\begin{equation}
\det B=\left( \operatorname\*{Pf}B\right) ^{2},
\label{eq.darij1.6}
\tag{6}
\end{equation}
where $\operatorname\*{Pf}B$ denotes the Pfaffian of $B$. The latter Pfaffian
is a polynomial in the entries of the matrix with coefficients in $\mathbb{Z}
$. Since the entries of the matrix belong to $\mathbb{Z}\left[ \ldots
,x\_{-2},x\_{-1},x\_{0},x\_{1},x\_{2},\ldots\right] $, we thus conclude that the
Pfaffian belongs to $\mathbb{Z}\left[ \ldots,x\_{-2},x\_{-1},x\_{0},x\_{1}
,x\_{2},\ldots\right] $ as well. In other words,
\begin{equation}
\operatorname\*{Pf}B\in\mathbb{Z}\left[ \ldots,x\_{-2},x\_{-1},x\_{0},x\_{1}
,x\_{2},\ldots\right] .
\label{eq.darij1.7}
\tag{7}
\end{equation}


Now, \eqref{eq.darij1.3} yields
\begin{align}
\det A=\left( -1\right) ^{n}\det B=\left( -1\right) ^{n}\left(
\operatorname\*{Pf}B\right) ^{2}
\end{align}
(by \eqref{eq.darij1.6}). Because of \eqref{eq.darij1.7}, this shows that
$\det A$ equals $\left( -1\right) ^{n}\cdot P^{2}$ for some polynomial
$P\in\mathbb{Z}\left[ \ldots,x\_{-2},x\_{-1},x\_{0},x\_{1},x\_{2},\ldots\right] $
(namely, for $P=\operatorname\*{Pf}B$), exactly as claimed in Question 1.


In order to complete the answer to Question 1, we now need to show that each
monomial in $P=\operatorname\*{Pf}B$ is of the form $x\_{i\_{1}}x\_{i\_{2}}\cdots
x\_{i\_{n}}$ with $i\_{1}+i\_{2}+\cdots+i\_{n}=0$. This can be done in various
ways, but the easiest is probably the following: Let us equip the polynomial
ring $\mathbb{Z}\left[ \ldots,x\_{-2},x\_{-1},x\_{0},x\_{1},x\_{2},\ldots\right]
$ with a $\mathbb{Z}$-grading in which each indeterminate $x\_{i}$ is
homogeneous of degree $i$. Now, recall the explicit formula for the Pfaffian
as a sum over all perfect matchings on the set $\left[ 2n\right] $ (see Definition 3 in [Michel Goemans, *18.438 in Spring 2014, Lectures 4 and 6*](http://www-math.mit.edu/%7Egoemans/18438S14/lec4-algmat.pdf), or any
good textbook on Pfaffians). If
\begin{equation}
M=\left\{ \left\{ a\_{1},b\_{1}\right\} ,\left\{ a\_{2},b\_{2}\right\}
,\ldots,\left\{ a\_{n},b\_{n}\right\} \right\}
\label{eq.darij1.9o}
\tag{9}
\end{equation}
is such a perfect matching, then the corresponding addend in
$\operatorname\*{Pf}B$ is
\begin{equation}
\pm B\_{a\_{1},b\_{1}}B\_{a\_{2},b\_{2}}\cdots B\_{a\_{n},b\_{n}}.
\label{eq.darij1.9}
\tag{10}
\end{equation}
Each of the $n$ factors $B\_{a\_{i},b\_{i}}$ in this product can be rewritten as
\begin{align}
B\_{a\_{i},b\_{i}}=A\_{2n+1-a\_{i},b\_{i}}=x\_{\left( 2n+1-a\_{i}\right) -b\_{i}
}\cdot\left( 1\text{ or }-1\text{ or }0\right) ,
\end{align}
and thus (using our weird grading) is homogeneous of degree $\left(
2n+1-a\_{i}\right) -b\_{i}=2n+1-a\_{i}-b\_{i}$. Hence, the entire product
\eqref{eq.darij1.9} is homogeneous of degree
\begin{align\*}
\sum\_{i=1}^{n}\left( 2n+1-a\_{i}-b\_{i}\right) & =n\left( 2n+1\right)
-\underbrace{\sum\_{i=1}^{n}\left( a\_{i}+b\_{i}\right) }
\_{\substack{=1+2+\cdots+2n\\\text{(since \eqref{eq.darij1.9o} is
a}\\\text{perfect matching of }\left[ 2n\right] \text{)}}}\\
& =n\left( 2n+1\right) -\left( 1+2+\cdots+2n\right) =0.
\end{align\*}
This means that this product is a $\mathbb{Z}$-linear combination of monomials
of the form $x\_{i\_{1}}x\_{i\_{2}}\cdots x\_{i\_{n}}$ with $i\_{1}+i\_{2}
+\cdots+i\_{n}=0$. Clearly, the same must therefore holds for the polynomial
$\operatorname\*{Pf}B$ (since this polynomial is a sum of such products). This
concludes the answer to Question 1.


Answering Question 2 requires proving that $\det B=1$ when all $x\_{i}$ are set
to $1$. This should be easy given that $\operatorname\*{sgn}\left( \tan
\dfrac{\left( i+j\right) \pi}{2n+1}\right) $ can be explicitly computed
(and the matrix $B$ becomes a circulant when all $x\_{i}$ are $1$); but it's
late here and I have too many things on my list until the quarter begins. Sorry!


