\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage[breaklinks=true]{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{needspace}
\usepackage{pythonhighlight}
\usepackage{tabls}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Monday, December 25, 2017 02:54:11}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows}
\newcounter{exer}
\newcounter{exera}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[section]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{condition}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{algorithm}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{conclusion}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newtheorem{exetwo}[exera]{Additional exercise}
\newenvironment{addexercise}[1][]
{\begin{exetwo}[#1]\begin{leftbar}}
{\end{leftbar}\end{exetwo}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\NOEXPAND{verbatimenv}[1]{\begin{verbatim}[#1]\end{verbatim}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\voffset=0cm
\hoffset=-0.7cm
\setlength\textheight{22.5cm}
\setlength\textwidth{15.5cm}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\newcommand{\id}{\operatorname{id}}
\ihead{The 4-periodic spiral determinant}
\ohead{page \thepage}
\cfoot{}
\begin{document}

\title{The 4-periodic spiral determinant}
\author{Darij Grinberg}
\date{rough draft,
%TCIMACRO{\TeXButton{today}{\today}}%
%BeginExpansion
\today
%EndExpansion
}
\maketitle
\tableofcontents

\section*{***}

The purpose of this note is to generalize the determinant formula conjectured
by Amdeberhan in \cite{Amdebe17} and outline how it can be proven.

(Unfortunately, neither the generalization nor its proof are aesthetically
rewarding; major parts of the proof are computations and case distinctions,
and some of them have been relegated to the SageMath computer algebra system,
although in theory they could have been done by hand. I hope that at least the
method is of some interest.)

\subsubsection{Acknowledgments}

The first part of the below proof of Theorem \ref{thm.detM} (essentially, the
construction of the matrix $P$) has been anticipated in the comment of
\textquotedblleft user44191\textquotedblright\ on the MathOverflow question
\cite{Amdebe17}. SageMath \cite{sage} was used to perform the necessary computations.

\section{The determinant}

We set $\mathbb{N}=\left\{  0,1,2,\ldots\right\}  $. For any $n\in\mathbb{N}$,
we let $\left[  n\right]  $ denote the set $\left\{  1,2,\ldots,n\right\}  $.

We fix a commutative ring $\mathbb{K}$.

\begin{definition}
Let $n\in\mathbb{N}$ and $m\in\mathbb{N}$. Let $A\in\mathbb{K}^{n\times m}$ be
a matrix.

\textbf{(a)} For any $i\in\left[  n\right]  $ and $j\in\left[  m\right]  $, we
let $A_{i,j}$ denote the $\left(  i,j\right)  $-th entry of $A$. Thus,
$A=\left(  A_{i,j}\right)  _{1\leq i\leq n,\ 1\leq j\leq m}$.

\textbf{(b)} If $I\subseteq\left[  n\right]  $ and $J\subseteq\left[
m\right]  $ are two sets, then $A_{I,J}$ denotes the submatrix of $A$ formed
by removing all rows whose indexes are not in $I$ and removing all rows whose
indexes are not in $J$. (Formally speaking: $A_{I,J}=\left(  A_{i_{x},j_{y}%
}\right)  _{1\leq x\leq p,\ 1\leq y\leq q}$, where the two sets $I$ and $J$
have been written in the forms $I=\left\{  i_{1}<i_{2}<\cdots<i_{p}\right\}  $
and $J=\left\{  j_{1}<j_{2}<\cdots<j_{q}\right\}  $.)

\textbf{(c)} We let $\operatorname*{rev}A$ denote the $n\times m$-matrix
$\left(  A_{n+1-i,m+1-j}\right)  _{1\leq i\leq n,\ 1\leq j\leq m}$. (This is
the matrix obtained by reflecting $A$ both vertically and horizontally, or
equivalently by rotating it $180^{\circ}$ around its center.)
\end{definition}

\begin{definition}
Let $\mathbf{a}=\left(  a_{0},a_{1},a_{2},\ldots\right)  \in\mathbb{K}%
^{\infty}$ be a sequence of elements of $\mathbb{K}$. For any $n\in\mathbb{N}%
$, we define a matrix $M_{n}\left(  \mathbf{a}\right)  \in\mathbb{K}^{n\times
n}$ recursively (over $n$), as follows:

\begin{itemize}
\item The $0\times0$-matrix $M_{0}\left(  \mathbf{a}\right)  $ is defined to
be the zero matrix $0\in\mathbb{K}^{0\times0}$.

\item Assume that $M_{n-1}\left(  \mathbf{a}\right)  \in\mathbb{K}^{\left(
n-1\right)  \times\left(  n-1\right)  }$ is already defined for some positive
integer $n$. Then, we define the $n\times n$-matrix $M_{n}\left(
\mathbf{a}\right)  \in\mathbb{K}^{n\times n}$ as follows:

\begin{itemize}
\item We have $\left(  M_{n}\left(  \mathbf{a}\right)  \right)  _{1,j}%
=a_{j-1}$ for each $j\in\left[  n\right]  $.

\item We have $\left(  M_{n}\left(  \mathbf{a}\right)  \right)  _{i,n}%
=a_{n+i-2}$ for each $i\in\left[  n\right]  $. (Thus, $\left(  M_{n}\left(
\mathbf{a}\right)  \right)  _{1,n}$ is defined twice, but the two definitions agree.)

\item We have $\operatorname*{rev}\left(  \left(  M_{n}\left(  \mathbf{a}%
\right)  \right)  _{\left\{  2,3,\ldots,n\right\}  ,\left[  n-1\right]
}\right)  =M_{n-1}\left(  a_{2n-1},a_{2n},a_{2n+1},\ldots\right)  $.
\end{itemize}
\end{itemize}

In visual terms, this definition translates as follows: To construct
$M_{n}\left(  \mathbf{a}\right)  $, start with an unfilled $n\times n$-matrix,
and then traverse all cells of the matrix (starting with the cell $\left(
1,1\right)  $) along a clockwise spiral (first traversing the $1$-st row until
cell $\left(  1,n\right)  $, then traversing the $n$-th column down until cell
$\left(  n,n\right)  $, then the $n$-th row to the left until cell $\left(
1,n\right)  $, then the $1$-st column up until cell $\left(  2,1\right)  $,
then the $2$-nd row until cell $\left(  2,n-1\right)  $, then the $\left(
n-1\right)  $-th column until cell $\left(  n-1,n-1\right)  $, and so on),
filling the cells with the elements $a_{0},a_{1},a_{2},\ldots$ in the order in
which they are encountered.
\end{definition}

\begin{example}
If $\mathbf{a}=\left(  a_{0},a_{1},a_{2},\ldots\right)  $, then%
\[
M_{5}\left(  \mathbf{a}\right)  =\left(
\begin{array}
[c]{ccccc}%
a_{0} & a_{1} & a_{2} & a_{3} & a_{4}\\
a_{15} & a_{16} & a_{17} & a_{18} & a_{5}\\
a_{14} & a_{23} & a_{24} & a_{19} & a_{6}\\
a_{13} & a_{22} & a_{21} & a_{20} & a_{7}\\
a_{12} & a_{11} & a_{10} & a_{9} & a_{8}%
\end{array}
\right)  .
\]

\end{example}

\begin{definition}
Let $a,b,c,d$ be four elements of $\mathbb{K}$. Then,
$\overrightarrow{a,b,c,d}$ shall denote the infinite sequence $\left(
a,b,c,d,a,b,c,d,a,\ldots\right)  $ which consists of $a,b,c,d$ endlessly
repeated in this order.
\end{definition}

\begin{example}
We have%
\[
M_{5}\left(  \overrightarrow{a,b,c,d}\right)  =\left(
\begin{array}
[c]{rrrrr}%
a & b & c & d & a\\
d & a & b & c & b\\
c & d & a & d & c\\
b & c & b & a & d\\
a & d & c & b & a
\end{array}
\right)
\]
and%
\[
M_{6}\left(  \overrightarrow{a,b,c,d}\right)  =\left(
\begin{array}
[c]{rrrrrr}%
a & b & c & d & a & b\\
d & a & b & c & d & c\\
c & d & a & b & a & d\\
b & c & d & c & b & a\\
a & b & a & d & c & b\\
d & c & b & a & d & c
\end{array}
\right)  .
\]

\end{example}

\begin{remark}
Here is some SageMath code to generate the matrix $M_{n}\left(
\overrightarrow{a,b,c,d}\right)  $. We are assuming that $a,b,c,d$ are four
elements \texttt{a,b,c,d} of a commutative ring \texttt{K}:

\begin{python}
def L(n, i, j):
	m = (j - i + 1 + 2 * min([n - i - j + 1, 0])) % 4
	return d if m == 0 else (a if m == 1 else (b if m == 2 else c))
	
def M(n):
	# This is the matrix M_n(a, b, c, d, a, b, c, d, a, ...).
	return Matrix(K, [[L(n, i, j) for j in range(1, n+1)]
	                  for i in range(1, n+1)])
\end{python}


This code works because of Lemma \ref{lem.Mij} below.
\end{remark}

We can now state the main theorem:

\begin{theorem}
\label{thm.detM}Assume that $2$ is invertible in $\mathbb{K}$. Let $a,b,c,d$
be four elements of $\mathbb{K}$. Let $\mathbf{a}$ be the infinite sequence
$\overrightarrow{a,b,c,d}$.

Define four further elements $u,v,U,V$ of $\mathbb{K}$ by%
\[
u=d-b,\ \ \ \ \ \ \ \ \ \ v=a-c,\ \ \ \ \ \ \ \ \ \ U=d+b\ \ \ \ \ \ \ \ \ \ \text{and}%
\ \ \ \ \ \ \ \ \ \ V=a+c.
\]


\textbf{(a)} If $n=4k$ for some positive integer $k$, then%
\[
\det\left(  M_{n}\left(  \mathbf{a}\right)  \right)  =\dfrac{1}{4}%
v^{n-4}\left(  v^{4}-u^{2}v^{2}+\left(  U^{2}-V^{2}\right)  \left(  \left(
2k-1\right)  ^{2}v^{2}-\left(  2k\right)  ^{2}u^{2}\right)  \right)  .
\]


\textbf{(b)} If $n=4k+2$ for some positive integer $k$, then%
\[
\det\left(  M_{n}\left(  \mathbf{a}\right)  \right)  =-\dfrac{1}{4}%
v^{n-4}\left(  v^{4}-u^{2}v^{2}+\left(  U^{2}-V^{2}\right)  \left(  \left(
2k+1\right)  ^{2}v^{2}-\left(  2k\right)  ^{2}u^{2}\right)  \right)  .
\]


\textbf{(c)} If $n=4k+1$ for some positive integer $k$, then%
\[
\det\left(  M_{n}\left(  \mathbf{a}\right)  \right)  =\dfrac{1}{2}%
u^{n-3}\left(  u^{2}\left(  v+V\right)  -\left(  2k\right)  ^{2}v\left(
U^{2}-V^{2}\right)  \right)  .
\]


\textbf{(d)} If $n=4k+3$ for some positive integer $k$, then%
\[
\det\left(  M_{n}\left(  \mathbf{a}\right)  \right)  =\dfrac{1}{2}%
vu^{n-3}\left(  u^{2}+vV-\left(  2k+1\right)  ^{2}\left(  U^{2}-V^{2}\right)
\right)  .
\]

\end{theorem}

A particular case of this theorem (for $\mathbb{K}=\mathbb{Q}$, $a=1$, $b=2$,
$c=3$ and $d=0$) is Amdeberhan's conjecture \cite{Amdebe17}:

\begin{corollary}
\label{cor.1230}Assume that $\mathbb{K}=\mathbb{Q}$. Let $p$ be a positive
integer. Then,%
\[
\det\left(  M_{2p}\left(  \overrightarrow{1,2,3,0}\right)  \right)  =3\left(
2p-1\right)  4^{p-1}%
\]
and%
\[
\det\left(  M_{2p+1}\left(  \overrightarrow{1,2,3,0}\right)  \right)
=-\left(  3p^{2}-1\right)  4^{p}.
\]

\end{corollary}

\section{The proof}

Corollary \ref{cor.1230} follows from Theorem \ref{thm.detM} by
straightforward computations (and case distinctions). It thus remains to prove
Theorem \ref{thm.detM}.

The proof will be laborious, but nothing less should have been expected from
the form of Theorem \ref{thm.detM}. We begin with notations.

Throughout this section, we let $\mathbb{K},a,b,c,d,u,v,U,V,\mathbf{a}$ be as
in Theorem \ref{thm.detM}. For each $i\in\mathbb{Z}$, set%
\begin{equation}
a_{i}=%
\begin{cases}
a, & \text{if }i\equiv0\operatorname{mod}4;\\
b, & \text{if }i\equiv1\operatorname{mod}4;\\
c, & \text{if }i\equiv2\operatorname{mod}4;\\
d, & \text{if }i\equiv3\operatorname{mod}4.
\end{cases}
\label{eq.ai}%
\end{equation}
Then, $\left(  a_{0},a_{1},a_{2},\ldots\right)  =\overrightarrow{a,b,c,d}%
=\mathbf{a}$ is a periodic sequence with period $4$. More precisely, the
two-sided infinite sequence $\left(  \ldots,a_{-2},a_{-1},a_{0},a_{1}%
,a_{2},\ldots\right)  $ is periodic with period $4$.

We let $n\geq4$ be an integer. We shall use the \textit{Iverson bracket
notation} (i.e., we let $\left[  \mathcal{A}\right]  $ denote the truth value
of any statement $\mathcal{A}$). Define a function $q:\mathbb{Z}%
\rightarrow\mathbb{Z}$ by%
\[
q\left(  m\right)  =\min\left\{  m,0\right\}  =\left[  m<0\right]
m\ \ \ \ \ \ \ \ \ \ \text{for each }m\in\mathbb{Z}.
\]
Thus, every $m\leq0$ satisfies $q\left(  m\right)  =m$, and every $m\geq0$
satisfies $q\left(  m\right)  =0$. It is easy to see that each integer $m$
satisfies%
\begin{equation}
q\left(  m\right)  +q\left(  -m\right)  =-\left\vert m\right\vert \equiv
m\operatorname{mod}2 \label{eq.q.4}%
\end{equation}
and thus%
\begin{equation}
2\left(  q\left(  m\right)  +q\left(  -m\right)  \right)  \equiv
2m\operatorname{mod}4, \label{eq.q.5}%
\end{equation}
so that%
\begin{equation}
2q\left(  -m\right)  \equiv2m-2q\left(  m\right)  \operatorname{mod}4.
\label{eq.q.6}%
\end{equation}


We can now state a more-or-less explicit formula for each entry of the matrix
$M_{n}\left(  \mathbf{a}\right)  $:

\begin{lemma}
\label{lem.Mij}For every $i\in\left[  n\right]  $ and $j\in\left[  n\right]
$, we have%
\begin{equation}
\left(  M_{n}\left(  \mathbf{a}\right)  \right)  _{i,j}=a_{j-i+2q\left(
n-i-j+1\right)  }. \label{eq.lem.Mij.eq}%
\end{equation}

\end{lemma}

\begin{proof}
[Proof of Lemma \ref{lem.Mij}.]Induction over $n$. The induction base is
obvious. For the induction step, we fix a positive integer $n$, and we fix
$i\in\left[  n\right]  $ and $j\in\left[  n\right]  $. We are in one of three cases:

\begin{itemize}
\item \textit{Case 1:} We have $i=1$. Thus, $\left(  M_{n}\left(
\mathbf{a}\right)  \right)  _{i,j}=\left(  M_{n}\left(  \mathbf{a}\right)
\right)  _{1,j}=a_{j-1}$ (by the definition of $M_{n}\left(  \mathbf{a}%
\right)  $). But
\[
j-\underbrace{i}_{=1}+2q\left(  n-\underbrace{i}_{=1}-j+1\right)
=j-1+2\underbrace{q\left(  n-j\right)  }_{\substack{=0\\\text{(since }%
n-j\geq0\text{)}}}=j-1,
\]
so that $a_{j-i+2q\left(  n-i-j+1\right)  }=a_{j-1}$. Hence, $\left(
M_{n}\left(  \mathbf{a}\right)  \right)  _{i,j}=a_{j-1}=a_{j-i+2q\left(
n-i-j+1\right)  }$. This proves (\ref{eq.lem.Mij.eq}) in Case 1.

\item \textit{Case 2:} We have $j=n$. Thus, $\left(  M_{n}\left(
\mathbf{a}\right)  \right)  _{i,j}=\left(  M_{n}\left(  \mathbf{a}\right)
\right)  _{i,n}=a_{n+i-2}$ (by the definition of $M_{n}\left(  \mathbf{a}%
\right)  $). But
\begin{align*}
\underbrace{j}_{=n}-i+2q\left(  n-i-\underbrace{j}_{=n}+1\right)   &
=n-i+2\underbrace{q\left(  1-i\right)  }_{\substack{=1-i\\\text{(since
}1-i\leq0\text{)}}}=n-i+2\left(  1-i\right) \\
&  =n-3i+2\equiv n+i-2\operatorname{mod}4,
\end{align*}
so that $a_{j-i+2q\left(  n-i-j+1\right)  }=a_{n+i-2}$ (since the two-sided
infinite sequence \newline$\left(  \ldots,a_{-2},a_{-1},a_{0},a_{1}%
,a_{2},\ldots\right)  $ is periodic with period $4$). Hence, $\left(
M_{n}\left(  \mathbf{a}\right)  \right)  _{i,j}=a_{n+i-2}=a_{j-i+2q\left(
n-i-j+1\right)  }$. This proves (\ref{eq.lem.Mij.eq}) in Case 2.

\item \textit{Case 3:} We have neither $i=1$ nor $j=n$. Thus, $i\in\left\{
2,3,\ldots,n\right\}  $ and $j\in\left[  n-1\right]  $. Now, recall that
$\operatorname*{rev}\left(  \left(  M_{n}\left(  \mathbf{a}\right)  \right)
_{\left\{  2,3,\ldots,n\right\}  ,\left[  n-1\right]  }\right)  =M_{n-1}%
\left(  a_{2n-1},a_{2n},a_{2n+1},\ldots\right)  $. Hence,%
\[
\left(  \left(  M_{n}\left(  \mathbf{a}\right)  \right)  _{\left\{
2,3,\ldots,n\right\}  ,\left[  n-1\right]  }\right)  _{i-1,j}=\left(
M_{n-1}\left(  a_{2n-1},a_{2n},a_{2n+1},\ldots\right)  \right)  _{n-\left(
i-1\right)  ,n-j}.
\]
But $\left(  a_{2n-1},a_{2n},a_{2n+1},\ldots\right)  =\overrightarrow{a_{2n-1}%
,a_{2n},a_{2n+1},a_{2n+2}}$ (since the sequence $\left(  a_{0},a_{1}%
,a_{2},\ldots\right)  $ is periodic with period $4$). Hence, the induction
hypothesis (applied to $n-1$, $a_{2n-1},a_{2n},a_{2n+1},a_{2n+2}$ and $\left(
a_{2n-1},a_{2n},a_{2n+1},\ldots\right)  $ instead of $n$, $a,b,c,d$ and
$\mathbf{a}$) shows that%
\[
\left(  M_{n-1}\left(  a_{2n-1},a_{2n},a_{2n+1},\ldots\right)  \right)
_{i,j}=a_{2n-1+\left(  j-i+2q\left(  \left(  n-1\right)  -i-j+1\right)
\right)  }%
\]
for all $i\in\left[  n-1\right]  $ and $j\in\left[  n-1\right]  $ (where, for
this sentence only, we let $i$ and $j$ denote arbitrary elements of $\left[
n-1\right]  $ rather than the two $i$ and $j$ we have fixed before). Applying
this to $n-\left(  i-1\right)  $ and $n-j$ instead of $i$ and $j$, we conclude
that%
\begin{align*}
&  \left(  M_{n-1}\left(  a_{2n-1},a_{2n},a_{2n+1},\ldots\right)  \right)
_{n-\left(  i-1\right)  ,n-j}\\
&  =a_{2n-1+\left(  \left(  n-j\right)  -\left(  n-\left(  i-1\right)
\right)  +2q\left(  \left(  n-1\right)  -\left(  n-\left(  i-1\right)
\right)  -\left(  n-j\right)  +1\right)  \right)  }.
\end{align*}
Altogether,
\begin{align*}
\left(  M_{n}\left(  \mathbf{a}\right)  \right)  _{i,j} &  =\left(  \left(
M_{n}\left(  \mathbf{a}\right)  \right)  _{\left\{  2,3,\ldots,n\right\}
,\left[  n-1\right]  }\right)  _{i-1,j}=\left(  M_{n-1}\left(  a_{2n-1}%
,a_{2n},a_{2n+1},\ldots\right)  \right)  _{n-\left(  i-1\right)  ,n-j}\\
&  =a_{2n-1+\left(  \left(  n-j\right)  -\left(  n-\left(  i-1\right)
\right)  +2q\left(  \left(  n-1\right)  -\left(  n-\left(  i-1\right)
\right)  -\left(  n-j\right)  +1\right)  \right)  }.
\end{align*}
But since%
\begin{align*}
&  2n-1+\left(  \left(  n-j\right)  -\left(  n-\left(  i-1\right)  \right)
+2q\left(  \left(  n-1\right)  -\left(  n-\left(  i-1\right)  \right)
-\left(  n-j\right)  +1\right)  \right)  \\
&  =\underbrace{2n-1+\left(  n-j\right)  -\left(  n-\left(  i-1\right)
\right)  }_{=2n-j-2+i}+2q\left(  \underbrace{\left(  n-1\right)  -\left(
n-\left(  i-1\right)  \right)  -\left(  n-j\right)  +1}_{=-\left(
n-i-j+1\right)  }\right)  \\
&  =2n-j-2+i+\underbrace{2q\left(  -\left(  n-i-j+1\right)  \right)
}_{\substack{\equiv2\left(  n-i-j+1\right)  -2q\left(  n-i-j+1\right)
\operatorname{mod}4\\\text{(by (\ref{eq.q.6}), applied to }m=n-i-j+1\text{)}%
}}\\
&  \equiv2n-j-2+i+2\left(  n-i-j+1\right)  -2q\left(  n-i-j+1\right)  \\
&  =4n-3j-i-2q\left(  n-i-j+1\right)  \\
&  \equiv j-i+2q\left(  n-i-j+1\right)  \operatorname{mod}4,
\end{align*}
we have%
\[
a_{2n-1+\left(  \left(  n-j\right)  -\left(  n-\left(  i-1\right)  \right)
+2q\left(  \left(  n-1\right)  -\left(  n-\left(  i-1\right)  \right)
-\left(  n-j\right)  +1\right)  \right)  }=a_{j-i+2q\left(  n-i-j+1\right)  },
\]
and thus%
\[
\left(  M_{n}\left(  \mathbf{a}\right)  \right)  _{i,j}=a_{2n-1+\left(
\left(  n-j\right)  -\left(  n-\left(  i-1\right)  \right)  +2q\left(  \left(
n-1\right)  -\left(  n-\left(  i-1\right)  \right)  -\left(  n-j\right)
+1\right)  \right)  }=a_{j-i+2q\left(  n-i-j+1\right)  }.
\]
This proves (\ref{eq.lem.Mij.eq}) in Case 3.
\end{itemize}

Hence, the proof of (\ref{eq.lem.Mij.eq}) is complete.
\end{proof}

We denote the $n\times n$-matrix $M_{n}\left(  \mathbf{a}\right)  $ by $L$.
Thus, (\ref{eq.lem.Mij.eq}) rewrites as follows:%
\begin{equation}
L_{i,j}=a_{j-i+2q\left(  n-i-j+1\right)  } \label{eq.Lij}%
\end{equation}
for all $i\in\left[  n\right]  $ and $j\in\left[  n\right]  $.

Next, we define an $n\times n$-matrix $P$ as follows:

\begin{itemize}
\item Start with the $n\times n$-matrix $L$.

\item For each $i\in\left\{  n,n-1,\ldots,5\right\}  $ (in this order), we
subtract the $\left(  i-4\right)  $-th row from the $i$-th row. (Note that the
order in which we perform these operations is chosen in such a way that the
row being subtracted has not been modified prior to being subtracted.)

\item For each $j\in\left\{  n,n-1,\ldots,5\right\}  $ (in this order), we
subtract the $\left(  j-4\right)  $-th column from the $j$-th column.

\item The resulting matrix we call $P$.
\end{itemize}

Thus, the entries of $P$ are explicitly given as follows:%
\begin{equation}
P_{i,j}=L_{i,j}-\left[  i>4\right]  L_{i-4,j}-\left[  j>4\right]
L_{i,j-4}+\left[  i>4\right]  \left[  j>4\right]  L_{i-4,j-4}. \label{eq.Pij}%
\end{equation}
Here, we are using the convention that if $\mathcal{A}$ is a false statement,
then $\left[  \mathcal{A}\right]  x$ is understood to be $0$ for any
expression $x$, even if $x$ is undefined. (Thus, $\left[  i>4\right]
L_{i-4,j}$ is $0$ when $i\leq4$.)

The matrix $P$ was obtained from $L$ by row transformations and column
transformations, all of which preserve the determinant. Hence,%
\begin{equation}
\det P=\det L. \label{eq.detP=}%
\end{equation}
But the matrix $P$ has a lot more zeroes than $L$, as the following examples demonstrate:

\begin{example}
Here is the matrix $P$ for $n=9$:%
\[
P=\left(
\begin{array}
[c]{rrrrrrrrr}%
a & b & c & d & 0 & 0 & 0 & 0 & 0\\
d & a & b & c & 0 & 0 & 0 & 0 & -u\\
c & d & a & b & 0 & 0 & 0 & u & 0\\
b & c & d & a & 0 & 0 & -u & 0 & u\\
0 & 0 & 0 & 0 & 0 & u & 0 & -u & 0\\
0 & 0 & 0 & 0 & -u & 0 & u & 0 & u\\
0 & 0 & 0 & u & 0 & -u & 0 & -u & 0\\
0 & 0 & -u & 0 & u & 0 & u & 0 & -u\\
0 & u & 0 & -u & 0 & -u & 0 & u & 0
\end{array}
\right)  .
\]


Here is the matrix $P$ for $n=10$:%
\[
P=\left(
\begin{array}
[c]{rrrrrrrrrr}%
a & b & c & d & 0 & 0 & 0 & 0 & 0 & 0\\
d & a & b & c & 0 & 0 & 0 & 0 & 0 & -v\\
c & d & a & b & 0 & 0 & 0 & 0 & v & 0\\
b & c & d & a & 0 & 0 & 0 & -v & 0 & v\\
0 & 0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0\\
0 & 0 & 0 & 0 & 0 & -v & 0 & v & 0 & v\\
0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v & 0\\
0 & 0 & 0 & -v & 0 & v & 0 & v & 0 & -v\\
0 & 0 & v & 0 & -v & 0 & -v & 0 & v & 0\\
0 & -v & 0 & v & 0 & v & 0 & -v & 0 & 0
\end{array}
\right)  .
\]


Here is the matrix $P$ for $n=11$:%
\[
P=\left(
\begin{array}
[c]{rrrrrrrrrrr}%
a & b & c & d & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
d & a & b & c & 0 & 0 & 0 & 0 & 0 & 0 & u\\
c & d & a & b & 0 & 0 & 0 & 0 & 0 & -u & 0\\
b & c & d & a & 0 & 0 & 0 & 0 & u & 0 & -u\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & -u & 0 & u & 0\\
0 & 0 & 0 & 0 & 0 & 0 & u & 0 & -u & 0 & -u\\
0 & 0 & 0 & 0 & 0 & -u & 0 & u & 0 & u & 0\\
0 & 0 & 0 & 0 & u & 0 & -u & 0 & -u & 0 & u\\
0 & 0 & 0 & -u & 0 & u & 0 & u & 0 & -u & 0\\
0 & 0 & u & 0 & -u & 0 & -u & 0 & u & 0 & 0\\
0 & -u & 0 & u & 0 & u & 0 & -u & 0 & 0 & 0
\end{array}
\right)  .
\]


Here is the matrix $P$ for $n=12$:%
\[
P=\left(
\begin{array}
[c]{rrrrrrrrrrrr}%
a & b & c & d & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
d & a & b & c & 0 & 0 & 0 & 0 & 0 & 0 & 0 & v\\
c & d & a & b & 0 & 0 & 0 & 0 & 0 & 0 & -v & 0\\
b & c & d & a & 0 & 0 & 0 & 0 & 0 & v & 0 & -v\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & -v & 0 & v & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v\\
0 & 0 & 0 & 0 & 0 & 0 & -v & 0 & v & 0 & v & 0\\
0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v & 0 & v\\
0 & 0 & 0 & 0 & -v & 0 & v & 0 & v & 0 & -v & 0\\
0 & 0 & 0 & v & 0 & -v & 0 & -v & 0 & v & 0 & 0\\
0 & 0 & -v & 0 & v & 0 & v & 0 & -v & 0 & 0 & 0\\
0 & v & 0 & -v & 0 & -v & 0 & v & 0 & 0 & 0 & 0
\end{array}
\right)  .
\]

\end{example}

These examples may suggest a pattern (for $n\geq7$):

\begin{itemize}
\item The submatrix $P_{\left[  4\right]  ,\left[  4\right]  }$ of $P$ is
$\left(
\begin{array}
[c]{rrrr}%
a & b & c & d\\
d & a & b & c\\
c & d & a & b\\
b & c & d & a
\end{array}
\right)  $.

\item The rest of the \textquotedblleft northwestern
triangle\textquotedblright\ of $P$ is filled with zeroes.

\item If $n$ is even, then the \textquotedblleft southeastern
triangle\textquotedblright\ beneath the anti-diagonal\ is filled with entries
$0,v,-v$ in a predictable way. If $n$ is odd, then the \textquotedblleft
southeastern triangle\textquotedblright\ is filled with entries $0,u,-u$ in a
predictable way.
\end{itemize}

We shall formalize this in a concrete formula in a few moments (Lemma
\ref{lem.Pij}). First, let us make one more definition: We set%
\[
w=%
\begin{cases}
v, & \text{if }n\text{ is even;}\\
u, & \text{if }n\text{ is odd.}%
\end{cases}
.
\]


\begin{lemma}
\label{lem.Pij}Let $n\geq7$.

\textbf{(a)} The submatrix $P_{\left[  4\right]  ,\left[  4\right]  }$ of $P$
is $\left(
\begin{array}
[c]{rrrr}%
a & b & c & d\\
d & a & b & c\\
c & d & a & b\\
b & c & d & a
\end{array}
\right)  $.

\textbf{(b)} Let $i\in\left[  n\right]  $ and $j\in\left[  n\right]  $ be such
that $\left(  i,j\right)  \notin\left[  4\right]  ^{2}$. Then,%
\[
P_{i,j}=\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor
+1}w%
\begin{cases}
1, & \text{if }i+j\in\left\{  n+2,n+4\right\}  ;\\
-1, & \text{if }i+j\in\left\{  n+6,n+8\right\}  ;\\
0, & \text{otherwise.}%
\end{cases}
.
\]

\end{lemma}

\begin{proof}
[Proof of Lemma \ref{lem.Pij}.]\textbf{(a)} From (\ref{eq.Pij}), we obtain
$P_{\left[  4\right]  ,\left[  4\right]  }=L_{\left[  4\right]  ,\left[
4\right]  }$, and this can be computed via (\ref{eq.Lij}). The condition
$n\geq7$ ensures that $q\left(  n-i-j+1\right)  =0$ whenever $i\in\left[
4\right]  $ and $j\in\left[  4\right]  $. This proves Lemma \ref{lem.Pij}
\textbf{(a)}.

\textbf{(b)} We are in one of the following three cases:

\textit{Case 1:} We have $i\in\left[  4\right]  $.

\textit{Case 2:} We have $j\in\left[  4\right]  $.

\textit{Case 3:} We have neither $i\in\left[  4\right]  $ nor $j\in\left[
4\right]  $.

We shall only consider Case 3; the other two cases are left to the reader.
Thus, we have neither $i\in\left[  4\right]  $ nor $j\in\left[  4\right]  $.
Hence, $i>4$ and $j>4$. Thus, (\ref{eq.Pij}) simplifies to%
\begin{align}
P_{i,j}  &  =L_{i,j}-L_{i-4,j}-L_{i,j-4}+L_{i-4,j-4}\nonumber\\
&  =a_{j-i+2q\left(  n-i-j+1\right)  }-a_{j-\left(  i-4\right)  +2q\left(
n-\left(  i-4\right)  -j+1\right)  }\nonumber\\
&  \ \ \ \ \ \ \ \ \ \ -a_{\left(  j-4\right)  -i+2q\left(  n-i-\left(
j-4\right)  +1\right)  }+a_{\left(  j-4\right)  -\left(  i-4\right)
+2q\left(  n-\left(  i-4\right)  -\left(  j-4\right)  +1\right)  }\nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{eq.Lij})}\right) \nonumber\\
&  =a_{j-i+2q\left(  n-i-j+1\right)  }-a_{j-i+4+2q\left(  n-i-j+5\right)
}-a_{j-4-i+2q\left(  n-i-j+5\right)  }+a_{j-i+2q\left(  n-i-j+9\right)
}\nonumber\\
&  =a_{j-i+2q\left(  n-i-j+1\right)  }-a_{j-i+2q\left(  n-i-j+5\right)
}-a_{j-i+2q\left(  n-i-j+5\right)  }+a_{j-i+2q\left(  n-i-j+9\right)
}\nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{here, we have gotten rid of some }4\text{'s in the subscripts}\\
\text{(since the two-sided infinite sequence }\left(  \ldots,a_{-2}%
,a_{-1},a_{0},a_{1},a_{2},\ldots\right) \\
\text{is periodic with period }4\text{)}%
\end{array}
\right) \nonumber\\
&  =a_{j-i+2q\left(  n-i-j+1\right)  }-2a_{j-i+2q\left(  n-i-j+5\right)
}+a_{j-i+2q\left(  n-i-j+9\right)  }. \label{pf.lem.Pij.c3.1}%
\end{align}
If the integer $n-i-j+1$ is even, then the integers $q\left(  n-i-j+1\right)
$, $q\left(  n-i-j+5\right)  $ and $q\left(  n-i-j+9\right)  $ are even
(because $q\left(  m\right)  $ is even for each even integer $m$), whence the
integers $2q\left(  n-i-j+1\right)  $, $2q\left(  n-i-j+5\right)  $ and
$2q\left(  n-i-j+9\right)  $ are divisible by $4$, and therefore the three
entries $a_{j-i+2q\left(  n-i-j+1\right)  }$, $a_{j-i+2q\left(
n-i-j+5\right)  }$ and $a_{j-i+2q\left(  n-i-j+9\right)  }$ are equal (since
the two-sided infinite sequence $\left(  \ldots,a_{-2},a_{-1},a_{0}%
,a_{1},a_{2},\ldots\right)  $ is periodic with period $4$). Hence, if the
integer $n-i-j+1$ is even, then (\ref{pf.lem.Pij.c3.1}) becomes%
\begin{align*}
P_{i,j}  &  =a_{j-i+2q\left(  n-i-j+1\right)  }-2a_{j-i+2q\left(
n-i-j+1\right)  }+a_{j-i+2q\left(  n-i-j+1\right)  }=0\\
&  =\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor +1}w%
\begin{cases}
1, & \text{if }i+j\in\left\{  n+2,n+4\right\}  ;\\
-1, & \text{if }i+j\in\left\{  n+6,n+8\right\}  ;\\
0, & \text{otherwise.}%
\end{cases}
\\
&  \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{since we have neither }i+j\in\left\{  n+2,n+4\right\} \\
\text{nor }i+j\in\left\{  n+6,n+8\right\}  \text{ (because }n-i-j+1\text{ is
even)}%
\end{array}
\right)  .
\end{align*}
Thus, if the integer $n-i-j+1$ is even, then Lemma \ref{lem.Pij} \textbf{(b)}
holds. Hence, for the rest of this proof, we WLOG assume that the integer
$n-i-j+1$ is odd. Hence, $i+j=n+k$ for some even $k\in\mathbb{Z}$. We are
therefore in one of the following six subcases:

