TITLE: Possible values of the determinant for matrices with elements $\{1, 0, -1\}$
QUESTION [15 upvotes]: For matrices with elements $\{-1, 1\}$ it is known from here that the possible absolute values of determinants of $n \times n$, $n \leq 6$ matrices with entries $\{-1, 1\}$ are as follows:
n=1: 1  

n=2: 0,2

n=3: 0,4

n=4: 0,8,16

n=5: 0,16,32,48

n=6: 0,32,64,96,128,160

Are there any known such results for matrices with elements $\{-1, 0, 1\}$?
I have found the following resource here, but unfortunately, it does not go beyond $n=5$. I am interested in such results and methods for $n>5$.
One motivating question I am trying to answer is the following: is there a $\{1, 0, -1\}$ matrix of order $6$ with the absolute value of the determinant equal to 27?

REPLY [24 votes]: Here's a large subset of possible determinants, which may be enough for your application. With $n\times n$ matrices, one can achieve any integral determinant in the interval $[-2^{n-1},2^{n-1}]$.
Specifically, as @nathaniel-johnston notes, the answer to your example question is yes.  There's actually straightforward way to construct the matrix (without a computer search).  Consider matrices of the form
$$M_b=
\begin{bmatrix}
   b_0&  1&  1&  1&  1&  1
\\ b_1& -1&  1&  1&  1&  1
\\ b_2&  0& -1&  1&  1&  1
\\ b_3&  0&  0& -1&  1&  1
\\ b_4&  0&  0&  0& -1&  1
\\ b_5&  0&  0&  0&  0& -1
\end{bmatrix}.
$$
Then $-\det(M_b)=b_0+b_1+2b_2+4b_3+8b_4+16b_5$.  By picking $b_j\in\{0,1\}$ and using binary, one can get $\det(M_b)$ to be any integer in $[-32, 32]$.
So concretely for your example,
$$\det\left(\begin{bmatrix}
   1&  1&  1&  1&  1&  1
\\ 0& -1&  1&  1&  1&  1
\\ 1&  0& -1&  1&  1&  1
\\ 0&  0&  0& -1&  1&  1
\\ 1&  0&  0&  0& -1&  1
\\ 1&  0&  0&  0&  0& -1
\end{bmatrix}\right)=-27.$$
This technique generalizes to any size matrix.  Place $-1$s on the diagonal, $1$s above the diagonal, $0$s below the diagonal, then replace the first column with the binary expansion of your target determinant.  The proof of this fact notes that the first row of the inverse of $M_{10\cdots 0}$ are the powers of two, then the cofactor expansion of the determinant along the first column means you get to sum powers of two to obtain possible determinants.
An almost identical proof is given in more detail in this paper (shameless plug of my own work, which is was also linked to by @sandeep in the comments of your post.)