Let's say we start with a matrix $A$ and perform a row operation of multiplying some row $R_i$ by a non-zero scalar $c$ and get a new matrix $A'$. What is the relation between $\det(A)$ and $\det(A')$? Since the determinant is a multilinear functions of the rows of $A$, we have
$$ \det(A') = c \det(A) \iff \det(A) = \frac{1}{c} \det(A'). $$
If we perform various row operations on $A$, the only operations which change the determinant are the multiplication operations. If we have performed multiplication operations by $c_1,\dots,c_k$ (and maybe other row operations) and arrived to the matrix $A'$, we have
$$ \det(A) = \frac{1}{c_1 \dots c_k} \det(A'). $$
In particular, if you reduced $A$ to an upper diagonal matrix $A'$ whose diagonal entries are $1$ then $\det(A') = 1$ and so
$$ \det(A) = \frac{1}{c_1 \dots c_k}. $$
The formula proposed is indeed correct.
Let $J$ be the all-$1$'s matrix, $I$ the identity, and $N$ the (nilpotent) matrix with $n_{i,j}=\delta_{i,i+1}$.
Then the matrix whose determinant we seek is $A:=2J+I-N+N^2$.
For a moment let us write this as $A=2J+P$, or in terms of columns $A=[2u+p_1,2u+p_2,\dots,2u+p_n]$, with $u$ the all-$1$s vector. Using the linearity of $\det$ as a function of columns, and the fact that $\det$ is zero when two columns are the same, we see that
$$
\det A=2\sum_{k=1}^{n}\det[p_1,\dots,p_{k-1},u,p_{k+1},\dots,p_n] +\det P.
$$
Now in our case $P$ is upper unitriangular, so its determinant is $1$. Since all the entries of $u$ are $1$ we see that when we expand each of these determinants by this column, and then sum over $k$ all we are doing is summing the cofactors of $P$.
That is
$$
\det A= 1+2\times \textrm{ the sum of the cofactors of $I-N+N^2$.}
$$
The matrix $I-N+N^2$ is (as we have said) of determinant $1$ and so the sum of its cofactors is exactly the same as the sum of the entries of $(I-N+N^2)^{-1}$.
That is
$$
\det A= 1+ 2\times \textrm{the sum of the entries of $(I-N+N^2)^{-1}$.}
$$
Let us then find a useful expression for $(1-x+x^2)^{-1}$. Noting that this is the minimal polynomial for the sixth roots of unity we see that
$$
(1-x+x^2)^{-1}=
\frac{(1-x^2)(1+x+x^3)}{1-x^6}=
\frac{(1+x-x^3-x^4}{1-x^6}=
(1+x-x^3-x^4)\sum_{k=0}^\infty x^{6k}.
$$
This gives us a formula for the entries of our matrix $(I-N+N^2)^{-1}$. There are $1$'s on the diagonal, $1$s on the (partial) diagonal above these, then $0$s, then $-1$s, then $-1$s, then $0$s; after that the pattern repeats.
By simple inspection of these matrices and summing their entries we can check that the proposed formula holds for $n=1,2,3,4,5,6$.
To prove that the formula holds in general we need to check that increasing the dimension by $6$ increases the sum of the entries by $6$.
So let us write $A_n$ for the relevant matrix in dimension $n$. We then have that
$$
A_{n+6}
=\begin{bmatrix}
A_{6} & B\\
O & A_n
\end{bmatrix}
$$
where $B$ is a matrix of six rows and $n$ columns, these columns being the cyclic permutations of $(1,1,0,-1,-1,0)^T$, so that the column sums of $B$ are all equal to $0$.
With $u$ as the all-$1$'s vector of dimension $6$ and $v$ the all-$1$s vector of dimension $n$ we have that the sum of the entries of $A_{n+6}$ is
$$
[u^ T v^T]A_{n+6}\begin{bmatrix} u\\v\end{bmatrix}
=
u^T A_6 u+ u^T B v+ v^T A_n v,
=
u^T A_6 u+ v^T A_n v.
$$
That is, passing from dimension $n$ to dimension $n+6$ increases the sum of the entries by exactly the sum of the entries of $A_6$, that is by $6$ as required.
Best Answer
Let $A\in\mathbb Z^{n\times n}$ such that $A^{-1}\in\mathbb Z^{n\times n}$. Note that the determinant of an integer matrix is an integer, so $\det\colon\mathbb Z^{n\times n}\to \mathbb Z$. Now, $1=\det(\mathbb I)=\det(A\cdot A^{-1})=\det(A)\cdot\det(A^{-1})$. Since both $\det(A)$ and $\det(A^{-1})$ are integers, they can only be $1$ or $-1$.