\textit{Subcase 3.1:} We have $i+j<n+1$.

\textit{Subcase 3.2:} We have $i+j=n+2$.

\textit{Subcase 3.3:} We have $i+j=n+4$.

\textit{Subcase 3.4:} We have $i+j=n+6$.

\textit{Subcase 3.5:} We have $i+j=n+8$.

\textit{Subcase 3.6:} We have $i+j>n+9$.

Let us first consider Subcase 3.1. In this case, we have $i+j<n+1$. Hence, the
integers $n-i-j+1$, $n-i-j+5$ and $n-i-j+9$ are positive. Therefore, the
numbers $q\left(  n-i-j+1\right)  $, $q\left(  n-i-j+5\right)  $, $q\left(
n-i-j+9\right)  $ all equal $0$. Thus, (\ref{pf.lem.Pij.c3.1}) simplifies to
\begin{align*}
P_{i,j}  &  =a_{j-i+2\cdot0}-2a_{j-i+2q\cdot0}+a_{j-i+2q\cdot0}=0\\
&  =\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor +1}w%
\begin{cases}
1, & \text{if }i+j\in\left\{  n+2,n+4\right\}  ;\\
-1, & \text{if }i+j\in\left\{  n+6,n+8\right\}  ;\\
0, & \text{otherwise.}%
\end{cases}
\end{align*}
(since we have neither $i+j\in\left\{  n+2,n+4\right\}  $ nor $i+j\in\left\{
n+6,n+8\right\}  $ (because $i+j<n+1$)). Hence, Lemma \ref{lem.Pij}
\textbf{(b)} is proven in Subcase 3.1.

Let us now consider Subcase 3.2. In this case, we have $i+j=n+2$. Hence,
$n-i-j=-2$, and thus $q\left(  n-i-j+1\right)  =q\left(  -1\right)  =-1$,
$q\left(  n-i-j+5\right)  =q\left(  3\right)  =0$, $q\left(  n-i-j+9\right)
=q\left(  8\right)  =0$. Thus, (\ref{pf.lem.Pij.c3.1}) simplifies to%
\begin{align*}
P_{i,j}  &  =a_{j-i+2\cdot\left(  -1\right)  }-2a_{j-i+2q\cdot0}%
+a_{j-i+2q\cdot0}=a_{j-i-2}-a_{j-i}\\
&  =%
\begin{cases}
a, & \text{if }j-i-2\equiv0\operatorname{mod}4;\\
b, & \text{if }j-i-2\equiv1\operatorname{mod}4;\\
c, & \text{if }j-i-2\equiv2\operatorname{mod}4;\\
d, & \text{if }j-i-2\equiv3\operatorname{mod}4
\end{cases}
-%
\begin{cases}
a, & \text{if }j-i\equiv0\operatorname{mod}4;\\
b, & \text{if }j-i\equiv1\operatorname{mod}4;\\
c, & \text{if }j-i\equiv2\operatorname{mod}4;\\
d, & \text{if }j-i\equiv3\operatorname{mod}4
\end{cases}
\\
&  \ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{eq.ai})}\right) \\
&  =%
\begin{cases}
c, & \text{if }j-i\equiv0\operatorname{mod}4;\\
d, & \text{if }j-i\equiv1\operatorname{mod}4;\\
a, & \text{if }j-i\equiv2\operatorname{mod}4;\\
b, & \text{if }j-i\equiv3\operatorname{mod}4
\end{cases}
-%
\begin{cases}
a, & \text{if }j-i\equiv0\operatorname{mod}4;\\
b, & \text{if }j-i\equiv1\operatorname{mod}4;\\
c, & \text{if }j-i\equiv2\operatorname{mod}4;\\
d, & \text{if }j-i\equiv3\operatorname{mod}4
\end{cases}
\\
&  =%
\begin{cases}
c-a, & \text{if }j-i\equiv0\operatorname{mod}4;\\
d-b, & \text{if }j-i\equiv1\operatorname{mod}4;\\
a-c, & \text{if }j-i\equiv2\operatorname{mod}4;\\
b-d, & \text{if }j-i\equiv3\operatorname{mod}4
\end{cases}
=%
\begin{cases}
-v, & \text{if }j-i\equiv0\operatorname{mod}4;\\
u, & \text{if }j-i\equiv1\operatorname{mod}4;\\
v, & \text{if }j-i\equiv2\operatorname{mod}4;\\
-u, & \text{if }j-i\equiv3\operatorname{mod}4
\end{cases}
\\
&  =%
\begin{cases}
-v, & \text{if }i-j\equiv0\operatorname{mod}4;\\
u, & \text{if }i-j\equiv3\operatorname{mod}4;\\
v, & \text{if }i-j\equiv2\operatorname{mod}4;\\
-u, & \text{if }i-j\equiv1\operatorname{mod}4
\end{cases}
=\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor +1}%
\begin{cases}
u, & \text{if }i-j\equiv1\operatorname{mod}2;\\
v, & \text{if }i-j\equiv0\operatorname{mod}2
\end{cases}
\\
&  =\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor
+1}\underbrace{%
\begin{cases}
u, & \text{if }n\equiv1\operatorname{mod}2;\\
v, & \text{if }n\equiv0\operatorname{mod}2
\end{cases}
}_{=%
\begin{cases}
v, & \text{if }n\text{ is even;}\\
u, & \text{if }n\text{ is odd.}%
\end{cases}
=w}\ \ \ \ \ \ \ \ \ \ \left(  \text{since }i-j\equiv i+j=n+2\equiv
n\operatorname{mod}2\right) \\
&  =\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor
+1}w\\
&  =\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor +1}w%
\begin{cases}
1, & \text{if }i+j\in\left\{  n+2,n+4\right\}  ;\\
-1, & \text{if }i+j\in\left\{  n+6,n+8\right\}  ;\\
0, & \text{otherwise}%
\end{cases}
\end{align*}
(since $i+j=n+2\in\left\{  n+2,n+4\right\}  $). Hence, Lemma \ref{lem.Pij}
\textbf{(b)} is proven in Subcase 3.2.

Subcases 3.3, 3.4 and 3.5 are analogous.

Let us finally consider Subcase 3.6. In this case, we have $i+j>n+9$. Hence,
the integers $n-i-j+1$, $n-i-j+5$ and $n-i-j+9$ are negative. Therefore, the
numbers $q\left(  n-i-j+1\right)  $, $q\left(  n-i-j+5\right)  $, $q\left(
n-i-j+9\right)  $ equal $n-i-j+1$, $n-i-j+5$, $n-i-j+9$, respectively. In
particular, these numbers are therefore congruent modulo $4$; therefore, the
three elements $a_{j-i+2q\left(  n-i-j+1\right)  },a_{j-i+2q\left(
n-i-j+5\right)  },a_{j-i+2q\left(  n-i-j+9\right)  }$ are equal (since the
two-sided infinite sequence $\left(  \ldots,a_{-2},a_{-1},a_{0},a_{1}%
,a_{2},\ldots\right)  $ is periodic with period $4$). Hence,
(\ref{pf.lem.Pij.c3.1}) simplifies to
\begin{align*}
P_{i,j}  &  =a_{j-i+2q\left(  n-i-j+1\right)  }-2a_{j-i+2q\left(
n-i-j+1\right)  }+a_{j-i+2q\left(  n-i-j+1\right)  }=0\\
&  =\left(  -1\right)  ^{\left\lfloor \left(  i-j\right)  /2\right\rfloor +1}w%
\begin{cases}
1, & \text{if }i+j\in\left\{  n+2,n+4\right\}  ;\\
-1, & \text{if }i+j\in\left\{  n+6,n+8\right\}  ;\\
0, & \text{otherwise.}%
\end{cases}
\end{align*}
(since we have neither $i+j\in\left\{  n+2,n+4\right\}  $ nor $i+j\in\left\{
n+6,n+8\right\}  $ (because $i+j>n+9$)). Hence, Lemma \ref{lem.Pij}
\textbf{(b)} is proven in Subcase 3.6.

Hence, Lemma \ref{lem.Pij} \textbf{(b)} is proven in the whole Case 3.

As we said, the Cases 1 and 2 are analogous, with the caveat that $i$ and $j$
cannot both belong to $\left[  4\right]  $ (since $\left(  i,j\right)
\notin\left[  4\right]  ^{2}$) and that $i+j$ cannot belong to $\left\{
n+6,n+8\right\}  $ (since $i+j\leq n+4$). Thus, the proof of Lemma
\ref{lem.Pij} is complete.
\end{proof}

Next, we define an $n\times n$-matrix $Q$ as follows:

\begin{itemize}
\item Start with the $n\times n$-matrix $P$.

\item Turn the matrix upside down (i.e., switch its topmost row with its
bottommost row, and so on).

\item Multiply the $i$-th row of the matrix with $\left(  -1\right)
^{\left\lfloor n/2\right\rfloor +i-1}$ for each $i\in\left\{  1,2,\ldots
,n\right\}  $.

\item The resulting matrix we call $Q$.
\end{itemize}

Thus, the entries of $Q$ are explicitly given as follows:%
\begin{equation}
Q_{i,j}=\left(  -1\right)  ^{\left\lfloor n/2\right\rfloor +i-1}P_{n+1-i,j}.
\label{eq.Qij}%
\end{equation}


The matrix $Q$ was obtained from $P$ by row transformations, which act on the
determinant in a predictable way:%
\begin{align}
\det Q  &  =\underbrace{\left(  \prod_{i=1}^{n}\left(  -1\right)
^{\left\lfloor n/2\right\rfloor +i-1}\right)  }_{=\left(  -1\right)
^{\left\lfloor n/2\right\rfloor n+n\left(  n-1\right)  /2}}\left(  -1\right)
^{n\left(  n-1\right)  /2}\det P=\left(  -1\right)  ^{\left\lfloor
n/2\right\rfloor n+n\left(  n-1\right)  /2}\left(  -1\right)  ^{n\left(
n-1\right)  /2}\det P\nonumber\\
&  =\left(  -1\right)  ^{\left\lfloor n/2\right\rfloor n}\det P.
\label{eq.detQ=}%
\end{align}
But the matrix $Q$ has more meaningful patterns than $P$, as the following
examples demonstrate:

\begin{example}
Here is the matrix $Q$ for $n=9$:%
\[
Q=\left(
\begin{array}
[c]{rrrrrrrrr}%
0 & u & 0 & -u & 0 & -u & 0 & u & 0\\
0 & 0 & u & 0 & -u & 0 & -u & 0 & u\\
0 & 0 & 0 & u & 0 & -u & 0 & -u & 0\\
0 & 0 & 0 & 0 & u & 0 & -u & 0 & -u\\
0 & 0 & 0 & 0 & 0 & u & 0 & -u & 0\\
-b & -c & -d & -a & 0 & 0 & u & 0 & -u\\
c & d & a & b & 0 & 0 & 0 & u & 0\\
-d & -a & -b & -c & 0 & 0 & 0 & 0 & u\\
a & b & c & d & 0 & 0 & 0 & 0 & 0
\end{array}
\right)  .
\]


Here is the matrix $Q$ for $n=10$:%
\[
Q=\left(
\begin{array}
[c]{rrrrrrrrrr}%
0 & v & 0 & -v & 0 & -v & 0 & v & 0 & 0\\
0 & 0 & v & 0 & -v & 0 & -v & 0 & v & 0\\
0 & 0 & 0 & v & 0 & -v & 0 & -v & 0 & v\\
0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v & 0\\
0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v\\
0 & 0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0\\
-b & -c & -d & -a & 0 & 0 & 0 & v & 0 & -v\\
c & d & a & b & 0 & 0 & 0 & 0 & v & 0\\
-d & -a & -b & -c & 0 & 0 & 0 & 0 & 0 & v\\
a & b & c & d & 0 & 0 & 0 & 0 & 0 & 0
\end{array}
\right)  .
\]


Here is the matrix $Q$ for $n=11$:%
\[
Q=\left(
\begin{array}
[c]{rrrrrrrrrrr}%
0 & u & 0 & -u & 0 & -u & 0 & u & 0 & 0 & 0\\
0 & 0 & u & 0 & -u & 0 & -u & 0 & u & 0 & 0\\
0 & 0 & 0 & u & 0 & -u & 0 & -u & 0 & u & 0\\
0 & 0 & 0 & 0 & u & 0 & -u & 0 & -u & 0 & u\\
0 & 0 & 0 & 0 & 0 & u & 0 & -u & 0 & -u & 0\\
0 & 0 & 0 & 0 & 0 & 0 & u & 0 & -u & 0 & -u\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & u & 0 & -u & 0\\
b & c & d & a & 0 & 0 & 0 & 0 & u & 0 & -u\\
-c & -d & -a & -b & 0 & 0 & 0 & 0 & 0 & u & 0\\
d & a & b & c & 0 & 0 & 0 & 0 & 0 & 0 & u\\
-a & -b & -c & -d & 0 & 0 & 0 & 0 & 0 & 0 & 0
\end{array}
\right)  .
\]


\newpage

Here is the matrix $Q$ for $n=12$:%
\[
Q=\left(
\begin{array}
[c]{rrrrrrrrrrrr}%
0 & v & 0 & -v & 0 & -v & 0 & v & 0 & 0 & 0 & 0\\
0 & 0 & v & 0 & -v & 0 & -v & 0 & v & 0 & 0 & 0\\
0 & 0 & 0 & v & 0 & -v & 0 & -v & 0 & v & 0 & 0\\
0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v & 0 & v & 0\\
0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v & 0 & v\\
0 & 0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0 & -v\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & v & 0 & -v & 0\\
b & c & d & a & 0 & 0 & 0 & 0 & 0 & v & 0 & -v\\
-c & -d & -a & -b & 0 & 0 & 0 & 0 & 0 & 0 & v & 0\\
d & a & b & c & 0 & 0 & 0 & 0 & 0 & 0 & 0 & v\\
-a & -b & -c & -d & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
\end{array}
\right)  .
\]

\end{example}

\begin{lemma}
\label{lem.Qij}Let $n\geq7$.

\textbf{(a)} The submatrix $Q_{\left\{  n-3,n-2,n-1,1\right\}  ,\left[
4\right]  }$ of $Q$ is $\left(  -1\right)  ^{\left\lfloor \left(  n-1\right)
/2\right\rfloor }\left(
\begin{array}
[c]{rrrr}%
-b & -c & -d & -a\\
c & d & a & b\\
-d & -a & -b & -c\\
a & b & c & d
\end{array}
\right)  $.

\textbf{(b)} Let $i\in\left[  n\right]  $ and $j\in\left[  n\right]  $ be such
that $\left(  i,j\right)  \notin\left\{  n-3,n-2,n-1,1\right\}  \times\left[
4\right]  $. Then,%
\[
Q_{i,j}=w%
\begin{cases}
1, & \text{if }j-i\in\left\{  1,7\right\}  ;\\
-1, & \text{if }j-i\in\left\{  3,5\right\}  ;\\
0, & \text{otherwise.}%
\end{cases}
.
\]

\end{lemma}

\begin{proof}
[Proof of Lemma \ref{lem.Qij}.]This follows from Lemma \ref{lem.Pij} by
straightforward computation using (\ref{eq.Qij}).
\end{proof}

If $X$ is any finite set of integers, then $\sum X$ shall denote the sum of
all elements of $X$.

Now, recall the following property of determinants (known as \textit{Laplace
expansion in multiple rows}):

\begin{proposition}
\label{prop.laplace-multirows}Let $n\in\mathbb{N}$. Let $A\in\mathbb{K}%
^{n\times n}$. Let $X$ be a subset of $\left[  n\right]  $. Then,%
\[
\det A=\sum_{\substack{Y\subseteq\left[  n\right]  ;\\\left\vert Y\right\vert
=\left\vert X\right\vert }}\left(  -1\right)  ^{\sum X+\sum Y}\det\left(
A_{X,Y}\right)  \det\left(  A_{\left[  n\right]  \setminus X,\left[  n\right]
\setminus Y}\right)  .
\]

\end{proposition}

See, e.g., \cite[Theorem 6.156 \textbf{(a)}]{Grinbe15} for a proof of
Proposition \ref{prop.laplace-multirows} (but beware that the sets denoted by
$P$ and $Q$ in \cite[Theorem 6.156 \textbf{(a)}]{Grinbe15} correspond to our
sets $X$ and $Y$).

Applying Proposition \ref{prop.laplace-multirows} to $A=Q$ and $X=\left\{
n-3,n-2,n-1,n\right\}  $, we conclude that%
\begin{align}
\det Q  &  =\sum_{\substack{Y\subseteq\left[  n\right]  ;\\\left\vert
Y\right\vert =4}}\underbrace{\left(  -1\right)  ^{\sum\left\{
n-3,n-2,n-1,n\right\}  +\sum Y}}_{\substack{=\left(  -1\right)  ^{\sum
Y}\\\text{(since }\sum\left\{  n-3,n-2,n-1,n\right\}  =4n-6\text{ is even)}%
}}\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right) \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \det\left(  \underbrace{Q_{\left[  n\right]
\setminus\left\{  n-3,n-2,n-1,n\right\}  ,\left[  n\right]  \setminus Y}%
}_{\substack{=Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus
Y}\\\text{(since }\left[  n\right]  \setminus\left\{  n-3,n-2,n-1,n\right\}
=\left[  n-4\right]  \text{)}}}\right) \nonumber\\
&  =\sum_{\substack{Y\subseteq\left[  n\right]  ;\\\left\vert Y\right\vert
=4}}\left(  -1\right)  ^{\sum Y}\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,Y}\right)  \det\left(  Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus
Y}\right)  . \label{eq.detQ=.1}%
\end{align}
But Lemma \ref{lem.Qij} shows that the $4\times n$-matrix $Q_{\left\{
n-3,n-2,n-1,n\right\}  ,\left[  n\right]  }$ (which is formed by the
bottommost $4$ rows of $Q$) has at most $7$ nonzero columns: namely, its
columns $1,2,3,4,n-2,n-1,n$. Therefore, for any subset $Y$ of $\left[
n\right]  $, we have $\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,Y}\right)  =0$ unless $Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}  $. This
allows us to restrict the sum on the right hand side of (\ref{eq.detQ=.1}) to
the subsets $Y$ satisfying $Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}  $.
Thus, (\ref{eq.detQ=.1}) becomes%
\begin{align}
\det Q  &  =\sum_{\substack{Y\subseteq\left[  n\right]  ;\\\left\vert
Y\right\vert =4;\\Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}  }}\left(
-1\right)  ^{\sum Y}\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right)
\det\left(  Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}\right)
\nonumber\\
&  =\sum_{\substack{Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}
;\\\left\vert Y\right\vert =4}}\left(  -1\right)  ^{\sum Y}\det\left(
Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right)  \det\left(  Q_{\left[
n-4\right]  ,\left[  n\right]  \setminus Y}\right)  . \label{eq.detQ=.2}%
\end{align}


Furthermore, Lemma \ref{lem.Qij} shows that the $1$-st column of the $\left(
n-4\right)  \times n$-matrix $Q_{\left[  n-4\right]  ,\left[  n\right]  }$
(which is formed by the first $n-4$ rows of $Q$) is $0$. Hence, for any subset
$Y$ of $\left\{  1,2,3,4,n-2,n-1,n\right\}  $, we have $\det\left(  Q_{\left[
n-4\right]  ,\left[  n\right]  \setminus Y}\right)  =0$ unless $1\notin\left[
n\right]  \setminus Y$. This allows us to restrict the sum on the right hand
side of (\ref{eq.detQ=.2}) to the subsets $Y$ satisfying $1\notin\left[
n\right]  \setminus Y$. Thus, (\ref{eq.detQ=.2}) becomes%
\begin{align}
\det Q  &  =\sum_{\substack{Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}
;\\\left\vert Y\right\vert =4;\\1\notin\left[  n\right]  \setminus Y}}\left(
-1\right)  ^{\sum Y}\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right)
\det\left(  Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}\right)
\nonumber\\
&  =\sum_{\substack{Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}
;\\\left\vert Y\right\vert =4;\\1\in Y}}\left(  -1\right)  ^{\sum Y}%
\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right)  \det\left(
Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}\right)  .
\label{eq.detQ=.3}%
\end{align}
The right hand side of this equality is now a sum with $\dbinom{6}{3}=20$
addends, corresponding to all the $20$ subsets $Y$ of $\left\{
1,2,3,4,n-2,n-1,n\right\}  $ satisfying $\left\vert Y\right\vert =4$ and $1\in
Y$. Explicitly, these $20$ subsets are%
\begin{align*}
&  \left\{  1,2,3,4\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{  1,2,3,n-2\right\}
,\ \ \ \ \ \ \ \ \ \ \left\{  1,2,3,n-1\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{
1,2,3,n\right\}  ,\\
&  \left\{  1,2,4,n-2\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{
1,2,4,n-1\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{  1,2,4,n\right\}
,\ \ \ \ \ \ \ \ \ \ \left\{  1,2,n-2,n-1\right\}  ,\\
&  \left\{  1,2,n-2,n\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{
1,2,n-1,n\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{  1,3,4,n-2\right\}
,\ \ \ \ \ \ \ \ \ \ \left\{  1,3,4,n-1\right\}  ,\\
&  \left\{  1,3,4,n\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{
1,3,n-2,n-1\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{  1,3,n-2,n\right\}
,\ \ \ \ \ \ \ \ \ \ \left\{  1,3,n-1,n\right\}  ,\\
&  \left\{  1,4,n-2,n-1\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{
1,4,n-2,n\right\}  ,\ \ \ \ \ \ \ \ \ \ \left\{  1,4,n-1,n\right\}
,\ \ \ \ \ \ \ \ \ \ \left\{  1,n-2,n-1,n\right\}  .
\end{align*}
Computing the terms $\sum Y$ and $\det\left(  Q_{\left\{
n-3,n-2,n-1,n\right\}  ,Y}\right)  $ for each of these subsets $Y$ is
straightforward, thanks to the explicit formula for $Q_{i,j}$ given in Lemma
\ref{lem.Qij}. But we also need to compute the $\left(  n-4\right)
\times\left(  n-4\right)  $-determinants $\det\left(  Q_{\left[  n-4\right]
,\left[  n\right]  \setminus Y}\right)  $, and this is not immediately
obvious. Here we need one further idea.

Let $S$ be the $\left(  n-1\right)  \times\left(  n-1\right)  $-matrix
$\left(  \left[  j=i+1\right]  \right)  _{1\leq i\leq n-1,\ 1\leq j\leq
n-1}\in\mathbb{K}^{\left(  n-1\right)  \times\left(  n-1\right)  }$. This is
the $\left(  n-1\right)  \times\left(  n-1\right)  $-matrix whose first
superdiagonal is filled with $1$'s, whereas its other entries are filled with
$0$'s.

\begin{example}
If $n=10$, then%
\[
S=\left(
\begin{array}
[c]{rrrrrrrrr}%
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0
\end{array}
\right)  .
\]

\end{example}

Notice that we call this matrix $S$ because it represents the so-called
\textquotedblleft shift operator\textquotedblright. It is well-known (and easy
to check by induction over $k$) that
\begin{equation}
S^{k}=\left(  \left[  j=i+k\right]  \right)  _{1\leq i\leq n-1,\ 1\leq j\leq
n-1} \label{eq.Sk=}%
\end{equation}
for each $k\in\mathbb{N}$.

We define a further $\left(  n-1\right)  \times\left(  n-1\right)  $-matrix
$G$ by $G=I_{n-1}-S^{2}-S^{4}+S^{6}$. Then:

\begin{lemma}
\label{lem.S1}Let $i,j\in\left[  n-1\right]  $. Then,%
\[
G_{i,j}=%
\begin{cases}
1, & \text{if }j-i\in\left\{  0,6\right\}  ;\\
-1, & \text{if }j-i\in\left\{  2,4\right\}  ;\\
0, & \text{otherwise.}%
\end{cases}
.
\]

\end{lemma}

\begin{proof}
[Proof of Lemma \ref{lem.S1}.]Follows from the definition of $G$ and from
(\ref{eq.Sk=}).
\end{proof}

\begin{example}
If $n=9$, then%
\[
G=\left(
\begin{array}
[c]{rrrrrrrrr}%
1 & 0 & -1 & 0 & -1 & 0 & 1 & 0 & 0\\
0 & 1 & 0 & -1 & 0 & -1 & 0 & 1 & 0\\
0 & 0 & 1 & 0 & -1 & 0 & -1 & 0 & 1\\
0 & 0 & 0 & 1 & 0 & -1 & 0 & -1 & 0\\
0 & 0 & 0 & 0 & 1 & 0 & -1 & 0 & -1\\
0 & 0 & 0 & 0 & 0 & 1 & 0 & -1 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & -1\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1
\end{array}
\right)  .
\]

\end{example}

Now, assume that $n\geq7$ from now on. (The other cases can be done by hand.)

\begin{lemma}
\label{lem.S2}We have $Q_{\left[  n-4\right]  ,\left\{  2,3,\ldots,n\right\}
}=wG_{\left[  n-4\right]  ,\left[  n-1\right]  }$.
\end{lemma}

\begin{proof}
[Proof of Lemma \ref{lem.S2}.]Compare the entries of $Q_{\left[  n-4\right]
,\left\{  2,3,\ldots,n\right\}  }$ with those of $wG_{\left[  n-4\right]
,\left[  n-1\right]  }$. (The former are given by Lemma \ref{lem.Qij}
\textbf{(b)}, while the latter are given by Lemma \ref{lem.S1}.)
\end{proof}

The usefulness of Lemma \ref{lem.S2} is in that it helps us compute
$\det\left(  Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}\right)  $
for subsets $Y$ of $\left\{  1,2,3,4,n-2,n-1,n\right\}  $ satisfying
$\left\vert Y\right\vert =4$ and $1\in Y$. Indeed, if $Y$ is such a subset,
then $Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}$ is an $\left(
n-4\right)  \times\left(  n-4\right)  $-submatrix of $Q_{\left[  n-4\right]
,\left\{  2,3,\ldots,n\right\}  }=wG_{\left[  n-4\right]  ,\left[  n-1\right]
}$ (by Lemma \ref{lem.S2}), and thus $\det\left(  Q_{\left[  n-4\right]
,\left[  n\right]  \setminus Y}\right)  $ is an $\left(  n-4\right)
\times\left(  n-4\right)  $-minor of $wG_{\left[  n-4\right]  ,\left[
n-1\right]  }$, and therefore equals $w^{n-4}$ times a $\left(  n-4\right)
\times\left(  n-4\right)  $-minor of $G_{\left[  n-4\right]  ,\left[
n-1\right]  }$. Our problem thus is reduced to computing $\left(  n-4\right)
\times\left(  n-4\right)  $-minors of $G_{\left[  n-4\right]  ,\left[
n-1\right]  }$. These are, of course, $\left(  n-4\right)  \times\left(
n-4\right)  $-minors of $G$ as well. It turns out that all such minors can be
easily computed. To do so, we recall another known fact about determinants
(the \textit{Jacobi complementary minor theorem}):

\begin{proposition}
\label{prop.jacobi}Let $n\in\mathbb{N}$. Let $A\in\mathbb{K}^{n\times n}$ be
an invertible matrix. Let $X$ and $Y$ be two subsets of $\left[  n\right]  $
satisfying $\left\vert X\right\vert =\left\vert Y\right\vert $. Prove that%
\[
\det\left(  A_{X,Y}\right)  =\left(  -1\right)  ^{\sum X+\sum Y}\det
A\cdot\det\left(  \left(  A^{-1}\right)  _{\left[  n\right]  \setminus
Y,\left[  n\right]  \setminus X}\right)  .
\]

\end{proposition}

See, e.g., \cite[Exercise 6.56]{Grinbe15} for a proof of Proposition
\ref{prop.jacobi} (but beware that the sets denoted by $P$ and $Q$ in
\cite[Exercise 6.56]{Grinbe15} correspond to our sets $X$ and $Y$).

We would like to apply Proposition \ref{prop.jacobi} to $n-1$ and $G$ instead
of $n$ and $A$. To do so, it helps to know the determinant $\det G$ and the
inverse $G^{-1}$ of $G$.

The determinant $\det G$ is easy to compute: The matrix $G=I_{n-1}-S^{2}%
-S^{4}+S^{6}$ is upper-unitriangular (since $S$ is strictly upper-triangular),
and thus its determinant $\det G=1$. Thus, the matrix $G$ is invertible.
Hence, Proposition \ref{prop.jacobi} (applied to $n-1$ and $G$ instead of $n$
and $A$) shows that if $X$ and $Y$ are two subsets of $\left[  n-1\right]  $
satisfying $\left\vert X\right\vert =\left\vert Y\right\vert $, then%
\begin{align}
\det\left(  G_{X,Y}\right)   &  =\left(  -1\right)  ^{\sum X+\sum
Y}\underbrace{\det G}_{=1}\cdot\det\left(  \left(  G^{-1}\right)  _{\left[
n-1\right]  \setminus Y,\left[  n-1\right]  \setminus X}\right) \nonumber\\
&  =\left(  -1\right)  ^{\sum X+\sum Y}\det\left(  \left(  G^{-1}\right)
_{\left[  n-1\right]  \setminus Y,\left[  n-1\right]  \setminus X}\right)  .
\label{eq.detTXY}%
\end{align}


In order to compute the inverse $G^{-1}$, we first observe that%
\[
\dfrac{1}{1-x^{2}-x^{4}+x^{6}}=\sum_{h\in\mathbb{N}}\left\lfloor
h/2+1\right\rfloor x^{2h}%
\]
in the ring of power series $\mathbb{Z}\left[  \left[  x\right]  \right]  $
(indeed, this can be shown by expanding \newline$\left(  1-x^{2}-x^{4}%
+x^{6}\right)  \sum_{h\in\mathbb{N}}\left\lfloor h/2+1\right\rfloor x^{2h}$).
Substituting $S$ for $x$ into this equality (which is allowed since the matrix
$S$ is nilpotent), we obtain%
\[
\left(  I_{n-1}-S^{2}-S^{4}+S^{6}\right)  ^{-1}=\sum_{h\in\mathbb{N}%
}\left\lfloor h/2+1\right\rfloor S^{2h}.
\]
Since $G=I_{n-1}-S^{2}-S^{4}+S^{6}$, this rewrites as%
\[
G^{-1}=\sum_{h\in\mathbb{N}}\left\lfloor h/2+1\right\rfloor S^{2h}.
\]
Therefore,%
\begin{equation}
\left(  G^{-1}\right)  _{i,j}=%
\begin{cases}
\left\lfloor \left(  j-i\right)  /4+1\right\rfloor , & \text{if }%
j-i\in\left\{  0,2,4,\ldots\right\}  ;\\
0, & \text{otherwise}%
\end{cases}
\label{eq.T-1ij}%
\end{equation}
for all $i,j\in\left[  n-1\right]  $ (by (\ref{eq.Sk=})).

\begin{example}
If $n=9$, then%
\[
G^{-1}=\left(
\begin{array}
[c]{rrrrrrrrr}%
1 & 0 & 1 & 0 & 2 & 0 & 2 & 0 & 3\\
0 & 1 & 0 & 1 & 0 & 2 & 0 & 2 & 0\\
0 & 0 & 1 & 0 & 1 & 0 & 2 & 0 & 2\\
0 & 0 & 0 & 1 & 0 & 1 & 0 & 2 & 0\\
0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 2\\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1
\end{array}
\right)  .
\]

\end{example}

Now that we have an explicit formula (\ref{eq.T-1ij}) for each entry of
$G^{-1}$, we can compute any $4\times4$-minor of $G^{-1}$. Using Proposition
\ref{prop.jacobi}, we shall then be able to compute any $\left(  n-4\right)
\times\left(  n-4\right)  $-minor of $G$.

Let us be specific. For any set $Y$ of integers satisfying $1\in Y$, we let
$Y^{-}$ be the set $\left\{  y-1\ \mid\ y\in Y;\ y\neq1\right\}  $ of
integers. Notice that $\left\vert Y^{-}\right\vert =\left\vert Y\right\vert
-1$.

Let $Y$ be a subset of $\left\{  1,2,3,4,n-2,n-1,n\right\}  $ satisfying
$\left\vert Y\right\vert =4$ and $1\in Y$. Then, $Y^{-}$ is the $3$-element
subset $\left\{  y-1\ \mid\ y\in Y;\ y>1\right\}  $ of $\left\{
1,2,3,n-3,n-2,n-1\right\}  $. We have%
\begin{align*}
Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}  &  =\left(
\underbrace{Q_{\left[  n-4\right]  ,\left\{  2,3,\ldots,n\right\}  }%
}_{\substack{=wG_{\left[  n-4\right]  ,\left[  n-1\right]  }\\\text{(by Lemma
\ref{lem.S2})}}}\right)  _{\left[  n-4\right]  ,\left[  n-1\right]  \setminus
Y^{-}}=\left(  wG_{\left[  n-4\right]  ,\left[  n-1\right]  }\right)
_{\left[  n-4\right]  ,\left[  n-1\right]  \setminus Y^{-}}\\
&  =w\underbrace{\left(  G_{\left[  n-4\right]  ,\left[  n-1\right]  }\right)
_{\left[  n-4\right]  ,\left[  n-1\right]  \setminus Y^{-}}}_{=G_{\left[
n-4\right]  ,\left[  n-1\right]  \setminus Y^{-}}}=wG_{\left[  n-4\right]
,\left[  n-1\right]  \setminus Y^{-}}.
\end{align*}
Hence,%
\begin{align}
\det\left(  Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}\right)   &
=\det\left(  wG_{\left[  n-4\right]  ,\left[  n-1\right]  \setminus Y^{-}%
}\right) \nonumber\\
&  =w^{n-4}\underbrace{\det\left(  G_{\left[  n-4\right]  ,\left[  n-1\right]
\setminus Y^{-}}\right)  }_{\substack{=\left(  -1\right)  ^{\sum\left[
n-4\right]  +\sum\left(  \left[  n-1\right]  \setminus Y^{-}\right)  }%
\det\left(  \left(  G^{-1}\right)  _{\left[  n-1\right]  \setminus\left(
\left[  n-1\right]  \setminus Y^{-}\right)  ,\left[  n-1\right]
\setminus\left[  n-4\right]  }\right)  \\\text{(by (\ref{eq.detTXY}))}%
}}\nonumber\\
&  =w^{n-4}\underbrace{\left(  -1\right)  ^{\sum\left[  n-4\right]
+\sum\left(  \left[  n-1\right]  \setminus Y^{-}\right)  }}%
_{\substack{=\left(  -1\right)  ^{\left(  n-3\right)  +\left(  n-2\right)
+\left(  n-1\right)  -\sum Y^{-}}\\=\left(  -1\right)  ^{n+\sum Y^{-}}}%
}\det\left(  \underbrace{\left(  G^{-1}\right)  _{\left[  n-1\right]
\setminus\left(  \left[  n-1\right]  \setminus Y^{-}\right)  ,\left[
n-1\right]  \setminus\left[  n-4\right]  }}_{=\left(  G^{-1}\right)
_{Y^{-},\left\{  n-3,n-2,n-1\right\}  }}\right) \nonumber\\
&  =w^{n-4}\left(  -1\right)  ^{n+\sum Y^{-}}\det\left(  \left(
G^{-1}\right)  _{Y^{-},\left\{  n-3,n-2,n-1\right\}  }\right)  .
\label{eq.Qminor}%
\end{align}


Now, let us combine all we have shown. The definition of $L$ yields
$L=M_{n}\left(  \mathbf{a}\right)  $. Hence,%
\begin{align}
\det\left(  M_{n}\left(  \mathbf{a}\right)  \right)   &  =\det L=\det
P\ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{eq.detP=})}\right) \nonumber\\
&  =\left(  -1\right)  ^{\left\lfloor n/2\right\rfloor n}\det
Q\ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{eq.detQ=})}\right)  .
\label{eq.detM=}%
\end{align}
Hence, in order to compute $\det\left(  M_{n}\left(  \mathbf{a}\right)
\right)  $ (and thus prove Theorem \ref{thm.detM}), it suffices to compute
$\det Q$.

The equality (\ref{eq.detQ=.3}) becomes%
\begin{align}
&  \det Q\nonumber\\
&  =\sum_{\substack{Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}
;\\\left\vert Y\right\vert =4;\\1\in Y}}\left(  -1\right)  ^{\sum Y}%
\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right)  \underbrace{\det
\left(  Q_{\left[  n-4\right]  ,\left[  n\right]  \setminus Y}\right)
}_{\substack{=w^{n-4}\left(  -1\right)  ^{n+\sum Y^{-}}\det\left(  \left(
G^{-1}\right)  _{Y^{-},\left\{  n-3,n-2,n-1\right\}  }\right)  \\\text{(by
(\ref{eq.Qminor}))}}}\nonumber\\
&  =\sum_{\substack{Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}
;\\\left\vert Y\right\vert =4;\\1\in Y}}\left(  -1\right)  ^{\sum Y}%
\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right) \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w^{n-4}\left(  -1\right)  ^{n+\sum
Y^{-}}\det\left(  \left(  G^{-1}\right)  _{Y^{-},\left\{  n-3,n-2,n-1\right\}
}\right) \nonumber\\
&  =\sum_{\substack{Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}
;\\\left\vert Y\right\vert =4;\\1\in Y}}\underbrace{\left(  -1\right)  ^{\sum
Y}\left(  -1\right)  ^{n+\sum Y^{-}}}_{=\left(  -1\right)  ^{n}}\det\left(
Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right) \nonumber\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ w^{n-4}\det\left(  \left(
G^{-1}\right)  _{Y^{-},\left\{  n-3,n-2,n-1\right\}  }\right) \nonumber\\
&  =\left(  -1\right)  ^{n}w^{n-4}\sum_{\substack{Y\subseteq\left\{
1,2,3,4,n-2,n-1,n\right\}  ;\\\left\vert Y\right\vert =4;\\1\in Y}}\det\left(
Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right)  \det\left(  \left(
G^{-1}\right)  _{Y^{-},\left\{  n-3,n-2,n-1\right\}  }\right)  .
\label{eq.detQ=.7}%
\end{align}


Using Lemma \ref{lem.Qij}, it is straightforward to see that
\begin{equation}
Q_{\left\{  n-3,n-2,n-1\right\}  ,\left\{  1,2,3,4,n-2,n-1,n\right\}
}=\left(
\begin{array}
[c]{rrrrrrr}%
b & c & d & a & v & 0 & -v\\
-c & -d & -a & -b & 0 & v & 0\\
d & a & b & c & 0 & 0 & v\\
-a & -b & -c & -d & 0 & 0 & 0
\end{array}
\right)  \label{eq.4k-case.Q}%
\end{equation}
(since $w=v$ (because $n=4k$ is even)). Using (\ref{eq.T-1ij}), it is
straightforward to see that%
\begin{equation}
\left(  G^{-1}\right)  _{\left\{  1,2,3,n-3,n-2,n-1\right\}  ,\left\{
n-3,n-2,n-1\right\}  }=\left(
\begin{array}
[c]{ccc}%
k & 0 & k\\
0 & k & 0\\
k-1 & 0 & k\\
\multicolumn{1}{r}{1} & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{1}\\
\multicolumn{1}{r}{0} & \multicolumn{1}{r}{1} & \multicolumn{1}{r}{0}\\
\multicolumn{1}{r}{0} & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{1}%
\end{array}
\right)  , \label{eq.4k-case.G-1}%
\end{equation}
Also, recall our above list of all $20$ subsets $Y$ of $\left\{
1,2,3,4,n-2,n-1,n\right\}  $ satisfying $\left\vert Y\right\vert =4$ and $1\in
Y$. Using this list, the sum on the right hand side of (\ref{eq.detQ=.7})
becomes%
\[
\sum_{\substack{Y\subseteq\left\{  1,2,3,4,n-2,n-1,n\right\}  ;\\\left\vert
Y\right\vert =4;\\1\in Y}}\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,Y}\right)  \det\left(  \left(  G^{-1}\right)  _{Y^{-},\left\{
n-3,n-2,n-1\right\}  }\right)
\]%
\begin{align*}
&  =\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}  ,\left\{  1,2,3,4\right\}
}\right)  \det\left(  \left(  G^{-1}\right)  _{\left\{  1,2,3\right\}
,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,3,n-2\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,2,n-3\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,3,n-1\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,2,n-2\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,3,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,2,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,4,n-2\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,3,n-3\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,4,n-1\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,3,n-2\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,4,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,3,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,n-2,n-1\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,n-3,n-2\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,n-2,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,n-3,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,2,n-1,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  1,n-2,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,3,4,n-2\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  2,3,n-3\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,3,4,n-1\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  2,3,n-2\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,3,4,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  2,3,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,3,n-2,n-1\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  2,n-3,n-2\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,3,n-2,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  2,n-3,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,3,n-1,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  2,n-2,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,4,n-2,n-1\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  3,n-3,n-2\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,4,n-2,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  3,n-3,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,4,n-1,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  3,n-2,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right) \\
&  \ \ \ \ \ \ \ \ \ \ +\det\left(  Q_{\left\{  n-3,n-2,n-1,n\right\}
,\left\{  1,n-2,n-1,n\right\}  }\right)  \det\left(  \left(  G^{-1}\right)
_{\left\{  n-3,n-2,n-1\right\}  ,\left\{  n-3,n-2,n-1\right\}  }\right)  .
\end{align*}
All matrices appearing on the right hand side of this equality can be read off
from the equalities (\ref{eq.4k-case.Q}) and (\ref{eq.4k-case.G-1}); thus, the
right hand side can be explicitly computed. Here is some SageMath code to do so:

\begin{python}
from itertools import combinations
	
Q.<a,b,c,d,k> = PolynomialRing(QQ)
# We treat `k` as a polynomial indeterminate.
	
n = 4 * k
u = d - b
v = a - c
U = d + b
V = a + c
w = v # since `n = 4k` is even
	
Q7 = Matrix(Q, [[b, c, d, a, v, 0, -v],
				[-c, -d, -a, -b, 0, v, 0],
				[d, a, b, c, 0, 0, v],
				[-a, -b, -c, -d, 0, 0, 0]])
# This ``Q7`` is the matrix in \eqref{eq.4k-case.Q}.
	
G6 = Matrix(Q, [[k, 0, k], [0, k, 0], [k-1, 0, k],
				[1, 0, 1], [0, 1, 0], [0, 0, 1]])
# This ``G6`` is the matrix in \eqref{eq.4k-case.G-1}.
	
res = Q.zero()
for yminus in combinations(range(6), 3):
	y = [0] + [i+1 for i in yminus]
	MinorOfQ7 = Matrix(Q, [[Q7[i][j] for i in range(4)]
							for j in y]).det()
	MinorOfG6 = Matrix(Q, [[G6[i][j] for i in yminus]
							for j in range(3)]).det()
	res += MinorOfQ7 * MinorOfG6
	
print res == (1/4) * (v ** 4 - u ** 2 * v ** 2 + (U ** 2 - V ** 2) * ((2*k - 1) ** 2 * v ** 2 - (2*k) ** 2 * u ** 2))
\end{python}


The variable \texttt{res} computed by this code thus equals the sum on the
right hand side of (\ref{eq.detQ=.7}). The last line of the code confirms that
this sum equals
\[
\dfrac{1}{4}\left(  v^{4}-u^{2}v^{2}+\left(  U^{2}-V^{2}\right)  \left(
\left(  2k-1\right)  ^{2}v^{2}-\left(  2k\right)  ^{2}u^{2}\right)  \right)
.
\]
Hence, (\ref{eq.detQ=.7}) becomes%
\begin{align*}
&  \det Q\\
&  =\underbrace{\left(  -1\right)  ^{n}}_{\substack{=1\\\text{(since }n\text{
is even)}}}\underbrace{w^{n-4}}_{\substack{=v^{n-4}\\\text{(since }%
w=v\text{)}}}\\
&  \ \ \ \ \ \ \ \ \ \ \underbrace{\sum_{\substack{Y\subseteq\left\{
1,2,3,4,n-2,n-1,n\right\}  ;\\\left\vert Y\right\vert =4;\\1\in Y}}\det\left(
Q_{\left\{  n-3,n-2,n-1,n\right\}  ,Y}\right)  \det\left(  \left(
G^{-1}\right)  _{Y^{-},\left\{  n-3,n-2,n-1\right\}  }\right)  }_{=\dfrac
{1}{4}\left(  v^{4}-u^{2}v^{2}+\left(  U^{2}-V^{2}\right)  \left(  \left(
2k-1\right)  ^{2}v^{2}-\left(  2k\right)  ^{2}u^{2}\right)  \right)  }\\
&  =\dfrac{1}{4}v^{n-4}\left(  v^{4}-u^{2}v^{2}+\left(  U^{2}-V^{2}\right)
\left(  \left(  2k-1\right)  ^{2}v^{2}-\left(  2k\right)  ^{2}u^{2}\right)
\right)  .
\end{align*}
Now, (\ref{eq.detM=}) becomes%
\begin{align*}
\det\left(  M_{n}\left(  \mathbf{a}\right)  \right)   &  =\underbrace{\left(
-1\right)  ^{\left\lfloor n/2\right\rfloor n}}_{\substack{=1\\\text{(since
}n\text{ is even)}}}\det Q\\
&  =\dfrac{1}{4}v^{n-4}\left(  v^{4}-u^{2}v^{2}+\left(  U^{2}-V^{2}\right)
\left(  \left(  2k-1\right)  ^{2}v^{2}-\left(  2k\right)  ^{2}u^{2}\right)
\right)  .
\end{align*}
This proves Theorem \ref{thm.detM} \textbf{(a)}.

Similar arguments can be used to verify parts \textbf{(b)}, \textbf{(c)} and
\textbf{(d)} of Theorem \ref{thm.detM}.

\begin{verlong}
Let us merely record the SageMath codes necessary for this:

To verify Theorem \ref{thm.detM} \textbf{(b)}, the code we need is
\begin{python}
from itertools import combinations
	
Q.<a,b,c,d,k> = PolynomialRing(QQ)
# We treat `k` as a polynomial indeterminate.
	
n = 4 * k + 2
u = d - b
v = a - c
U = d + b
V = a + c
w = v # since `n = 4k + 2` is even
	
Q7 = Matrix(Q, [[-b, -c, -d, -a, v, 0, -v],
				[c, d, a, b, 0, v, 0],
				[-d, -a, -b, -c, 0, 0, v],
				[a, b, c, d, 0, 0, 0]])
# This ``Q7`` is the matrix in \eqref{eq.4k-case.Q}.
	
G6 = Matrix(Q, [[k, 0, k+1], [0, k, 0], [k, 0, k],
				[1, 0, 1], [0, 1, 0], [0, 0, 1]])
# This ``G6`` is the matrix in \eqref{eq.4k-case.G-1}.
	
res = Q.zero()
for yminus in combinations(range(6), 3):
	y = [0] + [i+1 for i in yminus]
	MinorOfQ7 = Matrix(Q, [[Q7[i][j] for i in range(4)]
							for j in y]).det()
	MinorOfG6 = Matrix(Q, [[G6[i][j] for i in yminus]
							for j in range(3)]).det()
	res += MinorOfQ7 * MinorOfG6
	
print res == - (1/4) * (v ** 4 - u ** 2 * v ** 2 + (U ** 2 - V ** 2) * ((2*k + 1) ** 2 * v ** 2 - (2*k) ** 2 * u ** 2))
\end{python}


To verify Theorem \ref{thm.detM} \textbf{(c)}, the code we need is
\begin{python}
from itertools import combinations
	
Q.<a,b,c,d,k> = PolynomialRing(QQ)
# We treat `k` as a polynomial indeterminate.
	
n = 4 * k + 1
u = d - b
v = a - c
U = d + b
V = a + c
w = u # since `n = 4k + 1` is odd
	
Q7 = Matrix(Q, [[-b, -c, -d, -a, u, 0, -u],
				[c, d, a, b, 0, u, 0],
				[-d, -a, -b, -c, 0, 0, u],
				[a, b, c, d, 0, 0, 0]])
# This ``Q7`` is the matrix in \eqref{eq.4k-case.Q}.
	
G6 = Matrix(Q, [[0, k, 0], [k, 0, k], [0, k, 0],
				[1, 0, 1], [0, 1, 0], [0, 0, 1]])
# This ``G6`` is the matrix in \eqref{eq.4k-case.G-1}.
	
res = Q.zero()
for yminus in combinations(range(6), 3):
	y = [0] + [i+1 for i in yminus]
	MinorOfQ7 = Matrix(Q, [[Q7[i][j] for i in range(4)]
							for j in y]).det()
	MinorOfG6 = Matrix(Q, [[G6[i][j] for i in yminus]
							for j in range(3)]).det()
	res += MinorOfQ7 * MinorOfG6
	
print res == - (1/2) * u * (u ** 2 * (v + V) - (2*k) ** 2 * v * (U ** 2 - V ** 2))
\end{python}


To verify Theorem \ref{thm.detM} \textbf{(d)}, the code we need is
\begin{python}
from itertools import combinations
	
Q.<a,b,c,d,k> = PolynomialRing(QQ)
# We treat `k` as a polynomial indeterminate.
	
n = 4 * k + 3
u = d - b
v = a - c
U = d + b
V = a + c
w = u # since `n = 4k + 3` is odd
	
Q7 = Matrix(Q, [[b, c, d, a, u, 0, -u],
				[-c, -d, -a, -b, 0, u, 0],
				[d, a, b, c, 0, 0, u],
				[-a, -b, -c, -d, 0, 0, 0]])
# This ``Q7`` is the matrix in \eqref{eq.4k-case.Q}.
	
G6 = Matrix(Q, [[0, k+1, 0], [k, 0, k+1], [0, k, 0],
				[1, 0, 1], [0, 1, 0], [0, 0, 1]])
# This ``G6`` is the matrix in \eqref{eq.4k-case.G-1}.
	
res = Q.zero()
for yminus in combinations(range(6), 3):
	y = [0] + [i+1 for i in yminus]
	MinorOfQ7 = Matrix(Q, [[Q7[i][j] for i in range(4)]
							for j in y]).det()
	MinorOfG6 = Matrix(Q, [[G6[i][j] for i in yminus]
							for j in range(3)]).det()
	res += MinorOfQ7 * MinorOfG6
	
print res == (1/2) * v * u * (u ** 2 + v * V - (2*k + 1) ** 2 * (U ** 2 - V ** 2))
\end{python}

\end{verlong}

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[Amdebe17]{Amdebe17}T. Amdeberhan, \textit{MathOverflow question
\#270539 (\textquotedblleft Determinants: periodic entries }$\mathit{0,1,2,3}%
$\textit{\textquotedblright)}.\newline\url{https://mathoverflow.net/q/270539}

\bibitem[Grinbe15]{Grinbe15}Darij Grinberg, \textit{Notes on the combinatorial
fundamentals of algebra}, 10 January 2019.\newline%
\url{http://www.cip.ifi.lmu.de/~grinberg/primes2015/sols.pdf} \newline The
numbering of theorems and formulas in this link might shift when the project
gets updated; for a \textquotedblleft frozen\textquotedblright\ version whose
numbering is guaranteed to match that in the citations above, see
\url{https://github.com/darijgr/detnotes/releases/tag/2019-01-10} .

\bibitem[sage]{sage}SageMath, the Sage Mathematics Software System (Version
8.0), The Sage Developers, 2017, \url{http://www.sagemath.org}.
\end{thebibliography}


\end{document}