# On the number of subrings of $\mathbb{Z}^{n}$ of prime power index

Hrishabh Mishra  Chennai Mathematical Institute, H1, SIPCOT IT Park,
Kelambakkam, Siruseri, Tamil Nadu 603103, India<EMAIL_ADDRESS>and
Anwesh Ray  Centre de recherches mathématiques, Université de Montréal,
Pavillon André-Aisenstadt, 2920 Chemin de la tour, Montréal (Québec) H3T 1J4,
Canada<EMAIL_ADDRESS>
###### Abstract.

Let $n$ and $k$ be positive integers, and $f_{n}(k)$ (resp. $g_{n}(k)$) be the
number of unital subrings (resp. unital irreducible subrings) of
$\mathbb{Z}^{n}$ of index $k$. The numbers $f_{n}(k)$ are coefficients of
certain zeta functions of natural interest. The function $k\mapsto f_{n}(k)$
is multiplicative, and the study of the numbers $f_{n}(k)$ reduces to
computing the values at prime powers $k=p^{e}$. Given a composition
$\alpha=(\alpha_{1},\dots,\alpha_{n-1})$ of $e$ into $n-1$ positive integers,
let $g_{\alpha}(p)$ denote the number of irreducible subrings of
$\mathbb{Z}^{n}$ for which the associated upper triangular matrix in Hermite
normal form has diagonal $(p^{\alpha_{1}},\dots,p^{\alpha_{n-1}},1)$. Via
combinatorial analysis, the computation of $f_{n}(p^{e})$ reduces to the
computation of $g_{\alpha}(p)$ for all compositions of $i$ into $j$ parts,
where $i\leq e$ and $j\leq n-1$. We extend results of Liu and Atanasov-Kaplan-
Krakoff-Menzel, who explicitly compute $f_{n}(p^{e})$ for $e\leq 8$. The case
$e=9$ proves to be significantly more involved. We evaluate $f_{n}(e^{9})$
explicitly in terms of a polynomial in n and p up to a single term which is
conjecturally a polynomial. Our results provide further evidence for a
conjecture, which states that for any fixed pair $(n,e)$, the function
$p\mapsto f_{n}(p^{e})$ is a polynomial in $p$. A conjecture of Bhargava on
the asymptotics for $f_{n}(k)$ as a function of $k$ motivates the study of the
asymptotics for $g_{\alpha}(p)$ for certain infinite families of compositions
$\alpha$, for which we are able to obtain general estimates using techniques
from the geometry of numbers.

###### Key words and phrases:

counting subrings of prescribed index, combinatorics of subrings of a fixed
ring, zeta functions of groups and rings

###### 2020 Mathematics Subject Classification:

20E07, 11H06, 11A25, 11M41

##  1\. Introduction

Let $G$ be an infinite group. Given a finite index subgroup $H$, we set
$[G\mathrel{\mathop{\mathchar 58\relax}}H]$ to denote the index of $H$ in $G$.
For $k\in\mathbb{Z}_{\geq 1}$, let $a_{k}(G)$ be the number of finite-index
subgroups $H$ of $G$ such that $[G\mathrel{\mathop{\mathchar 58\relax}}H]=k$.
In [GSS88], Grunewald, Segal and Smith introduced the _zeta function_ of $G$,
defined as follows

$\zeta_{G}(s)\mathrel{\mathop{\mathchar
58\relax}}=\sum_{H}[G\mathrel{\mathop{\mathchar
58\relax}}H]^{-s}=\sum_{k=1}^{\infty}a_{k}(G)k^{-s},$

where the above sum runs over all finite index subgroups $H$ of $G$. The
properties of such zeta functions are described in [DSWP08]. In this context,
zeta functions measure _subgroup growth_. For a comprehensive account of this
theme, we refer to [LS03]. Throughout, $n>1$ is an integer and
$\mathbb{Z}^{n}$ is the ring consisting of integer $n$-tuples with
componentwise addition and multiplication. It is well known that the zeta
function $\zeta_{\mathbb{Z}^{n}}(s)$ is given by

$\zeta_{\mathbb{Z}^{n}}(s)=\zeta(s)\zeta(s-1)\dots\zeta(s-(n-1))$

(cf. _loc. cit._ for five different proofs of the above result).

We study distribution questions for the number of finite-index unital subrings
of $\mathbb{Z}^{n}$ of prescribed index. This problem is closely related to
the distributions of orders in a fixed number ring $\mathcal{O}_{K}$, a
problem studied by Brackenhoff [Bra09], Kaplan Marcinek and Takloo-Bighash
(cf. [KMTB15]). Given $k\in\mathbb{Z}_{\geq 1}$, following [Liu07], let
$f_{n}(k)$ be the number of commutative unital subrings $S$ of
$\mathbb{Z}^{n}$ such that $[\mathbb{Z}^{n}\mathrel{\mathop{\mathchar
58\relax}}S]=k$. The _subring zeta function_ is given by

$\zeta_{\mathbb{Z}^{n}}^{R}(s)=\sum_{k=1}^{\infty}f_{n}(k)k^{-s},$

which decomposes into an Euler product

$\zeta_{\mathbb{Z}^{n}}^{R}(s)=\prod_{p}\zeta_{\mathbb{Z}^{n},p}^{R}(s),$

where the product is over all primes $p$. The local Euler factor at $p$ is
given by

$\zeta_{\mathbb{Z}^{n},p}^{R}(s)\mathrel{\mathop{\mathchar
58\relax}}=\sum_{e=0}^{\infty}f_{n}(p^{e})p^{-es}.$

It is not hard to show that $\zeta_{\mathbb{Z}^{2}}^{R}(s)=\zeta(s)$, and that

$\zeta_{\mathbb{Z}^{3}}^{R}(s)=\frac{\zeta(3s-1)\zeta(s)^{3}}{\zeta(2s)^{2}},$

cf. [Liu07, Proposition 4.1]. The formula for $n=3$ was first obtained by
Datskovsky and Wright [DW88]. A formula for $n=4$ was obtained by Nakagawa cf.
[Nak96]. Recently, there has been interest in the following question (cf.
[Ish22b, Question 1.2]).

######  Question 1.1.

Let $n,e$ be a pair of natural numbers. What can be said about $f_{n}(p^{e})$
as a function of $p$?

For $e\leq 5$, Liu [Liu07] gives explicit formulae for $f_{n}(p^{e})$.
Subsequently, these formulae were generalized by Atanasov, Kaplan, Krakoff and
Menzel [AKKM21] for $e=6,7,8$. These computations indicate that for a fixed
pair $(n,e)$, the function $p\mapsto f_{n}(p^{e})$ is a polynomial in $p$ (cf.
[AKKM21, Question 1.13]), and this has been further studied by Isham in
[Ish22a]. The zeta function $\zeta_{\mathbb{Z}^{n}}^{R}(s)$ is said to be
_uniform_ if there is a rational function $W(X,Y)\in\mathbb{Q}(X,Y)$ such that
for every prime $p$, $\zeta_{\mathbb{Z}^{n},p}^{R}(s)=W(p,p^{-s})$. It is not
hard to show that the zeta function $\zeta_{\mathbb{Z}^{n}}(s)$ is uniform if
for all $e$, $f_{n}(p^{e})$ is a polynomial in $p$. For further details, we
refer to [AKKM21, section 5.1]. Below we summarize the known values of
$f_{n}(p^{e})$ for $e\leq 5$.

######  Theorem 1.2 (Liu [Liu07]).

With respect to notation above,

$\begin{split}f_{n}(1)=&1,f_{n}(p)=\binom{n}{2},f_{n}(p^{2})=\binom{n}{2}+\binom{n}{3}+3\binom{n}{4},\\\
f_{n}(p^{3})=&\binom{n}{2}+(p+1)\binom{n}{3}+7\binom{n}{4}+10\binom{n}{5}+15\binom{n}{6},\\\
f_{n}(p^{4})=&\binom{n}{2}+(3p+1)\binom{n}{3}+(p^{2}+p+10)\binom{n}{4}+(10p+21)\binom{n}{5}+70\binom{n}{6}\\\
+&105\binom{n}{7}+105\binom{n}{8},\\\ f_{n}(p^{5})=&{n\choose
2}+(4p+1){n\choose 3}+(7p^{2}+p+13){n\choose 4}+(p^{3}+p^{2}+41p+31){n\choose
5}\\\ +&(15p^{2}+35p+141){n\choose 6}.\\\ \end{split}$

For the values for $e$ in the range $6\leq e\leq 8$, we refer to [KMTB15].

In this manuscript, we extend the above mentioned results to $e=9$. First, we
introduce some further notation. A subring of prime power index decomposes
into a direct product of irreducible subrings, which we now proceed to
describe.

######  Definition 1.3.

A subring $L$ of index $p^{e}$ is said to be _irreducible_ if for each vector
$x=(x_{1},\dots,x_{n})^{t}\in L$, we have that

$x_{1}\equiv x_{2}\equiv\dots\equiv x_{n}\left(\operatorname{mod}p\right).$

An irreducible subring matrix is a matrix $A$ in Hermite normal form

(1.1)
$A=\begin{pmatrix}p^{\alpha_{1}}&pa_{1,2}&pa_{1,3}&\cdots&pa_{1,n-1}&1\\\
&p^{\alpha_{2}}&pa_{2,3}&\cdots&pa_{2,n-1}&1\\\
&&p^{\alpha_{3}}&\cdots&pa_{3,n-1}&1\\\ &&&\ddots&\vdots&\vdots\\\
&&&&p^{\alpha_{n-1}}&1\\\ &&&&&1\end{pmatrix},$

with $\alpha_{i}\geq 1$ for all $i$. The subring $L$ of index $p^{e}$ is
irreducible if and only if $A_{L}$ is an irreducible subring matrix. Let
$g_{n}(p^{e})$ be the number of irreducible subrings of $\mathbb{Z}^{n}$ of
index $p^{e}$. It is shown that every subring of $p$-power power index is a
direct sum of irreducible subrings, and as a consequence, we have the
following recursive formula (cf. Proposition 4.4 of [Liu07])

(1.2) $f_{n}(p^{e})=\sum_{i=0}^{e}\sum_{j=1}^{n}{n-1\choose
j-1}f_{n-j}(p^{e-i})g_{j}(p^{i}).$

In order to compute $f_{n}(p^{9})$ it thus suffices to compute $g_{j}(p^{e})$
for all values $e\leq 9$, $1\leq j\leq n$. We remark that the convention for
the definition of $g_{n}(p^{e})$ used here is that of [AKKM21], and differs
from that in [Liu07].

A composition of $m$ into $r$ parts consists of a tuple
$\alpha=(\alpha_{1},\dots,\alpha_{r})$ of positive integers such that
$\sum_{i=1}^{r}\alpha_{i}=m$. Let $\mathcal{C}_{n,e}$ be set of all
compositions of $e$ into $(n-1)$ parts. Given $\alpha\in\mathcal{C}_{n,e}$,
let $g_{\alpha}(p)$ be the number of irreducible subring matrices (cf.
Definition 2.3) of the form (1.1). We find that
$g_{n}(p^{e})=\sum_{\alpha\in\mathcal{C}_{n,e}}g_{\alpha}(p)$, and thus to
compute $g_{n}(p^{e})$, we need to compute $g_{\alpha}(p)$ for all
$\alpha\in\mathcal{C}_{n,e}$. Therefore, the numbers $g_{\alpha}(p)$ can be
thought of as the basic building blocks for computing the numbers $f_{n}(k)$.
In practice, it is possible to compute $g_{\alpha}(p)$ in many cases via
combinatorial case by case analysis. For larger values of $e$, the computation
of $f_{n}(p^{e})$ becomes significantly more involved. The total number of new
compositions that one must consider does grow exponentially, and even though
one may compute the value of $g_{\alpha}(p)$ for various types of compositons
that fit into a general framework, there are many exceptional compositions
that do not fit into such a framework. Furthermore, the combinatorial (case by
case) analysis does get increasing more challenging for exceptional
compositions of longer length. With this in mind, we state the main result
below.

######  Theorem 1.4.

With respect to notation above, we have that

$\displaystyle f_{n}(p^{9})-\gamma(n,p)={n\choose
2}+(p^{3}+4p^{2}+4p+1){n\choose 3}+(11p^{4}+30p^{3}+9p^{2}+p+25){n\choose 4}$
$\displaystyle+(11p^{6}+14p^{5}+137p^{4}-16p^{3}+81p^{2}+202p+73){n\choose
5}+(4p^{7}+76p^{6}+128p^{5}+71p^{4}$
$\displaystyle+464p^{3}+1088p^{2}+386p+571){n\choose
6}+(p^{9}+22p^{8}+23p^{7}+59p^{6}+31p^{5}+2032p^{4}$
$\displaystyle+2152p^{3}+2467p^{2}+4949p+2485){n\choose
7}+(p^{10}+p^{9}+2p^{8}+2p^{7}+507p^{6}+955p^{5}$
$\displaystyle+3293p^{4}+5980p^{3}+23410p^{2}+17011p+13707){n\choose
8}+(36p^{8}+37p^{7}+157p^{6}+1159p^{5}$
$\displaystyle+8545p^{4}+34997p^{3}+59371p^{2}+93649p+64019){n\choose
9}+(675p^{6}+795p^{5}+18960p^{4}$
$\displaystyle+48927p^{3}+250632p^{2}+330657p+297103){n\choose
10}+(990p^{5}+12540p^{4}+148830p^{3}$
$\displaystyle+497640p^{2}+1157145p+1245992){n\choose
11}+(13860p^{4}+97020p^{3}+1049895p^{2}+2961805p$
$\displaystyle+4727041){n\choose
12}+(135135p^{3}+1036035p^{2}+5900895p+15346045){n\choose 13}+(945945p^{2}$
$\displaystyle+7252245p+40500460){n\choose 14}+(4729725p+80615535){n\choose
15}+110810700{n\choose 16}$ $\displaystyle+91891800{n\choose
17}+34459425{n\choose 18},$

where $\gamma(n,p)\mathrel{\mathop{\mathchar
58\relax}}=\left(\sum_{k=2}^{n}{k-1\choose 5}\right)g_{(3,2,2,1,1)}(p)$.

It proves to be difficult to compute the exact value of $g_{(3,2,2,1,1)}(p)$
since it reduces to the explicit computation of the number of solutions to the
following system of polynomial equations over
$\mathbb{F}_{p}=\mathbb{Z}/p\mathbb{Z}$

$\begin{split}&(x_{3}^{2}-x_{3})-x_{2}(x_{7}^{2}-x_{7})-x_{1}(x_{5}^{2}-x_{5})=0\\\
&(x_{4}^{2}-x_{4})-x_{2}(x_{8}^{2}-x_{8})-x_{1}(x_{6}^{2}-x_{6})=0\\\
&x_{3}x_{4}-x_{2}x_{7}x_{8}-x_{1}x_{5}x_{6}=0.\end{split}$

There are $3$ equations in $8$ variables. Computations done for primes $p\leq
19$ suggest that the number of solutions for the above equations is given by
$N_{p}=p^{5}+12p^{4}-20p^{3}+30p^{2}-10p$. Our computations then suggest that

$g_{(3,2,2,1,1)}(p)=p^{7}+24p^{6}-29p^{5}+21p^{4}-4p^{3}.$

We are unable to verify this claim for primes $p>19$, since it seems to be a
difficult problem in general to compute the number of points on varieties over
finite fields in a large number of variables. We note that in very specific
cases, exact formulae are known. For instance, in the case of hypersurfaces
(cf. [Dwo62]), or in the case when the system consists of diagonal equations
(cf. [Spa79]) such questions are studied. One may however bound the size of
$g_{(3,2,2,1,1)}(p)$, and it follows from Proposition 7.5 that
$g_{(3,2,2,1,1)}(p)\geq p^{4}$.

We describe the method of proof in more detail. It follows from results in
[Liu07, AKKM21] that $g_{\alpha}(p)$ can be computed for compositions $\alpha$
of one of the following types

  * •

$\alpha=(\beta,1,\dots,1)$ and $n\geq 2$,

  * •

$\alpha=(2,1\dots,1,\beta,1,\dots,1)$ and $n\geq 3$.

We refer to results in section 2 for further details. In section 3, we prove
some general results which allow us to compute $g_{\alpha}(p)$, for
compositions $\alpha$ of one of the following types

  * •

$\alpha=(\beta,1,\dots,1,\gamma)$ is a composition of length $(n-1)\geq 3$
such that $\beta>2$ and $\gamma\geq\beta-1$,

  * •

$\alpha$ is of the form $\alpha=(2,1,\dots,1,2,1,\dots,1,\beta)$, where
$\beta>1$,

  * •

$\alpha$ is of the form $\alpha=(2,1,\dots,1,2,1,\dots,1,\beta,1)$, where
$\beta>1$,

  * •

$\alpha$ is of the form $\alpha=(2,1,\dots,1,3,1,\dots,1,2)$.

We refer to a composition that does not fit into any of the above families as
an exceptional composition. In section 4 (resp. section 5), we compute
$g_{\alpha}(p)$ for all relevant compositions beginning with $2$ (resp. $3$).
In section 6, we compute $g_{\alpha}(p)$ for all relevant compositions
beginning with $4,5$ or $6$. The proof of Theorem 1.4 is provided in section
7.1. All known computations indicate that for any composition $\alpha$, the
function $g_{\alpha}(p)$ is a polynomial in $p$. The conditions for a matrix
$A$ give rise to polynomial conditions on the entries $a_{i,j}$, and
$g_{\alpha}(p)$ in many cases is the number of $\mathbb{F}_{p}$-points on a
scheme defined by integral polynomial equations. It is certainly of interest
to note that in all the examples considered, these schemes have polynomial
point count in the sense of [HRV08, p.616, ll. -6 to -2].

We now come to describing the general asymptotic results proved in this
manuscript. The analysis of the numbers $f_{n}(p^{e})$ can be translated into
properties of the associated subring zeta functions. For instance, Isham in
[Ish22b] proves lower bounds for $g_{n}(p^{e})$ and deduces that the subring
zeta function $\zeta_{\mathbb{Z}^{n},p}^{R}(s)$ diverges for all $s$ such that
$\operatorname{Re}s\leq c_{7}(n)$, where $c_{7}(n)\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{max}_{0\leq d\leq n-1}\frac{d(n-1-d)}{(n-1+d)}$. This
comes as a consequence of proving lower bounds for $f_{n}(p^{e})$. Some
related results are also proven by Brackenhoff in [Bra09]. Liu attributes the
following conjecture regarding the asymptotics for the numbers $f_{n}(k)$ to
Bhargava (cf. [Liu07, p.298]). The conjecture was communicated to Liu via
personal communication, cf. _loc. cit._

######  Conjecture 1.5.

For $n$ odd, $f_{n}(k)=O(k^{\frac{n-1}{6}+\epsilon})$, and for $n$ even,
$f_{n}(k)=O(k^{\frac{n^{2}-2n}{6n-8}+\epsilon})$.

In particular, for a fixed prime number $p$ and a fixed value of $n$, the
conjecture predicts that

$f_{n}(p^{e})=\begin{cases}&O(p^{\frac{e(n-1)}{6}})\text{ if }n\text{ is
odd,}\\\ &O(p^{\frac{e(n^{2}-2n)}{6n-8}})\text{ if }n\text{ is odd.}\\\
\end{cases}$

Conjecture 1.5 motivates our results in section 7.2, where we investigate the
asymptotics for $g_{\alpha}(p)$ for certain natural families of compositions
$\alpha$. Let $n>1$ be a natural number and $t$ be in the range $1\leq t\leq
n-1$. Let $\alpha=(\alpha_{1},\alpha_{2},\dots,\alpha_{n-1})$ be a composition
of length $(n-1)$ and for $k\in\mathbb{Z}_{\geq 1}$, set
$\alpha_{/k,t}\mathrel{\mathop{\mathchar
58\relax}}=(\alpha_{1},\alpha_{2},\dots
k\alpha_{t}\dots,\alpha_{n-2},\alpha_{n-1})$, i.e., the composition obtained
upon multiplying the $t$-th coordinate of $\alpha$ by $k$. Note that
$g_{\alpha_{/k,t}}(p)$ contributes to $g_{n}(p^{e_{k}})$, where
$e_{k}\mathrel{\mathop{\mathchar
58\relax}}=\sum_{i=1}^{n-1}\alpha_{i}+(k-1)\alpha_{t}$. Therefore, the
asymptotic growth of $g_{\alpha_{/k,t}}(p)$ as a function of $k$ provides
insight into that of $g_{n}(p^{e_{k}})$. The following result is proven via a
combination of techniques from the geometry of numbers and the combinatorial
analysis of large subring matrices.

######  Theorem 1.6.

Let $n>1$ be a natural number and
$\alpha=(\alpha_{1},\alpha_{2},\dots,\alpha_{n-1})$ a composition of length
$(n-1)$ such that $\alpha_{i}>1$ are integers for each
$i\in\\{1,2,\dots,n-1\\}$ and $1\leq t\leq n-1$. Then,

$g_{\alpha_{/k,t}}(p)=O(p^{\gamma k(n-2)})\text{ as }k\to\infty,$

where $\gamma=\max\\{\alpha_{1},\dots,\alpha_{t}\\}$. The implied constant
depends on $p$ and $n$, and not on $k$.

Although the above result is weaker than the prediction of Conjecture 1.5, the
authors expect that such arguments have the potential to lead to stronger
results in the future.

### Acknowledgment

The second author is supported by the CRM-Simons postdoctoral fellowship.

##  2\. Preliminaries

Let $n\geq 1$ be an integer and $M_{n}(\mathbb{Z})$ denote the ring of
$n\times n$-matrices with integer entries. By definition, a _lattice_ in
$\mathbb{Z}^{n}$ is a subgroup $L$ of finite index in $\mathbb{Z}^{n}$. This
index is denoted $[\mathbb{Z}^{n}\mathrel{\mathop{\mathchar 58\relax}}L]$. Set
$u_{1},\dots,u_{n}$ to be the standard basis of $\mathbb{Z}^{n}$, with
$u_{i}=(0,0,\dots,0,1,0,\dots)$, with $1$ in the $i$-th position and $0$s in
all other positions. Let $v_{1},\dots,v_{n}$ be a basis of $L$, i.e., a set of
vectors such that every element $v\in L$ is uniquely represented as an
integral linear combination $v=\sum_{i=1}^{n}b_{i}v_{i}$. Expressing
$v_{i}=\sum_{j=1}^{n}a_{i,j}u_{j}$, consider the integer matrix
$A=\left(a_{i,j}\right)\in M_{n}(\mathbb{Z})$. We may choose
$v_{1},\dots,v_{n}$ such that the associated matrix $A$ is in Hermite normal
form, i.e.,

$A=\begin{pmatrix}a_{1,1}&a_{1,2}&a_{1,3}&\cdots&a_{1,n-1}&a_{1,n}\\\
&a_{2,2}&a_{2,3}&\cdots&a_{2,n-1}&a_{2,n}\\\
&&a_{3,3}&\cdots&a_{3,n-1}&a_{3,n}\\\ &&&\ddots&\vdots&\vdots\\\
&&&&a_{n-1,n-1}&a_{n-1,n}\\\ &&&&&a_{n,n}\end{pmatrix}$

with $0\leq a_{i,j}<a_{i,i}$ for all tuples $(i,j)$ such that $1\leq i<j\leq
n$. The following result is used to reinterpret counting problems for subrings
of $\mathbb{Z}^{n}$ in terms of intgral matrices satisfying precribed
conditions.

######  Lemma 2.1.

There is a bijection between lattices $L\subset\mathbb{Z}^{n}$ of index $k>0$
and integer $n\times n$ matrices $A$ in Hermite normal form with determinant
$k$.

###### Proof.

The reader is referred to the proof of [Liu07, Proposition 2.1]. ∎

Thus, to a lattice $L$ we associate the matrix $A_{L}$ in Hermite normal form,
and to a matrix $A$ in Hermite normal form, we associate a unique lattice
$L_{A}$. Given two integral vectors $u=(u_{1},\dots,u_{n})^{t}$ and
$v=(v_{1},\dots,v_{n})^{t}$, denote the _composite_ by $u\circ
v\mathrel{\mathop{\mathchar 58\relax}}=(u_{1}v_{1},\dots,u_{n}v_{n})^{t}$. A
lattice $L$ is multiplicatively closed if $u\circ v\in L$ for all elements
$u,v\in L$. A _subring_ of $\mathbb{Z}^{n}$ shall in this paper be taken to
mean a multiplicatively closed lattice which contains the identity element
$\mathbf{1}\mathrel{\mathop{\mathchar 58\relax}}=(1,1,\dots,1)^{t}$. In
particular, the index of a subring is finite. Given a positive integer $k$,
let $f_{n}(k)$ be the number of subrings of $\mathbb{Z}^{n}$ with index equal
to $k$. Define the subring zeta function as follows

$\zeta_{\mathbb{Z}^{n}}^{R}(s)\mathrel{\mathop{\mathchar
58\relax}}=\sum_{k=1}^{\infty}f_{n}(k)k^{-s}.$

The function $f_{n}(k)$ is multiplicative (cf. [Liu07, Proposition 2.7]),
i.e., given two coprime integers $k_{1}>0$ and $k_{2}>0$, we have that
$f_{n}(k_{1}k_{2})=f_{n}(k_{1})f_{n}(k_{2})$. The zeta function exhibits an
Euler product

$\zeta_{\mathbb{Z}^{n}}^{R}(s)=\prod_{p}\zeta_{\mathbb{Z}^{n},p}^{R}(s),$

where
$\zeta_{\mathbb{Z}^{n},p}^{R}(s)=\sum_{e=0}^{\infty}f_{n}(p^{e})p^{-es}$.
Thus, the study of the function $f_{n}(k)$ and the subring zeta function,
comes down to the determination of $f_{n}(p^{e})$, where $n>0,e\geq 0$ and $p$
is a prime number. More precisely, given $n$ and $e$, we would like to
determine $f_{n}(p^{e})$ as a function of $p$.

We recall Liu’s bijection between subrings of $\mathbb{Z}^{n}$ and integral
matrices in Hermite normal form.

######  Proposition 2.2.

Let $n,k>0$ be integers. The association $L\mapsto A_{L}$ gives a bijection
between subrings $L$ of $\mathbb{Z}^{n}$ of index $k$ and matrices
$A\in\operatorname{M}_{n}(\mathbb{Z})$ in Hermite normal form with $\det(A)=k$
and columns $v_{1},\dots,v_{n}$ such that

  1. (1)

$\mathbf{1}$ is in the column span of $A$,

  2. (2)

for all $i,j$ in the range $1\leq i,j\leq n$, $v_{i}\circ v_{j}$ is in the
column span of $A$.

###### Proof.

The reader is referred to [Liu07, Proposition 2.1, 2.2]. ∎

######  Definition 2.3.

A matrix $A$ satisfying the conditions of Proposition 2.2 is referred to as a
_subring_ matrix. The column span of $A$ is denoted $\operatorname{Col}(A)$.

Let $\alpha=(\alpha_{1},\dots,\alpha_{n-1})$ be a composition of length
$(n-1)$. Recall from the introduction that $g_{\alpha}(p)$ is the number of
irreducible subring matrices with diagonal
$(p^{\alpha_{1}},\dots,p^{\alpha_{n-1}},1)$. We recall some useful results
from [AKKM21, Liu07] which shall allow us to deduce the values of
$g_{\alpha}(p)$ for specific choices of $\alpha$.

######  Lemma 2.4.

Let $n\geq 2$ and $\alpha=(\beta,1,\dots,1)$ be a composition of length
$(n-1)$. Then, the following assertions hold.

  1. (1)

If $\beta=2$, then $g_{\alpha}(p)=p^{n-2}$.

  2. (2)

If $\beta\geq 3$, then $g_{\alpha}(p)=(n-1)p^{n-2}$.

###### Proof.

The above result is [AKKM21, Lemma 3.5]. ∎

######  Lemma 2.5.

Let $n\geq 3$ and let $\alpha=(2,1\dots,1,\beta,1,\dots,1)$ be a composition
of length $(n-1)$ where $\beta$ is in the $k$-th position. Let $r=n-1-k$,
i.e., the number of $1$s after $\beta$. Then, the following assertions hold.

  1. (1)

If $\beta=2$, then,

$g_{\alpha}(p)=p^{n-3+r}+(r+1)p^{n-3}(p-1).$

  2. (2)

If $\beta\geq 3$, then

$g_{\alpha}(p)=(r+1)\left(p^{n-3+r}+p^{n-3}(p-1)\right).$

###### Proof.

The above result is [AKKM21, Lemma 3.6]. ∎

##  3\. General results for computing the value of $g_{\alpha}(p)$

In this section, we prove a number of general results computing
$g_{\alpha}(p)$ for various choices of $\alpha$. Given an irreducible subring
with associated matrix $A\in M_{n}(\mathbb{Z})$, recall that
$v_{1},\dots,v_{n}$ shall denote the columns of $A$, where $v_{i}$ is the
$i$-th column.

######  Lemma 3.1.

Let $n\geq 4$, $\alpha=(\beta,1,\dots,1,\gamma)$ be a composition of length
$(n-1)$ such that $\beta>2$ and $\gamma\geq\beta-1$. Then, we have

$g_{\alpha}(p)=p^{n-3+\lfloor\frac{\beta}{2}\rfloor}+(n-3)p^{n-2}.$

###### Proof.

Consider a matrix $A\in M_{n}(\mathbb{Z})$ in Hermite normal form

$A=\begin{pmatrix}p^{\beta}&pa_{1}&pa_{2}&\cdots&pa_{n-2}&1\\\
&p&0&\cdots&0&1\\\ &&p&\cdots&0&1\\\ &&&\ddots&\vdots&\vdots\\\
&&&&p^{\gamma}&1\\\ &&&&&1,\end{pmatrix}$

where the entries $a_{1},\dots,a_{n-2}$ satisfy $0\leq a_{i}\leq
p^{\beta-1}-1$. First we write down conditions for
$v_{j}^{2}\in\operatorname{Col}(A)$. Clearly, this condition is automatically
satisfied for $j=1$ and $j=n$. Consider the values of $j$ that lie in the
range $2\leq j\leq n-1$. We may write $j=i+1$, where $i$ lies in the range
$1\leq i\leq n-2$. First, we consider the case when $i\leq n-3$. Observe that

$v_{i+1}^{2}=(a_{i}^{2}p^{2},0,\dots,0,p^{2},0,\dots,0)^{t}.$

Note that $v_{i+1}^{2}$ is contained in $\operatorname{Col}(A)$ if and only if
$v_{i+1}^{2}-pv_{i+1}$ is contained in $\operatorname{Col}(A)$. We find that

$v_{i+1}^{2}-pv_{i+1}=\left((a_{i}^{2}-a_{i})p^{2},0,\dots,0\right)^{t}.$

Therefore, $v_{i+1}^{2}$ is contained in $\operatorname{Col}(A)$ if and only
if

(3.1) $a_{i}^{2}-a_{i}\equiv 0\mod{p^{\beta-2}}.$

We find that $v_{n-1}^{2}=(a_{n-2}^{2}p^{2},0,\dots,0,p^{2\gamma},0)^{t}$ is
in $\operatorname{Col}(A)$ if and only if

$v_{n-1}^{2}-p^{\gamma}v_{n-1}=\left(a_{n-2}^{2}p^{2}-a_{n-2}p^{\gamma+1},0,\dots,0\right)^{t}$

is contained in $\operatorname{Col}(A)$. Therefore, we deduce that
$v_{n-1}^{2}$ is in $\operatorname{Col}(A)$ if and only if

(3.2) $a_{n-2}^{2}p^{2}-a_{n-2}p^{\gamma+1}\equiv 0\mod{p^{\beta}}.$

It is assumed that $\gamma\geq\beta-1$ and hence the above condition is
equivalent to

$a_{n-2}^{2}\equiv 0\mod{p^{\beta-2}},$

i.e.,

(3.3) $a_{n-2}\equiv 0\mod{p^{\lceil\frac{\beta-2}{2}\rceil}}.$

For $1\leq i<j\leq n-2$, we find that $v_{i+1}\circ v_{j+1}$ is contained in
$\operatorname{Col}(A)$ if and only if

(3.4) $a_{i}a_{j}\equiv 0\mod{p^{\beta-2}}.$

Putting it all together, we find that $A$ is a subring matrix if and only if
the following conditions are satisfied

  1. (1)

$a_{i}(a_{i}-1)\equiv 0\mod{p^{\beta-2}}$ for all $i$ in the range $1\leq
i\leq n-3$,

  2. (2)

$a_{n-2}\equiv 0\mod{p^{\lceil\beta/2\rceil-1}}$,

  3. (3)

$a_{i}a_{j}\equiv 0\mod{p^{\beta-2}}$ for all $i,j$ in the range $1\leq
i<j\leq n-2$.

From condition (1) above, we find that at most one of $a_{i}\equiv
1\mod{p^{\beta-2}}$ for $i=1,\dots,n-3$. We thus are led to the following
cases.

Case 1: First, we consider the case when $a_{i}\equiv 0\mod{p^{\beta-2}}$ for
all $i$ in the range $1\leq i\leq n-3$. Since $a_{i}$ is in the range $0\leq
a_{i}<p^{\beta-1}$, we find that there are $p$ choices for each $a_{i}$ and
$p^{\beta-\lceil\beta/2\rceil}=p^{\lfloor\beta/2\rfloor}$ choices for
$a_{n-2}$. In total, we find that there are $p^{n-3+\lfloor\beta/2\rfloor}$
matrices in this case.

Case 2: Consider the case when one of the $a_{i}$ satisfies $a_{i}\equiv
1\mod{p^{\beta-2}}$. Then, from (3) we find that

$a_{n-2}\equiv a_{i}a_{n-2}\equiv 0\mod{p^{\beta-2}}.$

Thus, for each index $i$ in the range $1\leq i\leq n-2$, we have $p^{n-2}$
choices for which $a_{i}\equiv 1\mod{p^{\beta-2}}$. There are $(n-3)$ values
taken by $i$ for which $a_{i}\equiv 1\mod{p^{\beta-2}}$. Thus, in this case,
there are $(n-3)p^{n-2}$ choices.

Putting together the calculations from cases 1 and 2, we find that
$g_{\alpha}(p)=p^{n-3+\lfloor\beta/2\rfloor}+(n-3)p^{n-2}$. ∎

######  Lemma 3.2.

Let $\alpha$ be of the form $\alpha=(2,1,\dots,1,2,1,\dots,1,\beta)$, where
$\beta>1$ and the second $2$ occurs at position $k\geq 2$, then

$g_{\alpha}(p)=p^{n-3+r}+p^{n-3}(p-1)r,$

where $r=n-1-k$.

###### Proof.

Let $A$ be an integral matrix in Hermite normal form

$A=\begin{pmatrix}p^{2}&pa_{1}&pa_{2}&\cdots&pa_{k-1}&\cdots&\cdots&pa_{n-2}&1\\\
&p&0&\cdots&0&\cdots&\cdots&0&1\\\ &&p&\cdots&0&\cdots&\cdots&0&1\\\
&&&\ddots&\vdots&\vdots&\cdots&\vdots&\vdots\\\
&&&&p^{2}&pb_{1}&\cdots&pb_{r}&1\\\ &&&&&p&\cdots&0&1\\\
&&&&&&\ddots&\vdots&1\\\ &&&&&&&p^{\beta}&1\\\ &&&&&&&&1.\end{pmatrix}$

Since the first entry of $\alpha$ is equal to $2$, it is easy to see that
$v_{i}^{2}$ is in $\operatorname{Col}(A)$ for $i=1,\dots,k-1$. We find that
$v_{k}^{2}$ is in $\operatorname{Col}(A)$ if and only if
$v_{k}^{2}-p^{2}v_{k}$ is in $\operatorname{Col}(A)$. Since $p^{2}$ divides
$a_{k-1}^{2}p^{2}-p^{3}a_{k-1}$, this condition is seen to be satisfied. For
$i=1,\dots,r$, we observe that

$v_{k+i}^{2}=(a_{k-1+i}^{2}p^{2},\cdots,b_{i}^{2}p^{2},\cdots,p^{2})^{t}\text{
is in }\operatorname{Col}(A)$

if and only if

$v_{k+i}^{2}-pv_{i+k}=\left((a_{k-1+i}^{2}-a_{k-1+i})p^{2},\dots,(b_{i}^{2}-b_{i})p^{2},0,\dots,0\right)^{t}$

is in $\operatorname{Col}(A)$. Subtracting $(b_{i}^{2}-b_{i})v_{k}$ from the
above, we get

$v_{k+i}^{2}-pv_{i+k}-(b_{i}^{2}-b_{i})v_{k}=\left((a_{k-1+i}^{2}-a_{k-1+i})p^{2}-(b_{i}^{2}-b_{i})a_{k-1}p,0,\dots,0\right)^{t},$

which is in $\operatorname{Col}(A)$ if and only if first entry is divisible by
$p^{2}$. We have thus shown that $v_{k+i}^{2}$ is in $\operatorname{Col}(A)$
if and only if

(3.5) $(b_{i}^{2}-b_{i})a_{k-1}\equiv 0\mod{p}.$

Now,
$v_{n-1}^{2}=\left(a_{n-2}^{2}p^{2},\dots,b_{r}^{2}p^{2},0,\dots,0,p^{2\beta},0,\dots\right)^{t}$
is in $\operatorname{Col}(A)$ if and only if $v_{n-1}^{2}-p^{\beta}v_{n-1}$ is
in $\operatorname{Col}(A)$. Note that therefore, $v_{n-1}^{2}$ is in
$\operatorname{Col}(A)$ if and only if $b_{r}a_{k-1}\equiv 0\mod{p}$.

It is clear that for all $1\leq i\leq k$ and all values of $j$, $v_{i}\circ
v_{j}\in\operatorname{Col}(A)$. Now consider $v_{k+i}\circ v_{k+j}$ for $1\leq
i<j\leq r$, it is equal to

$\left(a_{k-1+i}a_{k-1+j}p^{2},0,\dots,0,b_{i}b_{j}p^{2},0,\dots,0\right)^{t}.$

We find that $v_{k+i}\circ v_{k+j}$ is contained in $\operatorname{Col}(A)$ if
and only if

$v_{k+i}\circ v_{k+j}-b_{i}b_{j}v_{k-1}\in\operatorname{Col}(A).$

Therefore, $v_{k+i}\circ v_{k+j}$ is contained in $\operatorname{Col}(A)$ if
and only if $b_{i}b_{j}a_{k-1}\equiv 0\mod{p}$. Therefore, $A$ is a subring
matrix if and only if

  1. (1)

$(b_{i}^{2}-b_{i})a_{k-1}\equiv 0\mod{p}$ for $i=1,\dots,r-1$,

  2. (2)

$b_{r}a_{k-1}\equiv 0\mod{p}$,

  3. (3)

$b_{i}b_{j}a_{k-1}\equiv 0\mod{p}$, for all $i,j$ such that $1\leq i<j\leq r$.

We consider two cases.

Case 1: Consider the case when $a_{k-1}=0$. In this case, the total number of
choices is the total number of choices of
$(a_{1},\dots,a_{k-2},a_{k},\dots,a_{n-2})$ and $(b_{1},\dots,b_{r})$. Thus,
the total number of choices are $p^{n-3+r}$.

Case 2: Consider the other case, i.e., when $a_{k-1}\neq 0$. Since
$a_{k-1}<p$, we find that $p\nmid a_{k-1}$. Therefore, the conditions are as
follows

  1. (1)

$b_{i}^{2}-b_{i}\equiv 0\mod{p}$,

  2. (2)

$b_{r}\equiv 0\mod{p}$,

  3. (3)

$b_{i}b_{j}\equiv 0\mod{p}$, $1\leq i<j\leq r$.

Note that all elements $b_{i}$ satisfy the bounds $0\leq b_{i}<p$. Therefore,
at most one of the $b_{i}$ satisfies $b_{i}=1$. Subdivide into two cases,
first consider the case when all the $b_{i}$ are equal to $0$ and then
consider the case when at most one of the $b_{i}$ is equal to $1$. The total
number of choices is $p^{n-3}(p-1)r$. Upon adding up all the conclusions from
the case decomposition above, we find that

$g_{\alpha}(p)=p^{n-3+r}+p^{n-3}(p-1)r.$

∎

######  Lemma 3.3.

Let $\alpha$ be of the form $\alpha=(2,1,\dots,1,2,1,\dots,1,\beta,1)$, where
$\beta>1$, the second $2$ occurs at position $k\geq 2$ and set
$r\mathrel{\mathop{\mathchar 58\relax}}=n-1-k$. Then, the following assertions
hold.

  1. (1)

If $\beta=2$, then we find that

$g_{\alpha}(p)=2p^{n-3+r}+p^{n-5+r}(p-2)+2rp^{n-3}(p-1)+p^{n-4}(p-1)(p-2)(p+r-2).$

  2. (2)

If $\beta\geq 3$, then,

$g_{\alpha}(p)=2p^{n-3+r}+2p^{n-5+r}(p-1)+2rp^{n-3}(p-1)+2p^{n-4}(p-1)^{2}(p+r-2).$

###### Proof.

Let $A$ be an integral matrix in Hermite normal form

$A=\begin{pmatrix}p^{2}&pa_{1}&pa_{2}&\cdots&pa_{k-1}&\cdots&\cdots&\cdots&pa_{n-2}&1\\\
&p&0&\cdots&0&\cdots&\cdots&\cdots&0&1\\\
&&p&\cdots&0&\cdots&\cdots&\cdots&0&1\\\
&&&\ddots&\vdots&\vdots&\cdots&\cdots&\vdots&\vdots\\\
&&&&p^{2}&pb_{1}&\cdots&\cdots&pb_{r}&1\\\ &&&&&p&\cdots&\cdots&0&1\\\
&&&&&&\ddots&\cdots&\vdots&1\\\ &&&&&&&p^{\beta}&pc_{1}&1\\\ &&&&&&&&p&1\\\
&&&&&&&&&1.\end{pmatrix}$

Since the first entry is $p^{2}$, it is clear that $v_{i}^{2}$ is contained in
$\operatorname{Col}(A)$ for $i=1,2,\dots,k$. For $i=1,2,\dots,r-2$, we find
that $v_{k+i}^{2}$ is contained in $\operatorname{Col}(A)$ if and only if
$v_{k+i}^{2}-pv_{k+i}$ is contained in $\operatorname{Col}(A)$. So,

$(a_{k-1+i}^{2}p^{2}-a_{k-1}p^{2},\dots,b_{i}^{2}p^{2}-b_{i}p^{2},\dots)^{t}$

should be in $\operatorname{Col}(A)$. It is clear that this is true if and
only if

(3.6) $a_{k-1}(b_{i}^{2}-b_{i})\equiv 0\mod{p}$

Similarly we see that $v_{n-2}^{2}\in\operatorname{Col}(A)$ if and only if
$v_{n-2}^{2}-p^{\beta}v_{n-2}\in\operatorname{Col}(A)$. Now,

$(a_{n-3}^{2}p^{2}-a_{n-3}p^{\beta+1},\dots,b_{r-1}^{2}p^{2}-b_{r-1}p^{\beta+1},\dots)^{t}$

should be in $\operatorname{Col}(A)$. It is again clear that this is true if
and only if

(3.7) $a_{k-1}b_{r-1}\equiv 0\mod p$

as $\beta>1$. Again, $v_{n-1}^{2}\in\operatorname{Col}(A)$ if and only if
$v_{n-1}^{2}-pv_{n-1}\in\operatorname{Col}(A)$, so

$(a_{n-2}^{2}p^{2}-a_{n-2}p^{2},\dots,(b_{r}^{2}-b_{r})p^{2},\dots,(c_{1}^{2}-c_{1})^{2},0,0)^{t}$

should be in $\operatorname{Col}(A)$. Then we have $c_{1}^{2}-c_{1}\equiv
0\mod p^{\beta-2}$, and

(3.8) $b_{r-1}(c_{1}^{2}-c_{1})\equiv 0\mod p^{\beta-1}$ (3.9)
$a_{k-1}\left(b_{r}^{2}-b_{r}-\frac{b_{r-1}(c_{1}^{2}-c_{1})}{p^{\beta-1}}\right)+a_{n-3}\frac{c_{1}^{2}-c_{1}}{p^{\beta-2}}\equiv
0\mod p$

The requirement that $v_{i}v_{j}$ belongs to $\operatorname{Col}(A)$ for
$i\neq j$ translates the following conditions on entries of the matrix (for
all $1\leq i<j\leq r$, and $\\{i,j\\}\neq\\{r-1,r\\}$)

$a_{k-1}b_{i}b_{j}\equiv 0\mod p$

First, we suppose that $\beta\geq 3$, then we have conditions,

  1. (1)

$a_{k-1}(b_{i}^{2}-b_{i})\equiv 0\mod{p}$, $i=1,\dots,r-2$,

  2. (2)

$b_{r-1}a_{k-1}\equiv 0\mod p$,

  3. (3)

$c_{1}^{2}-c_{1}\equiv 0\mod p^{\beta-2}$,

  4. (4)

$b_{r-1}(c_{1}^{2}-c_{1})\equiv 0\mod p^{\beta-1}$,

  5. (5)

$a_{k-1}\left(b_{r}^{2}-b_{r}-\frac{b_{r-1}(c_{1}^{2}-c_{1})}{p^{\beta-1}}\right)+a_{n-3}\frac{c_{1}^{2}-c_{1}}{p^{\beta-2}}\equiv
0\mod p$,

  6. (6)

$a_{k-1}b_{i}b_{j}\equiv 0\mod p$, $1\leq i<j\leq r$, and
$\\{i,j\\}\neq\\{r-1,r\\}$.

We consider two cases.

Case 1 : First, we consider the case when $a_{k-1}=0$. Then, the above
equations reduce to the following:

  1. (1)

$c_{1}^{2}-c_{1}\equiv 0\mod p^{\beta-2}$,

  2. (2)

$b_{r-1}(c_{1}^{2}-c_{1})\equiv 0\mod p^{\beta-1}$,

  3. (3)

$\frac{a_{n-3}(c_{1}^{2}-c_{1})}{p^{\beta-2}}\equiv 0\mod p$.

If $c_{1}\in\\{0,1\\}$, then the number of such matrices is $2p^{n-3+r}$. On
the other hand, if $c_{1}\notin\\{0,1\\}$, then, there are $2p-2$ choices for
$c_{1}$. Since $b_{r-1}=0,a_{n-3}=0$, we deduce that there are
$2(p-1)p^{n+r-5}$ more matrices.

Case 2 : Suppose $a_{k-1}\neq 0$, then equations reduce to

  1. (1)

$b_{i}^{2}-b_{i}\equiv 0\mod p$, $i=1,\dots,r-2$,

  2. (2)

$b_{r-1}=0$,

  3. (3)

$c_{1}^{2}-c_{1}\equiv 0\mod p^{\beta-2}$,

  4. (4)

$a_{k-1}\left(b_{r}^{2}-b_{r}\right)+a_{n-3}\frac{c_{1}^{2}-c_{1}}{p^{\beta-2}}\equiv
0\mod p$,

  5. (5)

$b_{i}b_{j}\equiv 0\mod p$, $1\leq i<j\leq r$, and $\\{i,j\\}\neq\\{r-1,r\\}$

We divide into two sub-cases.

  * •

Case 2A : Suppose that $c_{1}\in\\{0,1\\}$, then we get that
$b_{r}\in\\{0,1\\}$ and as in Lemma 3.2, we get that at most one of the
$b_{i}$ satisfies $b_{i}=1$. Subdivide into two cases, first consider the case
when all the $b_{i}$ are equal to $0$ and then consider the case when at most
one of the $b_{i}$ is equal to $1$. Therefore, the total number of choices is
$2rp^{n-3}(p-1)$.

  * •

Case 2B : Consider the other subcase, i.e., $c_{1}\notin\\{0,1\\}$. Then,
there is a unique value of $a_{n-3}$ for each value of $b_{r},a_{k-1},c_{1}$,
so we get $2p^{n-3}(p-1)^{2}(p+r-2)$ matrices

Putting it all together, the result is proven. The case $\beta=2$ is similar,
and the number of matrices change only in Case 1, with $c_{1}\notin\\{0,1\\}$
and Case 2B. ∎

######  Lemma 3.4.

Let $\alpha$ be of the form $\alpha=(2,1,\dots,1,3,1,\dots,1,2)$, where $3$
occurs at position $k\geq 2$. Then, we have that

$g_{\alpha}(p)=rp^{n-3+r}+p^{n-3}(p-1)(p+r-1),$

where $r\mathrel{\mathop{\mathchar 58\relax}}=n-1-k$.

###### Proof.

Let $A$ be an integral matrix in Hermite normal form

$A=\begin{pmatrix}p^{2}&pa_{1}&pa_{2}&\cdots&pa_{k-1}&\cdots&\cdots&pa_{n-2}&1\\\
&p&0&\cdots&0&\cdots&\cdots&0&1\\\ &&p&\cdots&0&\cdots&\cdots&0&1\\\
&&&\ddots&\vdots&\vdots&\cdots&\vdots&\vdots\\\
&&&&p^{3}&pb_{1}&\cdots&pb_{r}&1\\\ &&&&&p&\cdots&0&1\\\
&&&&&&\ddots&\vdots&1\\\ &&&&&&&p^{2}&1\\\ &&&&&&&&1.\end{pmatrix}$

Since the first diagonal entry is $p^{2}$, we see that $v_{i}^{2}$ is
contained in $\operatorname{Col}(A)$ for all $i=1,\dots,k$. Note that
$v_{k+i}^{2}\in\operatorname{Col}(A)$ if and only if
$v_{k+i}^{2}-pv_{k+i}\in\operatorname{Col}(A)$ for $i=1,2,\dots,r-1$. Hence,
we find that

$\left((a_{k-1+i}^{2}-a_{k-1+i})p^{2},0,\dots,0,(b_{i}^{2}-b_{i})p^{2},0,\dots,0\right)^{t}$

should be in $\operatorname{Col}(A)$. We deduce that that this is the case if
and only if the following conditions are satisfied

(3.10) $\begin{split}&b_{i}^{2}-b_{i}\equiv 0\mod p,\\\
&a_{k-1}(b_{i}^{2}-b_{i})\equiv 0\mod p^{2}.\end{split}$

It is also required that $v_{n-1}^{2}$ is contained in
$\operatorname{Col}(A)$, which is the case if and only if
$v_{n-1}^{2}-p^{2}v_{n-1}$ is contained in $\operatorname{Col}(A)$. Therefore,
we find that

$\left((a_{n-2}^{2}-a_{n-2}p)p^{2},0,\dots,0,(b_{r}^{2}-b_{r}p)p^{2},0,\dots,0\right)^{t}$

should be in $\operatorname{Col}(A)$. We get that $b_{r}^{2}-b_{r}p\equiv
0\mod p$ and $a_{k-1}(b_{r}^{2}-b_{r}p)\equiv 0\mod p^{2}$, therefore, we find
that $p\mid b_{r}$. Using similar arguments we deduce that
$v_{k+i}v_{k+j}\in\operatorname{Col}(A)$ for $1\leq i<j\leq r$ if and only if
the following conditions are satisfied

(3.11) $\begin{split}&b_{i}b_{j}\equiv 0\mod p,\\\ &a_{k-1}b_{i}b_{j}\equiv
0\mod p^{2}.\end{split}$

It is clear that $v_{i}v_{j}$ is contained in $\operatorname{Col}(A)$ for
$1\leq i<j\leq k$. Therefore, we have following conditions on the entries of
$A$

  1. (1)

$b_{i}^{2}-b_{i}\equiv 0\mod p$ and $a_{k-1}(b-i^{2}-b_{i})\equiv 0\mod p^{2}$
for $i=1,\dots,r-1$,

  2. (2)

$b_{r}=b_{r}^{\prime}p$, where $0\leq b_{r}^{\prime}\leq p-1$,

  3. (3)

$b_{i}b_{j}\equiv 0\mod p$ and $a_{k-1}b_{i}b_{j}\equiv 0\mod p^{2}$ for all
values $1\leq i<j\leq r$.

We consider two cases as follows.

Case 1 : First, we consider the case when $a_{k-1}=0$. In this case, the
conditions on $A$ reduce to the following

  1. (1)

$b_{i}^{2}-b_{i}\equiv 0\mod p$ for all $i=1,\dots,r-1$,

  2. (2)

$b_{r}=b_{r}^{\prime}p$, where $0\leq b_{r}^{\prime}\leq p-1$,

  3. (3)

$b_{i}b_{j}\equiv 0\mod p$ for $1\leq i<j\leq r$.

As in Lemma 3.3, either all the values of $b_{i}$ for $1\leq i\leq r-1$ are
$0\mod p$, or at most one of these values is $1\mod p$. Further dividing into
cases, it is easy to see that the number of matrices is $rp^{n-3+r}$.

Case 2 : Next, we consider the other case, namely assume that $a_{k-1}\neq 0$.
The conditions on $A$ then reduce to the following

  1. (1)

$b_{i}^{2}-b_{i}\equiv 0\mod p^{2}$ for all $i=1,\dots,r-1$,

  2. (2)

$b_{r}=b_{r}^{\prime}p$, where $0\leq b_{r}^{\prime}\leq p-1$,

  3. (3)

$b_{i}b_{j}\equiv 0\mod p^{2}$ for all $(i,j)$ satisfying $1\leq i<j\leq r$.

Consequently, it follows that either $b_{i}=0$ for all $i=1,\dots,r-1$, or at
most one of them is $1$. Therefore, we find that the number of matrices in
this case is equal to $p^{n-3}(p-1)(p+r-1)$ matrices. Adding up our
conclusions, we prove the assertion of the lemma. ∎

##  4\. Calculating the values of $g_{\alpha}(p)$ for compositions beginning
with $2$

###  4.1. Compositions of length $4$

We consider the compositions $\alpha$ of length $4$. In all, there are $15$ of
them, listed below

$(2,5,1,1)$ | $(2,1,2,4)$
---|---
$(2,1,5,1)$ | $(2,3,3,1)$
$(2,1,1,5)$ | $(2,3,1,3)$
$(2,4,2,1)$ | $(2,1,3,3)$
$(2,4,1,2)$ | $(2,3,2,2)$
$(2,2,4,1)$ | $(2,2,3,2)$
$(2,2,1,4)$ |  $(2,2,2,3)$.
$(2,1,4,2)$ |

It follows directly from Lemmas 2.5, 3.2 and 3.3 that

$g_{(2,5,1,1)}(p)$ | $3p^{4}+3p^{3}-3p^{2}$
---|---
$g_{(2,1,5,1)}(p)$ | $4p^{3}-2p^{2}$
$g_{(2,1,1,5)}(p)$ | $p^{3}$
$g_{(2,2,4,1)}(p)$ | $4p^{4}+2p^{3}-4p^{2}$
$g_{(2,2,1,4)}(p)$ | $p^{4}+2p^{3}-2p^{2}$
$g_{(2,1,2,4)}(p)$ |  $2p^{3}-p^{2}$.

We compute $g_{\alpha}(p)$ for the rest of the compositions. We note that many
arguments are similar, and we summarize the arguments that tend to repeat.

######  Lemma 4.1.

With respect to notation above, we have that $g_{(2,1,4,2)}(p)=3p^{4}-2p^{3}$.

###### Proof.

Let $A$ be the matrix,

$\begin{pmatrix}p^{2}&a_{1}p&a_{2}p&a_{3}p&1\\\ 0&p&0&0&1\\\
0&0&p^{4}&b_{1}p&1\\\ 0&0&0&p^{2}&1\\\ 0&0&0&0&1\end{pmatrix}$

where $0\leq a_{1}\leq p-1$ and $0\leq b_{1}\leq p^{3}-1$. We arrive at
conditions for $A$ to be a subring matrix. It is easy to see that

  * •

$v_{2}^{2}$,$v_{3}^{2}$,$v_{2}v_{3}$, $v_{2}v_{4}$, $v_{3}v_{4}$ are in
$\operatorname{Col}(A)$.

  * •

We find that $v_{4}^{2}$ is in $\operatorname{Col}(A)$ if and only if
$v_{4}^{2}-p^{2}v_{4}$ is contained in $\operatorname{Col}(A)$. In other
words,

$\begin{split}&(a_{3}^{2}p^{2},0,b_{1}^{2}p^{2},p^{4},0)^{t}-p^{2}(a_{3}p,0,b_{1}p,p^{2},0)^{t}\\\
=&\left((a_{3}^{2}p^{2}-a_{3}p^{3}),0,(b_{1}^{2}p^{2}-b_{1}p^{3}),0,0\right)^{t}\end{split}$

is in $\operatorname{Col}(A)$. The expression
$(b_{1}^{2}p^{2}-b_{1}p^{3})=b_{1}(b_{1}-p)p^{2}$ must be divisible by $p^{4}$
and moreover, we find that $v_{4}^{2}-p^{2}v_{4}$ is contained in
$\operatorname{Col}(A)$ if and only if
$v_{4}^{2}-p^{2}v_{4}-\frac{b_{1}(b_{1}-p)}{p^{2}}v_{3}$ is in
$\operatorname{Col}(A)$. This holds if and only if in addition, we have that
$b_{1}(b_{1}-p)a_{2}\equiv 0\mod p^{3}$.

We deduce from above that the necessary conditions are as follows

  1. (1)

$b_{1}(b_{1}-p)\equiv 0\mod p^{2}$,

  2. (2)

$b_{1}(b_{1}-p)a_{2}\equiv 0\mod p^{3}$.

From equation (1), we get that $b_{1}=b_{1}^{\prime}p$, where $0\leq
b_{1}^{\prime}\leq p^{2}-1$. Equation (2) asserts that
$b_{1}^{\prime}(b_{1}^{\prime}-1)a_{2}\equiv 0\mod p$. Consider the following
case decomposition.

  * •

Case 1 : Assume that $a_{2}=0$. In this case, the number of such matrices is
$p^{4}$.

  * •

Case 2 : Consider the other case, i.e., $a_{2}\neq 0$. Then, we have
$b_{1}^{\prime}(b_{1}^{\prime}-1)\equiv 0\mod p$. Hence, the total number of
such matrices is easily seen to be $2p^{3}(p-1)$.

We conclude from the above that
$g_{(2,1,4,2)}(p)=p^{4}+2p^{3}(p-1)=3p^{4}-2p^{3}$. ∎

######  Lemma 4.2.

With respect to notation above, we find that
$g_{(2,4,1,2)}(p)=p^{5}+3p^{4}-p^{3}-p^{2}$.

###### Proof.

Let $A$ be the matrix

$\begin{pmatrix}p^{2}&a_{1}p&a_{2}p&a_{3}p&1\\\ 0&p^{4}&b_{1}p&b_{2}p&1\\\
0&0&p&0&1\\\ 0&0&0&p^{2}&1\\\ 0&0&0&0&1\end{pmatrix}$

where $0\leq a_{i}\leq p-1$ and $0\leq b_{j}\leq p^{3}-1$. We obtain
conditions for $A$ to be a subring matrix. By the same arguments as in Lemma
4.1, we find that

  * •

$v_{2}^{2}$, $v_{2}v_{3}$, $v_{2}v_{4}$ are in $\operatorname{Col}(A)$.

  * •

We find that $v_{3}^{2}$ is in $\operatorname{Col}(A)$ if and only if
$b_{1}(b_{1}-1)\equiv 0\mod p^{2}$ and $b_{1}(b_{1}-1)a_{1}\equiv 0\mod
p^{3}$.

  * •

We find that $v_{4}^{2}$ is in $\operatorname{Col}(A)$ if and only if
$b_{2}=b_{2}^{\prime}p$, $0\leq b_{2}^{\prime}\leq p^{2}-1$ and
$b_{2}^{\prime}(b_{2}^{\prime}-1)a_{1}\equiv 0\mod p$.

  * •

We find that $v_{3}v_{4}$ is in $\operatorname{Col}(A)$ if and only if
$b_{1}b_{2}^{\prime}\equiv 0\mod p$ and $a_{1}b_{1}b_{2}^{\prime}\equiv 0\mod
p^{2}$.

Hence, $A$ is a subring matrix if and only if

  1. (1)

$b_{1}(b_{1}-1)\equiv 0\mod p^{2}$,

  2. (2)

$a_{1}b_{1}(b_{1}-1)\equiv 0\mod p^{3}$,

  3. (3)

$b_{2}=b_{2}^{\prime}p$ for $0\leq b_{2}^{\prime}\leq p^{2}-1$,

  4. (4)

$a_{1}b_{2}^{\prime}(b_{2}^{\prime}-1)\equiv 0\mod p$,

  5. (5)

$b_{1}b_{2}^{\prime}\equiv 0\mod p$,

  6. (6)

$a_{1}b_{1}b_{2}^{\prime}\equiv 0\mod p^{2}$.

In order to compute the total number of matrices satisfying all of the above
conditions, we consider the following cases.

  * •

Case 1 : Assume that $a_{1}=0$. If $b_{1}\equiv 0\mod p^{2}$ then number of
such matrices is $p^{5}$ otherwise $b_{1}\equiv 1\mod p^{2}$, number of such
matrices is $p^{4}$.

  * •

Case 2 : Consider the case when $a_{1}\neq 0$. We get $b_{1}=0$ or $b_{1}=1$.
If $b_{1}=0$, number of such matrices is $2p^{3}(p-1)$. Otherwise $b_{1}=1$
and number of such matrices is $p^{2}(p-1)$ (as $b_{2}=0$ in this case).

Therefore, we find that
$g_{(2,4,1,2)}(p)=p^{5}+p^{4}+2p^{3}(p-1)+p^{2}(p-1)=p^{5}+3p^{4}-p^{3}-p^{2}$.
∎

######  Lemma 4.3.

We have that

$\begin{split}&g_{(2,3,1,3)}(p)=3p^{4}-p^{2},\\\ &g_{(2,1,3,3)}(p)=p^{4},\\\
&g_{(2,2,3,2)}=p^{5}+p^{4}-p^{3}.\end{split}$

###### Proof.

The proof is similar to Lemma 4.2, and we omit it. ∎

######  Lemma 4.4.

We have that $g_{(2,3,2,2)}(p)=p^{5}+4p^{4}-9p^{3}+4p$.

###### Proof.

Let $A$ be the matrix,

$\begin{pmatrix}p^{2}&a_{1}p&a_{2}p&a_{3}p&1\\\ 0&p^{3}&b_{1}p&b_{2}p&1\\\
0&0&p^{2}&c_{1}p&1\\\ 0&0&0&p^{2}&1\\\ 0&0&0&0&1\end{pmatrix}$

where $0\leq a_{i}\leq p-1$, $0\leq b_{j}\leq p^{2}-1$ and $0\leq c_{1}\leq
p-1$. Below are the conditions for $A$ to be a subring matrix.

  * •

It is easy to see that $v_{2}^{2}$ is in $\operatorname{Col}(A)$.

  * •

We find that $v_{3}^{2}$ is contained in $\operatorname{Col}(A)$ if and only
if $v_{3}^{2}-p^{2}v_{3}$ is contained in $\operatorname{Col}(A)$. Hence, we
find that $v_{3}^{2}\in\operatorname{Col}(A)$ if and only if
$b_{1}=b_{1}^{\prime}p$, where $0\leq b_{1}^{\prime}\leq p-1$.

  * •

Similar reasoning shows that $v_{4}^{2}\in\operatorname{Col}(A)$ if and only
if $b_{2}^{2}-(c_{1}^{2}-c_{1})b_{1}^{\prime}\equiv 0\mod p$ and
$\left(\frac{b_{2}^{2}-(c_{1}^{2}-c_{1})b_{1}^{\prime}}{p}-b_{2}\right)a_{1}+c_{1}(c_{1}-1)a_{2}\equiv
0\mod p$.

  * •

We next consider the requirement that $v_{i}v_{j}$ is in
$\operatorname{Col}(A)$ for distinct values of $i$ and $j$. It is easy to see
that $v_{1}v_{2},v_{1}v_{3},v_{1}v_{4},v_{2}v_{3}$ and $v_{2}v_{4}$ are in
$\operatorname{Col}(A)$ and that $v_{3}v_{4}$ is in $\operatorname{Col}(A)$ if
and only if $b_{1}^{\prime}a_{1}(b_{2}-c_{1})\equiv 0\mod p$.

Summarizing the above, the conditions we arrive at are as follows

  1. (1)

$b_{1}=b_{1}^{\prime}p$, where $0\leq b_{1}^{\prime}\leq p-1$,

  2. (2)

$b_{2}^{2}-(c_{1}^{2}-c_{1})b_{1}^{\prime}\equiv 0\mod p$,

  3. (3)

$\left(\dfrac{b_{2}^{2}-(c_{1}^{2}-c_{1})b_{1}^{\prime}}{p}-b_{2}\right)a_{1}+c_{1}(c_{1}-1)a_{2}\equiv
0\mod p$,

  4. (4)

$b_{1}^{\prime}a_{1}(b_{2}-c_{1})\equiv 0\mod p$.

Consider the following cases.

  * •

Case 1 : First consider the case when $a_{1}=0$. We further subdivide our
argument into the following subcases.

    * $\diamond$

Case 1A : Assume that $c_{1}\in\\{0,1\\}$. Then, we find that $b_{2}\equiv
0\mod p$. There are $2p^{4}$ such matrices.

    * $\diamond$

Case 1B : Assume that $c_{1}\notin\\{0,1\\}$. In this case, we get $a_{2}=0$,
and thus, there are $p^{3}(p-2)$ such matrices.

  * •

Case 2 : Next consider the case when $a_{1}\neq 0$. Then
$b_{1}^{\prime}(b_{2}-c_{1})\equiv 0\mod p$. We have the following subcases.

    * $\diamond$

Case 2A : Assume that $b_{1}^{\prime}=0$, then we find that $b_{2}\equiv 0\mod
p$. Now if $c_{1}\in\\{0,1\\}$ then we get $2p^{3}(p-1)$ such matrices. If
$c_{1}\notin\\{0,1\\}$ we get $p^{2}(p-1)(p-2)$ such matrices.

    * $\diamond$

Case 2B : Assume that $b_{1}^{\prime}\neq 0$, then we get $b_{2}\equiv
c_{1}\mod p$. If $c_{1}=0$ we get $p^{3}(p-1)^{2}$ such matrices. If $c_{1}=1$
we get no subring matrices as we get $b_{2}\equiv 1\mod p$ and $b_{2}\equiv
0\mod p$, but no such integer exists. If $c_{1}\notin\\{0,1\\}$, we get
$p^{2}(p-1)(p-2)$ subring matrices.

Adding up the numbers obtained in the above case decomposition, we find that
$g_{(2,3,2,2)}(p)=p^{5}+4p^{4}-9p^{3}+4p$. ∎

######  Lemma 4.5.

We have that

$\begin{split}&g_{(2,4,2,1)}(p)=2p^{5}+8p^{4}-15p^{3}+6p^{2},\\\
&g_{(2,3,3,1)}(p)=12p^{4}-10p^{3}+2p^{2}.\end{split}$

###### Proof.

The proof is similar to that of Lemma 4.4, and is omitted. ∎

###  4.2. Compositions of length $5$

In this subsection we consider the compositions of length $5$ that begin with
$2$. We need to compute $g_{\alpha}(p)$ for $20$ compositions of this form.
They are listed below,

$(2,4,1,1,1)$ | $(2,1,4,1,1)$
---|---
$(2,1,1,4,1)$ | $(2,1,1,1,4)$
$(2,3,2,1,1)$ | $(2,3,1,2,1)$
$(2,3,1,1,2)$ | $(2,2,3,1,1)$
$(2,2,1,3,1)$ | $(2,2,1,1,3)$
$(2,1,3,1,2)$ | $(2,1,3,2,1)$
$(2,1,2,3,1)$ | $(2,1,2,1,3)$
$(2,1,1,3,2)$ | $(2,1,1,2,3)$
$(2,2,2,2,1)$ | $(2,2,2,1,2)$
$(2,2,1,2,2)$ | $(2,1,2,2,2)$
Table 1. Compositions of length $5$ that begin with $2$

In the next two lemmas we obtain values of $g_{\alpha}(p)$ for all the
compositions listed above.

######  Lemma 4.6.

We have following values

$g_{(2,4,1,1,1)}(p)$ | $p^{6}+4p^{4}-4p^{3}$
---|---
$g_{(2,1,4,1,1)}(p)$ | $p^{5}+3p^{4}-3p^{3}$
$g_{(2,1,1,4,1)}(p)$ | $3p^{4}-2p^{3}$
$g_{(2,1,1,1,4)}(p)$ | $p^{4}$
$g_{(2,3,1,1,2)}(p)$ | $3p^{6}+p^{5}+p^{4}-2p^{3}$
$g_{(2,1,3,1,2)}(p)$ | $3p^{5}-p^{3}$
$g_{(2,1,1,3,2)}(p)$ | $p^{5}$
$g_{(2,2,1,1,3)}(p)$ | $p^{6}+3p^{4}-3p^{3}$
$g_{(2,1,2,1,3)}(p)$ | $p^{5}+2p^{4}-2p^{3}$
$g_{(2,1,1,2,3)}(p)$ | $2p^{4}-p^{3}$
$g_{(2,2,1,3,1)}(p)$ | $2p^{6}+4p^{5}+2p^{4}-8p^{3}+2p^{2}$
$g_{(2,1,2,3,1)}(p)$ | $4p^{5}+4p^{4}-4p^{3}$

###### Proof.

The result follows immediately from Lemmas 2.5, 3.2, 3.3 and 3.4. ∎

Next, we obtain values of $g_{\alpha}(p)$ for remaining $8$ compositions.

######  Lemma 4.7.

We have following values,

$g_{(2,3,2,1,1)}(p)$ | $3p^{7}+9p^{6}+7p^{5}-18p^{4}-3p^{2}$
---|---
$g_{(2,2,3,1,1)}(p)$ | $p^{7}+5p^{6}+8p^{5}-11p^{4}$
$g_{(2,1,3,2,1)}(p)$ | $10p^{5}-11p^{4}+4p^{3}$
$g_{(2,3,1,2,1)}(p)$ | $7p^{6}+2p^{5}-2p^{4}-5p^{3}+2p^{2}$
$g_{(2,2,2,2,1)}(p)$ | $9p^{6}+2p^{5}-18p^{4}+12p^{3}-4p^{2}$
$g_{(2,2,2,1,2)}(p)$ | $2p^{6}+9p^{5}-16p^{4}+8p^{3}-2p^{2}$
$g_{(2,2,1,2,2)}(p)$ | $p^{6}+3p^{5}-3p^{4}$
$g_{(2,1,2,2,2)}(p)$ | $2p^{5}-p^{3}$

###### Proof.

We will prove this for the composition $(2,1,2,2,2)$, expression for other
compositions can be obtained in a similar way. Let $A$ be a matrix in Hermite
normal form of following type,

$\begin{pmatrix}p^{2}&a_{1}p&a_{2}p&a_{3}p&a_{4}p&1\\\ &p&0&0&0&1\\\
&&p^{2}&b_{1}p&b_{2}p&1\\\ &&&p&c_{1}p&1\\\ &&&&p^{2}&1\\\ &&&&&1\\\
\end{pmatrix}$

First, we determine the conditions on entries of the matrix which make $A$ a
subring matrix.

  1. (1)

First, we note that $v_{2}^{2}\in\mathrm{Col}(A)$ and
$v_{3}^{2}\in\mathrm{Col}(A)$.

  2. (2)

Next, we know that $v_{4}^{2}\in\mathrm{Col}(A)$ if and only
$v_{4}^{2}-p^{2}v_{4}\in\mathrm{Col}(A)$. Now, this is the case if and only if
$b_{1}a_{2}\equiv 0\mod p$.

  3. (3)

Similarly, $v_{5}^{2}\in\mathrm{Col}(A)$ if and only if
$v_{5}^{2}-p^{2}v_{5}\in\mathrm{Col}(A)$ and this is true if and only if
$b_{1}c_{1}\equiv 0\mod p$ and $b_{2}^{2}a_{2}-c_{1}^{2}a_{3}\equiv 0\mod p$.

  4. (4)

We also note that if above conditions are satisfied then
$v_{2}v_{3},v_{2}v_{4},v_{2}v_{5},v_{3}v_{4},v_{3}v_{5}$ and $v_{4}v_{5}$ are
in $\mathrm{Col}(A)$.

The conditions we get are,

  * •

$b_{1}a_{2}=0$,

  * •

$b_{1}c_{1}=0$,

  * •

$b_{2}^{2}a_{2}-c_{1}^{2}a_{3}\equiv 0\mod p$.

First we assume that $b_{1}=0$. Now further if $c_{1}=0$ then we get
$p^{3}(2p-1)$ matrices. If $c_{1}\neq 0$ then we get $p^{4}(p-1)$ matrices.
Next, we assume that $b_{1}\neq 0$ then $a_{2}=0$ and $c_{1}=0$, therefore we
get $p^{4}(p-1)$ matrices. Therefore, we get that
$g_{(2,1,2,2,2)}(p)=2p^{5}-p^{3}$. ∎

##  5\. Calculating the values of $g_{\alpha}(p)$ for compositions beginning
with $3$

###  5.1. Compositions of length $4$

In this section, we compute $g_{\alpha}(p)$ for $10$ compositions $\alpha$
beginning with $3$ and of length $4$. They are listed as follows

$(3,4,1,1)$ | $(3,3,1,2)$
---|---
$(3,1,4,1)$ | $(3,2,3,1)$
$(3,1,1,4)$ | $(3,1,2,3)$
$(3,2,1,3)$ | $(3,3,2,1)$
$(3,1,3,2)$ |  $(3,2,2,2)$.

We make note of some known computations.

######  Lemma 5.1.

The following values of $g_{\alpha}(p)$ are known

$g_{(3,4,1,1)}(p)$ | $12p^{4}-9p^{3}+p^{2}$
---|---
$g_{(3,1,4,1)}(p)$ | $2p^{4}+6p^{3}-2p^{2}$
$g_{(3,1,1,4)}(p)$ |  $3p^{3}$.

###### Proof.

The above result follows from [Ish22a, Lemma 4.6]. ∎

######  Lemma 5.2.

We have that $g_{(3,2,1,3)}(p)=5p^{4}-4p^{3}+2p^{2}.$

###### Proof.

Let $A$ be any integer matrix in Hermite normal form of the type

$\begin{pmatrix}p^{3}&a_{1}p&a_{2}p&a_{3}p&1\\\ &p^{2}&b_{1}p&b_{2}p&1\\\
&&p&0&1\\\ &&&p^{3}&1\\\ &&&&1.\\\ \end{pmatrix}$

We determine the conditions so that $A$ is a subring matrix.

  1. (1)

It is required that $v_{2}^{2}\in\mathrm{Col}(A)$ and this is the case if and
only if

$(a_{1}^{2}p^{2},p^{4},0,0,0)^{t}-p^{2}(a_{1}p,p^{2},0,0,0)^{t}$

is in $\mathrm{Col}(A)$. We deduce that $a_{1}\equiv 0\mod p$, hence
$a_{1}=a_{1}^{\prime}p$ where $0\leq a_{1}^{\prime}\leq p-1$.

  2. (2)

It is required that $v_{3}^{2}\in\mathrm{Col}(A)$; clearly this is equivalent
to the statement that $v_{3}^{2}-pv_{3}\in\mathrm{Col}(A)$. Now, it is easy to
see that latter condition is true if and only if

(5.1) $(a_{2}^{2}-a_{2})-a_{1}^{\prime}(b_{1}^{2}-b_{1})\equiv 0\mod p.$

  3. (3)

Similarly, it is clear that $v_{4}^{2}\in\mathrm{Col}(A)$ if and only if
$v_{4}^{2}-p^{3}v_{4}\in\mathrm{Col}(A)$ and latter condition is equivalent to

(5.2) $a_{3}^{2}-b_{2}^{2}a_{1}^{\prime}\equiv 0\mod p.$

  4. (4)

One can easily check that $v_{2}v_{3}$ and $v_{2}v_{4}$ are both in
$\mathrm{Col}(A)$ and $v_{3}v_{4}\in\mathrm{Col}(A)$ if and only

(5.3) $a_{2}a_{3}-a_{1}^{\prime}b_{1}b_{2}\equiv 0\mod p.$

Thus, to summarize, we arrive at the following conditions

  1. (1)

$a_{1}=a_{1}^{\prime}p$ where $0\leq a_{1}^{\prime}\leq p-1$,

  2. (2)

$(a_{2}^{2}-a_{2})-a_{1}^{\prime}(b_{1}^{2}-b_{1})\equiv 0\mod p$,

  3. (3)

$a_{3}^{2}-b_{2}^{2}a_{1}^{\prime}\equiv 0\mod p$,

  4. (4)

$a_{2}a_{3}-a_{1}^{\prime}b_{1}b_{2}\equiv 0\mod p.$

We count matrices $A$ satisfying these conditions by dividing into cases.

Case 1 : First consider the case when $a_{3}\equiv\mod p$. From equation (5.2)
we deduce that $a_{1}^{\prime}b_{2}\equiv 0\mod p$. We consider two subcases
below.

  * •

Case 1A : We consider the case when $b_{2}=0$. If $b_{1}\in\\{0,1\\}$, then,
there are $4p^{3}$ matrices. If $b_{1}\notin\\{0,1\\}$, then, there are
$p^{3}(p-2)$ matrices. Thus, there are $p^{3}(p+2)$ in this case in total.

  * •

Case 1B : Next consider the case when $b_{2}\neq 0$. From equation (5.2) we
find that $a_{1}^{\prime}=0$. From (5.1), we deduce $a_{2}^{2}-a_{2}\equiv
0\mod p$. Hence, there are $2p^{3}(p-1)$ matrices in this case.

Case 2 : In this case we count matrices such that $a_{3}\not\equiv 0\mod p$.
From (5.2), we deduce that $b_{2}\neq 0$. Consider following subcases.

  * •

Case 2A : Suppose $b_{1}=0$, then from equation (5.3) we get that $a_{2}\equiv
0\mod p$. Hence, there are $p^{2}(p-1)^{2}$ matrices in this case.

  * •

Case 2B : Assume that $b_{1}=1$, then from equation (5.1) we find that
$a_{2}(a_{2}-1)\equiv 0\mod p$. However, from (5.2) we cannot have
$a_{2}\equiv 0\mod p$, therefore $a_{2}\equiv 1\mod p$. Hence, we find that
$a_{3}\equiv b_{2}\mod p$. As a result, there are $p^{2}(p-1)$ matrices in
this case.

  * •

Case 2C : In the last case we consider the case when $b_{1}\notin\\{0,1\\}$
then from equations (5.1), (5.2), (5.3) we get that $a_{2}\not\equiv 0\mod p$.
Now, we get that from the three equations (5.1), (5.2), (5.3) that,

$a_{1}^{\prime}\equiv\frac{a_{2}(a_{2}-1)}{b_{1}(b_{1}-1)}\mod p,$
$a_{1}^{\prime}\equiv\frac{a_{3}^{2}}{b_{2}^{2}}\mod p,$
$a_{1}^{\prime}\equiv\frac{a_{2}a_{3}}{b_{1}b_{2}}\mod p.$

From these we find that $a_{2}\equiv b_{1}\mod p$ and $a_{3}\equiv b_{2}\mod
p$. Hence, there are $(p-2)(p-1)p^{2}$ matrices in this case.

Adding up the values in each case, we prove the assertion of the lemma. ∎

######  Lemma 5.3.

We have that $g_{\alpha}(p)=2p^{4}$ where $\alpha=(3,1,3,2).$

###### Proof.

Let $A$ be any integer matrix in Hermite normal form of the type

$\begin{pmatrix}p^{3}&a_{1}p&a_{2}p&a_{3}p&1\\\ &p&0&0&1\\\
&&p^{3}&c_{1}p&1\\\ &&&p^{2}&1\\\ &&&&1\\\ \end{pmatrix}$

We derive the conditions so that $A$ is a subring matrix and use them to
evaluate $g_{(3,1,3,2)}(p)$.

  1. (1)

It is clear that $v_{2}^{2}\in\mathrm{Col}(A)$ if and only if
$v_{2}^{2}-pv_{2}\in\mathrm{Col}(A)$, the second condition translates to

(5.4) $a_{1}^{2}-a_{1}\equiv 0\mod p.$

  2. (2)

Similarly, $v_{3}^{2}\in\mathrm{Col}(A)$ if and only if
$v_{3}^{2}-p^{3}v_{3}\in\mathrm{Col}(A)$, and therefore, $a_{2}\equiv 0\mod
p$. In other words, $a_{2}=a_{2}^{\prime}p$, where $0\leq a_{2}^{\prime}\leq
p-1$.

  3. (3)

Arguing as in previous two cases, we see that $v_{4}^{2}\in\mathrm{Col}(A)$ if
and only if $c_{1}=c_{1}^{\prime}p$, where $0\leq c_{1}^{\prime}\leq p-1$ and
$a_{3}=a_{3}^{\prime}p$ with $0\leq a_{3}^{\prime}\leq p-1$.

  4. (4)

It is easy to see that if the above conditions are satisfied, then
$v_{2}v_{3},v_{2}v_{4}$ and $v_{3}v_{4}$ are in $\mathrm{Col}(A)$.

To summarize, the conditions are as follows

  1. (1)

$a_{1}^{2}-a_{1}\equiv 0\mod p$,

  2. (2)

$a_{2}=a_{2}^{\prime}p$ where $0\leq a_{2}^{\prime}\leq p-1$,

  3. (3)

$c_{1}=c_{1}^{\prime}p$ where $0\leq c_{1}^{\prime}\leq p-1$,

  4. (4)

$a_{3}=a_{3}^{\prime}p$ with $0\leq a_{3}^{\prime}\leq p-1$.

From the above, it is clear that $g_{(3,1,3,2)}(p)=2p^{4}$. ∎

######  Lemma 5.4.

We have that

(5.5) $g_{(3,3,1,2)}(p)=8p^{4}-6p^{3}+2p^{2}.$

###### Proof.

Let $A$ be an integer matrix in Hermite normal form

$\begin{pmatrix}p^{3}&a_{1}p&a_{2}p&a_{3}p&1\\\ &p^{3}&b_{1}p&b_{2}p&1\\\
&&p&0&1\\\ &&&p^{2}&1\\\ &&&&1.\\\ \end{pmatrix}$

We determine the conditions so that $A$ is a subring matrix.

  1. (1)

Arguing as in Lemma 5.3, we find that the condition
$v_{2}^{2}\in\mathrm{Col}(A)$ translates to the condition that
$a_{1}=a_{1}^{\prime}p$, with $0\leq a_{1}^{\prime}\leq p-1$.

  2. (2)

Next, we see that $v_{3}^{2}\in\mathrm{Col}(A)$ if and only if
$v_{3}^{2}-pv_{3}\in\mathrm{Col}(A)$. Therefore we deduce that
$b_{1}^{2}-b_{1}\equiv 0\mod p$ and

(5.6) $(a_{2}^{2}-a_{2})p-a_{1}^{\prime}(b_{1}^{2}-b_{1})\equiv 0\mod p.$

  3. (3)

It is again clear that $v_{4}^{2}\in\mathrm{Col}(A)$ if and only if
$v_{4}^{2}-p^{2}v_{4}\in\mathrm{Col}(A)$. We deduce that this is true if and
only if $b_{2}=b_{2}^{\prime}p$, where $0\leq b_{2}^{\prime}\leq p-1$, and
$a_{3}=a_{3}^{\prime}p$, where $0\leq a_{3}^{\prime}\leq p-1$.

  4. (4)

It is clear that $v_{2}v_{3}$ and $v_{2}v_{4}$ are in $\mathrm{Col}(A)$
whenever above conditions are satisfied. By similar arguments as above we see
that $v_{3}v_{4}\in\mathrm{Col}(A)$ if and only if
$a_{1}^{\prime}b_{1}b_{2}^{\prime}\equiv 0\mod p$.

We have the following conditions on $A$.

  1. (1)

$a_{1}=a_{1}^{\prime}p$ with $0\leq a_{1}^{\prime}\leq p-1$,

  2. (2)

$b_{1}^{2}-b_{1}\equiv 0\mod p$ and
$(a_{2}^{2}-a_{2})p-a_{1}^{\prime}(b_{1}^{2}-b_{1})\equiv 0\mod p$,

  3. (3)

$b_{2}=b_{2}^{\prime}p$ where $0\leq b_{2}^{\prime}\leq p-1$,

  4. (4)

$a_{3}=a_{3}^{\prime}p$ where $0\leq a_{3}^{\prime}\leq p-1$,

  5. (5)

$a_{1}^{\prime}b_{1}b_{2}^{\prime}\equiv 0\mod p$.

We consider three cases depending upon whether $b_{1}$ is $0$, $1$ or not in
$\\{0,1\\}$, and count number of matrices in each case.

Case 1 : First consider the case when $b_{1}=0$. Clearly there are $2p^{4}$
matrices in this case.

Case 2 : Consider the case in which $b_{1}=1$. It is easy to see that there
are $2p^{2}(2p-1)$ matrices in this case.

Case 3 : Assume that $b_{1}\notin\\{0,1\\}$. Then if $b_{2}^{\prime}=0$ we get
$2p^{3}(p-1)$ matrices. On the other hand, if $b_{2}\neq 0$ then
$a_{1}^{\prime}=0$ follows from $a_{1}^{\prime}b_{2}^{\prime}\equiv 0\mod p$.
Therefore, we find that $a_{2}^{2}-a_{2}\equiv 0\mod p$, and there are
$4p^{2}(p-1)^{2}$ matrices. Adding up the number of matrices from each case we
arrive at the assertion. ∎

######  Lemma 5.5.

The following equality holds

(5.7) $g_{(3,2,3,1)}(p)=12p^{4}-2p^{3}+4p^{2}.$

###### Proof.

Let $A$ be any integer matrix in Hermite normal form of the type

$\begin{pmatrix}p^{3}&a_{1}p&a_{2}p&a_{3}p&1\\\ &p^{2}&b_{1}p&b_{2}p&1\\\
&&p^{3}&c_{1}p&1\\\ &&&p&1\\\ &&&&1.\\\ \end{pmatrix}$

We determine the conditions so that $A$ is a subring matrix.

  1. (1)

It is easy to see that $v_{2}^{2}\in\mathrm{Col}(A)$ if and only if
$a_{1}=a_{1}^{\prime}p$ where $0\leq a_{1}^{\prime}\leq p-1$.

  2. (2)

We note that $v_{3}^{2}$ is in $\mathrm{Col}(A)$ if and only if
$v_{3}^{3}-p^{3}v_{3}\in\mathrm{Col}(A)$. Therefore, we require that

$(a_{2}^{2}p^{2},b_{1}^{2}p^{2},p^{6},0,0)^{t}-p^{3}(a_{2}p,b_{1}p,p^{3},0,0)^{t}$

is in $\mathrm{Col}(A)$. Clearly, this is equivalent to the congruence

(5.8) $a_{2}^{2}-a_{1}^{\prime}b_{1}^{2}\equiv 0\mod p.$

  3. (3)

It is required that $v_{4}^{2}\in\mathrm{Col}(A)$. It is easy to see that this
condition is equivalent to the condition that
$v_{4}^{2}-pv_{4}\in\mathrm{Col}(A)$. The last entry in the column
$v_{4}^{2}-pv_{4}$ is $(c_{1}^{2}-c_{1})p^{2}$ therefore, first condition is
$c_{1}^{2}-c_{1}\equiv 0\mod p$. As in previous lemmas we obtain following
second condition, $b_{1}(c_{1}^{2}-c_{1})\equiv 0\mod p^{2}$ and from this we
deduce that $b_{1}(c_{1}^{2}-c_{1})=0$ and the third condition is,

(5.9)
$(a_{3}^{2}-a_{3})p^{2}-a_{2}(c_{1}^{2}-c_{1})-a_{1}^{\prime}(b_{2}^{2}-b_{2})p^{2}\equiv
0\mod p^{3}.$

  4. (4)

If entries of matrix $A$ satisfy above conditions then it is easy to see that
$v_{2}v_{3}$, $v_{2}v_{4}$ are in $\mathrm{Col}(A)$ and
$v_{3}v_{4}\in\mathrm{Col}(A)$ if and only if the following congruence holds

(5.10) $a_{2}(a_{3}-c_{1})-a_{1}^{\prime}b_{1}(b_{2}-c_{1})\equiv 0\mod p.$

Thus, the conditions so that $A$ is a subring matrix are as follows

  1. (1)

$a_{1}=a_{1}^{\prime}p$ with $0\leq a_{1}^{\prime}\leq p-1$,

  2. (2)

$c_{1}^{2}-c_{1}\equiv 0\mod p$ and $b_{1}(c_{1}^{2}-c-1)=0$,

  3. (3)

$(a_{3}^{2}-a_{3})p^{2}-a_{2}(c_{1}^{2}-c_{1})-a_{1}^{\prime}(b_{2}^{2}-b_{2})p^{2}\equiv
0\mod p^{3}$,

  4. (4)

$a_{2}(a_{3}-c_{1})-a_{1}^{\prime}b_{1}(b_{2}-c_{1})\equiv 0\mod p$.

There are three cases to consider, depending upon the value of $c_{1}$.

Case 1 : First suppose that $c_{1}=0$. Then by symmetry, the set of matrices
is in bijection with the set of irreducible subring matrices with diagonal
$(3,2,1,3)$. Therefore, we deduce that $g_{(3,2,1,3)}(p)=5p^{4}-4p^{3}+2p^{2}$
(from the argument in Lemma 5.2).

Case 2 : Next, consider the case when $c_{1}=1$. The equation (5.9) reduces to
the following

(5.11) $(a_{3}^{2}-a_{3})-a_{1}^{\prime}(b_{2}^{2}-b_{2})\equiv 0\mod p.$

First we suppose that $b_{1}=0$. Then we find that $a_{2}\equiv 0\mod p$.
Again considering two cases when $b_{2}\in\\{0,1\\}$ or $\notin\\{0,1\\}$ it
is clear that there are $p^{3}(p+2)$ matrices in this case with $b_{1}=0$. If,
$b_{1}\neq 0$, then we further divide into cases such that $b_{2}=0$, $1$ or
not in $\\{0,1\\}$. It is easy to see that $2p^{2}(p-1)(2p-1)$ in this case
with $b_{1}\neq 0$.

Case 3 : Finally, we consider the case when $c_{1}\notin\\{0,1\\}$. From
conditions above we find that $b_{1}=0$; from equation 5.9 we deduce that
$a_{2}=0$ and equation 5.9 gets reduced to the equation 5.11. We consider sub-
cases depending upon whether $b_{2}\in\\{0,1\\}$ or not. There are $8p^{3}$
matrices in the case when $b_{2}\in\\{0,1\\}$. On the other hand, there are
$2p^{3}(p-2)$ matrices for which $b_{2}\notin\\{0,1\\}$.

Adding up the number of matrices in each case we prove the result. ∎

######  Lemma 5.6.

The following equality holds

$\begin{split}&g_{(3,1,2,3)}(p)=p^{4}+2p^{3}-p^{2},\\\
&g_{(3,3,2,1)}(p)=p^{6}+2p^{5}-13p^{4}+9p^{3},\\\
&g_{(3,2,2,2)}(p)=p^{6}-2p^{5}+6p^{4}-4p^{3}+3p^{2}-5p+2.\end{split}$

###### Proof.

The proof is very similar to previous results, and we omit it. ∎

###  5.2. Compositions of length $5$

We consider the composition of length $5$ that begin with $3$ we need to
evaluate $g_{\alpha}(p)$ for $10$ compositions of this form. We list all
compositions of this form in the table below

$(3,3,1,1,1)$ | $(3,2,1,1,2)$
---|---
$(3,1,3,1,1)$ | $(3,1,2,1,2)$
$(3,1,1,3,1)$ | $(3,1,2,2,1)$
$(3,1,1,1,3)$ | $(3,1,1,2,2)$
$(3,2,1,2,1)$ |  $(3,2,2,1,1)$.
Table 2. Compositions of length $5$ that begin with $3$.

For some of these compositions, we can use results from [Ish22a] to deduce
value of $g_{\alpha}(p)$. The next result follows from the results in _loc.
cit._

######  Lemma 5.7.

We have following values

$g_{(3,3,1,1,1)}(p)$ | $16p^{6}+12p^{5}-20p^{4}+8p^{3}$
---|---
$g_{(3,1,3,1,1)}(p)$ | $18p^{5}-6p^{4}$
$g_{(3,1,1,3,1)}(p)$ | $2p^{5}+10p^{4}-4p^{3}$
$g_{(3,1,1,1,3)}(p)$ |  $4p^{4}$.

###### Proof.

The above results are direct consequence of [Ish22a, Lemma 4.6]. ∎

Next we evaluate the value of $g_{\alpha}(p)$ for the remaining compositions.

######  Lemma 5.8.

The following table of relations holds

$g_{(3,1,2,2,1)}(p)$ | $13p^{5}-8p^{4}+8p^{3}-2p^{2}$
---|---
$g_{(3,1,2,1,2)}(p)$ | $5p^{5}-4p^{4}+2p^{3}$
$g_{(3,1,1,2,2)}(p)$ | $p^{5}+3p^{4}-2p^{3}$
$g_{(3,2,1,1,2)}(p)$ | $4p^{6}-8p^{5}+35p^{4}-31p^{3}+4p^{2}$
$g_{(3,2,1,2,1)}(p)$ |  $9p^{6}-4p^{5}+28p^{4}-39p^{3}+20p^{2}-10p$.

###### Proof.

We will prove this result only for the composition $(3,1,1,2,2)$, and the
proof is similar for the other compositions listed above. Therefore, we will
count the number of integer subring matrices $A$ in Hermite normal form of the
type

$\begin{pmatrix}p^{3}&a_{1}p&a_{2}p&a_{3}p&a_{4}p&1\\\ &p&0&0&0&1\\\
&&p&0&0&1\\\ &&&p^{2}&b_{1}p&1\\\ &&&&p^{2}&1\\\ &&&&&1.\\\ \end{pmatrix}$

We determine the conditions on entries of the matrix which make $A$ a subring
matrix.

  1. (1)

We note that $v_{2}^{2}$ and $v_{3}^{2}\in\mathrm{Col}(A)$ if and only if
$a_{1}^{2}-a_{1}\equiv 0\mod p$ and $a_{2}^{2}-a_{2}\equiv\mod p$.

  2. (2)

We also want $v_{4}^{2}$ to be in $\mathrm{Col}(A)$ and this is true if and
only

$(a_{3}^{2}p^{2},0,0,p^{4},0,0)^{t}-p^{2}(a_{3}p,0,0,p^{2},0,0)^{t}$

is in $\mathrm{Col}(A)$. Therefore, $v_{4}^{2}\in\operatorname{Col}A$ if and
only if $a_{3}=a_{3}^{\prime}p$ with $0\leq a_{3}^{\prime}\leq p-1$.

  3. (3)

Similarly, $v_{5}^{2}\in\mathrm{Col}(A)$ if and only if
$v_{5}^{2}-p^{2}v_{5}\in\mathrm{Col}(A)$. This condition is equivalent to

(5.12) $(a_{4}^{2}-a_{4})-a_{3}^{\prime}b_{1}^{2}\equiv 0\mod p.$

  4. (4)

Similar arguments show that $v_{2}v_{4},v_{3}v_{4},v_{4}v_{5}$ are in
$\mathrm{Col}(A)$ if above conditions are satisfied. Furthermore,
$v_{2}v_{3},v_{2}v_{5},v_{3}v_{5}\in\mathrm{Col}(A)$ if and only if
$a_{1}a_{2},a_{1}a_{4},a_{2}a_{4}$ are all divisible by $p$.

We count the number of matrices satisfying the above conditions. It benefits
us to consider two cases.

Case 1: First, we consider the case when $b_{1}=0$. Note that in this case, at
most one of $a_{1},a_{2},a_{4}$ is $1$ $\mod p$, and the others need to be $0$
$\mod p$. Hence, our count leads to $4p^{4}$ matrices for which $b_{1}=0$.

Case 2: Next, we consider the case when $b_{1}\neq 0$. Note that in this case
there are $p^{4}(p-1)$ matrices for which $a_{1},a_{2}$ are both divisible by
$p$. On the other hand, either $a_{1}$ or $a_{2}$ is not divisible by $p$,
then, $a_{4}$ is divisible by $p$. The equation 5.12 implies that
$a_{3}^{\prime}=0$. Thus, there are $2p^{3}(p-1)$ matrices for which either
$a_{1}$ or $a_{2}$ is divisible by $p$. Thus, the total number of matrices for
this case is $p^{3}(p+2)(p-1)$.

Putting together the number of matrices from both cases we deduce that
$g_{(3,1,1,2,2)}(p)$ $=p^{5}+3p^{4}-2p^{3}$. ∎

There is one composition $\alpha$ for which we are not able to compute
$g_{\alpha}(p)$ using the above arguments. This is the composition
$\alpha=(3,2,2,1,1)$. Let us consider this case in some further detail. Let
$A$ be an integer subring matrix of the form

$A=\begin{pmatrix}p^{3}&a_{1}p&a_{2}p&a_{3}p&a_{4}p&1\\\
&p^{2}&b_{1}p&b_{2}p&b_{3}p&1\\\ &&p^{2}&c_{1}p&c_{2}p&1\\\ &&&p&0&1\\\
&&&&p&1\\\ &&&&&1.\\\ \end{pmatrix}$

Since the above matrix is in Hermite normal form, $1\leq a_{i}\leq p^{2}-1$,
and $1\leq b_{i},c_{j}\leq p-1$. Below, we list the conditions for $A$ to be a
subring matrix

  * •

$a_{2}^{2}-a_{1}^{\prime}b_{1}^{2}\equiv 0\mod p$,

  * •

$b_{1}c_{1}(c_{1}-1)=0$, $b_{1}c_{2}(c_{2}-1)=0$, $b_{1}c_{1}c_{2}=0$,

  * •

$(a_{3}^{2}-a_{3})-a_{2}(c_{1}^{2}-c_{1})/p-a_{1}^{\prime}(b_{2}^{2}-b_{2})\equiv
0\mod p$,

  * •

$(a_{4}^{2}-a_{4})-a_{2}(c_{2}^{2}-c_{2})/p-a_{1}^{\prime}(b_{3}^{2}-b_{3})\equiv
0\mod p$,

  * •

$a_{2}(a_{3}-c_{1})-a_{1}^{\prime}b_{1}(b_{2}-c_{1})\equiv 0\mod p$,

  * •

and $a_{2}(a_{4}-c_{2})-a_{1}^{\prime}b_{1}(b_{3}-c_{2})\equiv 0\mod p$,

  * •

$a_{3}a_{4}-a_{2}c_{1}c_{2}/p-a_{1}^{\prime}b_{2}b_{3}\equiv 0\mod p$.

In the subcase when $b_{1}=0$ counting solutions to the equations is reduced
to counting number of solutions in $\mathbb{F}_{p}^{8}$ to following system of
polynomial equations:

$(x_{3}^{2}-x_{3})-x_{2}(x_{7}^{2}-x_{7})-x_{1}(x_{5}^{2}-x_{5})=0$
$(x_{4}^{2}-x_{4})-x_{2}(x_{8}^{2}-x_{8})-x_{1}(x_{6}^{2}-x_{6})=0$
$x_{3}x_{4}-x_{2}x_{7}x_{8}-x_{1}x_{5}x_{6}=0$

Let $N_{p}$ denote the number of solutions to this system in
$\mathbb{F}^{8}_{p}$. Using SageMath we calculated $N_{p}$ for
$p=2,3,5,7,11,13,17,19$ and these computations suggest that
$N_{p}=p^{5}+12p^{4}-20p^{3}+30p^{2}-10p$. Using this and arguments similar to
those used in proving previous results we deduce that
$g_{(3,2,2,1,1)}(p)=p^{7}+24p^{6}-29p^{5}+21p^{4}-4p^{3}$. In summary, our
computations lead us to make the following conjecture.

######  Conjecture 5.9.

We have that $g_{(3,2,2,1,1)}(p)=p^{7}+24p^{6}-29p^{5}+21p^{4}-4p^{3}$.

##  6\. Calculating the values of $g_{\alpha}(p)$ for compositions beginning
with $4,5$ or $6$

###  6.1. Values of $g_{\alpha}(p)$ for compositions beginning with $4$

####  6.1.1. Compositions of length $4$

We will evaluate $g_{\alpha}(p)$ for $6$ compositions of length $4$ that begin
with $4$. They are listed below

$(4,2,2,1)$ | $(4,2,1,2)$
---|---
$(4,1,2,2)$ | $(4,3,1,1)$
$(4,1,3,1)$ |  $(4,1,1,3)$.
Table 3. Compositions of length $4$ that begin with $4$.

######  Lemma 6.1.

We have following values,

$g_{(4,2,2,1)}(p)$ | $6p^{6}+12p^{5}-10p^{4}-7p^{3}+4p^{2}$
---|---
$g_{(4,2,1,2)}(p)$ | $p^{5}+9p^{4}-5p^{3}-4p^{2}$
$g_{(4,1,2,2)}(p)$ | $p^{5}+2p^{4}-p^{2}$
$g_{(4,3,1,1)}(p)$ | $2p^{6}-2p^{5}+17p^{4}-6p^{3}-2p^{2}$
$g_{(4,1,3,1)}(p)$ | $2p^{4}+6p^{3}$
$g_{(4,1,1,3)}(p)$ |  $p^{4}+2p^{3}$.

###### Proof.

The proof is omitted. ∎

####  6.1.2. Compositions of length $5$

We will evaluate $g_{\alpha}(p)$ for $4$ compositions of length $5$ that begin
with $4$. We list them below

$(4,2,1,1,1)$ | $(4,1,2,1,1)$
---|---
$(4,1,1,2,1)$ |  $(4,1,1,1,2)$.
Table 4. Compositions of length $5$ that begin with $4$.

######  Lemma 6.2.

We have following values,

$g_{(4,2,1,1,1)}(p)$ | $5p^{6}+16p^{5}-17p^{4}-27p^{3}+12p^{2}$
---|---
$g_{(4,1,2,1,1)}(p)$ | $p^{6}+13p^{5}-8p^{4}+3p^{3}+2p^{2}$
$g_{(4,1,1,2,1)}(p)$ | $p^{6}+8p^{4}-4p^{3}$
$g_{(4,1,1,1,2)}(p)$ |  $p^{5}+3p^{4}$.

###### Proof.

We will explicitly obtain the expression for $g_{(4,1,1,1,2)}(p)$. The other
computations are similar, and thus omitted. Let $A$ be a matrix in Hermite
normal form of following type

$\begin{pmatrix}p^{4}&a_{1}p&a_{2}p&a_{3}p&a_{4}p&1\\\ &p&0&0&0&1\\\
&&p&0&0&1\\\ &&&p&0&1\\\ &&&&p^{2}&1\\\ &&&&&1.\\\ \end{pmatrix}$

First, we determine the conditions on entries of the matrix which make $A$ a
subring matrix. Note that for $i=2,3,4$, $v_{i}^{2}\in\mathrm{Col}(A)$ if and
only if $a_{i-1}(a_{i-1}-1)\equiv 0\mod p^{2}$ and
$v_{5}^{2}\in\mathrm{Col}(A)$ if and only $a_{4}\equiv 0\mod p$. We also note
that for $1<i<j$, $v_{i}v_{j}\in\mathrm{Col}(A)$ if and only if
$a_{i-1}a_{j-1}\equiv 0\mod p^{2}$. First we suppose that for $i=2,3,4$, we
have that $a_{i-1}\equiv 0\mod p^{2}$. There are $p^{5}$ matrices of this
form. Next, suppose for exactly one of $a_{1},a_{2},a_{3}$ is congruent to $1$
modulo $p^{2}$ and others are divisible by $p^{2}$ then we get $3p^{4}$
matrices of this form. Therefore, $g_{(4,1,1,1,2)}(p)$ = $p^{5}+3p^{4}$. ∎

###  6.2. Values of $g_{\alpha}(p)$ for compositions beginning with $5$

####  6.2.1. Compositions of length $4$

We calculate $g_{\alpha}(p)$ for $3$ compositions of length $4$ that begin
with $5$. The compositions are listed below

$(5,2,1,1)$
---
$(5,1,2,1)$
$(5,1,1,2)$.
Table 5. Compositions of length $4$ that begin with $5$.

######  Lemma 6.3.

The following table of relations hold

$g_{(5,2,1,1)}(p)$ | $p^{6}-3p^{5}+17p^{4}-8p^{3}-5p^{2}+2p$
---|---
$g_{(5,1,2,1)}(p)$ | $7p^{4}-p^{3}-2p^{2}$
$g_{(5,1,1,2)}(p)$ |  $p^{4}+2p^{3}$.

###### Proof.

We will prove the result only for the composition $(5,1,2,1)$. The other cases
are omitted since the arguments are similar to this case. Let $A$ be a matrix
in Hermite normal form of the following type

$\begin{pmatrix}p^{5}&a_{1}p&a_{2}p&a_{3}p&1\\\ &p&0&0&1\\\
&&p^{2}&b_{1}p&1\\\ &&&p&1\\\ &&&&1.\\\ \end{pmatrix}$

We obtain the conditions on the entries of $A$ below.

  1. (1)

First, we must have that $v_{2}^{2}\in\mathrm{Col}(A)$ and this is true if and
only if $v_{2}^{2}-pv_{2}\in\mathrm{Col}(A)$. The latter condition is
equivalent to the condition $a_{1}(a_{1}-1)\equiv 0\mod p$.

  2. (2)

We also want that $v_{3}^{2}\in\mathrm{Col}(A)$ and we see that this is
equivalent to the condition $v_{3}^{2}-p^{2}v_{3}\in\mathrm{Col}(A)$, which is
true if and only if $a_{2}(a_{2}-p)\equiv\mod p$. Therefore we get that
$a_{2}=a_{2}^{\prime}p$ with $0\leq a_{2}^{\prime}\leq p^{3}-1$ and
$a_{2}^{\prime}(a_{2}^{\prime}-1)\equiv 0\mod p$.

  3. (3)

Using similar arguments we obtain that $v_{4}^{2}\in\mathrm{Col}(A)$ if and
only if $a_{3}(a_{3}-1)-b_{1}(b_{1}-1)a_{2}^{\prime}\equiv 0\mod p^{3}$. We
also deduce that $v_{2}v_{3},v_{2}v_{4}$ and $v_{3}v_{4}$ are in
$\mathrm{Col}(A)$ if and only if $a_{1}a_{2}\equiv 0\mod p$, $a_{1}a_{3}\equiv
0\mod p$ and $a_{2}(a_{3}-b_{1})\equiv 0\mod p$.

The conditions we get are as follows

  * •

$a_{1}(a_{1}-1)\equiv 0\mod p$,

  * •

$a_{2}=a_{2}^{\prime}p$ with $0\leq a_{2}^{\prime}\leq p^{3}-1$ and
$a_{2}^{\prime}(a_{2}^{\prime}-1)\equiv 0\mod p$,

  * •

$a_{3}(a_{3}-1)-b_{1}(b_{1}-1)a_{2}^{\prime}\equiv 0\mod p^{3}$,

  * •

$a_{1}a_{2}\equiv 0\mod p$, $a_{1}a_{3}\equiv 0\mod p$ and
$a_{2}(a_{3}-b_{1})\equiv 0\mod p$.

Next, we count the number of matrices by dividing in two cases depending upon
if $a_{1}\equiv 0\mod p^{3}$ or $a_{1}\equiv 0\mod p^{3}$.

Case 1 : First consider the case when $a_{1}\equiv 1\mod p^{3}$, as we must
have $a_{1}a_{2}\mod p^{3}$ we deduce that
$a_{2}=a_{2}^{\prime\prime\prime}p^{3}$ and $a_{3}\equiv 0\mod p$. Therefore,
conditions reduce to $b_{1}(b_{1}-1)a_{2}^{\prime\prime\prime}\equiv 0\mod p$.
Counting we see that there are $3p^{3}-2p^{2}$ matrices in this case.

Case 2 : Now, we consider that case when $a_{1}\equiv 0\mod p^{3}$. We further
consider two separate cases depending upon whether $a_{2}^{\prime}$ is
divisible by $p$ or not.

  * •

Case 2A : Consider the case when $a_{2}^{\prime}$ is divisible by $p$. we have
two possibilities, either $p^{3}\nmid a_{2}$ or $p^{3}\mid a_{2}$, if
$p^{3}\nmid a_{2}$ then we deduce that $a_{3}\equiv b_{1}\mod p$, therefore
$b_{1}=0$ or $1$. We get $2p^{3}(p-1)$ matrices. if $p^{3}\mid a_{2}$, again
considering two cases depending upon whether $b_{1}\in\\{0,1\\}$ or not and
counting we see that we get $2p^{4}$ matrices.

  * •

Case 2B : We consider the case when $a_{2}^{\prime}\equiv 1\mod p$, we deduce
that $a_{3}\equiv b_{1}\mod p^{3}$. Conditions reduce to
$b_{1}(b_{1}-1)(1-a_{2}^{\prime})\equiv 0\mod p^{3}$. Now, suppose
$b_{1}\in\\{0,1\\}$, then we get $2p^{4}$ matrices. Otherwise,
$a_{2}^{\prime}=1$ and we get $p^{2}(p-2)$ matrices.

It follows from the above observations that the number of matrices in each
case we deduce that $g_{(5,1,2,1)}(p)=7p^{4}-p^{3}-2p^{2}$. ∎

####  6.2.2. Compositions of length $5$

In this section we evaluate $g_{\alpha}(p)$ for the composition
$\alpha=(5,1,1,1,1)$. This is the only composition of length $5$ which starts
with $5$. We have the following result.

######  Lemma 6.4.

We have that $g_{\alpha}(p)=5p^{4}$, where $\alpha=(5,1,1,1,1)$.

###### Proof.

The result follows directly from [AKKM21, Lemma 3.5]. ∎

###  6.3. Values of $g_{\alpha}(p)$ for compositions beginning with $6$

We evaluate $g_{\alpha}(p)$ for the only composition $\alpha=(6,1,1,1)$ of
length $4$ which begins with $6$.

######  Lemma 6.5.

We have that $g_{(6,1,1,1)}(p)=4p^{3}$.

###### Proof.

The above result is an immediate consequence [AKKM21, Lemma 3.5]. ∎

##  7\. Main results

###  7.1. Proof of the main result

In this section we prove Theorem 1.4. We note that for $n>1$ and $e\geq n-1$
the following relation holds

(7.1)
$g_{n}(p^{e})=g_{n-1}(p^{e-1})+\sum_{\alpha\in\mathcal{C}^{\prime}_{n,e}}g_{\alpha}(p),$

where $\mathcal{C}^{\prime}_{n,e}$ denotes the set of compositions in
$\mathcal{C}_{n,e}$ whose first coordinate is greater than $1$.

######  Proposition 7.1.

We have that,

$g_{5}(p^{9})=11p^{6}+14p^{5}+137p^{4}-16p^{3}+p^{2}+2p+3,$

and

$g_{6}(p^{9})=4p^{7}+76p^{6}+128p^{5}+56p^{4}-111p^{3}+43p^{2}-9p+1+g_{(3,2,2,1,1)}(p).$

###### Proof.

The result follows immediately from (7.1) and computations in previous
sections. ∎

Liu computes the values of $g_{n}(p^{e})$ for $n=3,4$ (cf. [Liu07, Proposition
6.1 and 6.2]). We record these values for $e=9$ and refer to [AKKM21, p. 231]
the values of $e$ which lie in the range $4\leq e\leq 8$. We find that

$g_{3}(p^{9})=p^{3}+4p^{2}+4p+1,$

and that

$g_{4}(p^{9})=11p^{4}+30p^{3}+9p^{2}+p+1.$

######  Proposition 7.2.

For $n>1$, the following relation holds

$\displaystyle f_{n}(p^{9})-f_{n-1}(p^{9})$ $\displaystyle=$ $\displaystyle
Q(n)(276480P_{10}(n)p^{10}+276480P_{9}(n)p^{9}+138240P_{8}(n)p^{8}$
$\displaystyle+34560P_{7}(n)p^{7}+34560P_{6}(n)p^{6}+11520P_{5}(n)p^{5}$
$\displaystyle+11520P_{4}(n)p^{4}+1440P_{3}(n)p^{3}+1440P_{2}(n)p^{2}$
$\displaystyle+240P_{1}(n)p+P_{0}(n))+{n-1\choose 5}g_{(3,2,2,1,1)}(p),$

where,

$\displaystyle Q(n)$ $\displaystyle=$ $\displaystyle\frac{n-1}{1393459200},$
$\displaystyle P_{10}(n)$ $\displaystyle=$
$\displaystyle(n-2)(n-3)(n-4)(n-5)(n-6)(n-7),$ $\displaystyle P_{9}(n)$
$\displaystyle=$ $\displaystyle n(n-2)(n-3)(n-4)(n-5)(n-6),$ $\displaystyle
P_{8}(n)$ $\displaystyle=$
$\displaystyle(n-2)(n-3)(n-4)(n-5)(n-6)(9n^{2}-131n+784),$ $\displaystyle
P_{7}(n)$ $\displaystyle=$
$\displaystyle(n-2)(n-3)(n-4)(n-5)(37n^{3}-761n^{2}+6482n-18144),$
$\displaystyle P_{6}(n)$ $\displaystyle=$
$\displaystyle(n-2)(n-3)(n-4)(75n^{5}-2468n^{4}+36349n^{3}-279672n^{2}$
$\displaystyle+1101372n-1732080).$ $\displaystyle P_{5}(n)$ $\displaystyle=$
$\displaystyle(n-2)(n-3)(n-4)(33n^{6}-1220n^{5}+21757n^{4}-208732n^{3}$
$\displaystyle+1053542n^{2}-2414076n+1592640),$ $\displaystyle P_{4}(n)$
$\displaystyle=$
$\displaystyle(n-2)(n-3)(42n^{8}-2102n^{7}+51106n^{6}-749135n^{5}$
$\displaystyle+7010050n^{4}-41819711n^{3}+152633830n^{2}$
$\displaystyle-307862664n+260890560),$ $\displaystyle P_{3}(n)$
$\displaystyle=$
$\displaystyle(n-2)(273n^{10}-18123n^{9}+571282n^{8}-10999886n^{7}$
$\displaystyle+140978185n^{6}-1241293667n^{5}+7531038196n^{4}$
$\displaystyle-30849468932n^{3}+81151302432n^{2}-123180801984n$
$\displaystyle+81613163520),$ $\displaystyle P_{2}(n)$ $\displaystyle=$
$\displaystyle(n-2)(147n^{11}-10843n^{10}+377832n^{9}-8095642n^{8}$
$\displaystyle+117343063n^{7}-1198590955n^{6}+8745674590n^{5}$
$\displaystyle-45324367680n^{4}+162663439888n^{3}-383226514464n^{2}$
$\displaystyle+531138427776n-326776343040),$ $\displaystyle P_{1}(n)$
$\displaystyle=$
$\displaystyle(n-2)(315n^{12}-25368n^{11}+956025n^{10}-22147762n^{9}$
$\displaystyle+349611873n^{8}-3946086924n^{7}+32542876455n^{6}$
$\displaystyle-196940866290n^{5}+865325849028n^{4}-2683887407672n^{3}$
$\displaystyle+5560471449216n^{2}-6887555482752n+3844971970560),$
$\displaystyle P_{0}(n)$ $\displaystyle=$ $\displaystyle
135n^{16}-14400n^{15}+730980n^{14}-23334360n^{13}+522513250n^{12}$
$\displaystyle-8678453720n^{11}+110319301164n^{10}-1092302298312n^{9}$
$\displaystyle+8494128305343n^{8}-51930963880392n^{7}+248190356069720n^{6}$
$\displaystyle-915171074718208n^{5}+2545385435375472n^{4}$
$\displaystyle-5146605000021888n^{3}+7110255039457536n^{2}$
$\displaystyle-5973926003435520n+2289569122713600.$

###### Proof.

Recall the recurrence relation (1.2)

$f_{n}(p^{9})=\sum_{i=0}^{9}\sum_{j=1}^{n}{n-1\choose
j-1}f_{n-j}(p^{9-i})g_{j}(p^{i}).$

Note that since $i\leq 9$, we find that $j\leq 10$ in the above recurrence
relation. We compute the values of $g_{j}(p^{i})$ and then recursively, use
the above to compute the value of $f_{n}(p^{9})$. In greater detail, we use
values from [AKKM21, p. 231], the Theorem 1.2, and the values computed in
previous sections, to obtain the above recurrence relation. ∎

Using the recurrence relation above and noting that

$f_{n}(p^{9})=\sum_{k=2}^{n}\left(f_{k}(p^{9})-f_{k-1}(p^{9})\right)$

we obtain Theorem 1.4. We performed all the computations in SageMath.

###  7.2. Some bounds on $g_{\alpha}(p)$

In this section we obtain upper bounds on $g_{\alpha}(p)$ for certain
compositions $\alpha$. Let $u_{1},\dots,u_{n}$ be the standard basis of
$\mathbb{Z}^{n}$. The vector $u_{i}=(0,0,\dots,0,1,0,\dots,0)$ consists of $0$
in all entries except for $1$ in the $i$-th entry. Let $L$ be an irreducible
subring of $\mathbb{Z}^{n}$ and let $\mathfrak{m}_{L}$ be the ideal in $L$
consisting of vectors all of whose coordinates are divisible by $p$. Setting
$\rho_{L}\mathrel{\mathop{\mathchar
58\relax}}=\operatorname{dim}_{\mathbb{F}_{p}}\mathfrak{m}_{L}/\mathfrak{m}_{L}^{2}$.
Following [Liu07, p. 292, l.-1], an irreducible subring is _full_ if
$\rho_{L}=n-1$. Assume that the matrix for $L$ is in Hermite normal form with
respect to the basis $u_{1},\dots,u_{n}$. Let $\pi\mathrel{\mathop{\mathchar
58\relax}}\mathbb{Z}^{n}\rightarrow\mathbb{Z}^{n-1}$ be the projection onto
the last $(n-1)$ coordinates $u_{2},\dots,u_{n}$. Suppose that the basis is
chosen so that with respect to the ordered basis $(u_{1},\dots,u_{n})$, the
matrix $A$ associated with $L$ is in the Hermite normal form. Let
$v_{1},\dots,v_{n}$ be the columns of $A$, and let $\tau(L)$ be the lattice
generated by $L$ and by $v_{1}^{\prime}\mathrel{\mathop{\mathchar
58\relax}}=\frac{1}{p}v_{1}$. It is easy to see that $\tau(L)$ is a subring
(cf. [Liu07, p.291, l.-2]).

######  Proposition 7.3.

Let $L$ be an irreducible subring of index $p^{e+n}$ such that $\pi(L)$ is
full and $pu_{1}\notin L$. Then the map
$L\mapsto\frac{1}{p}\mathfrak{m}_{\tau(L)}$ is a $p^{n-2}$-to-one surjection
onto subrings of index $p^{e}$.

###### Proof.

The above result is [Liu07, Proposition 5.6]. ∎

Let $\beta\mathrel{\mathop{\mathchar
58\relax}}=(\beta_{1},\beta_{2},\dots,\beta_{n-1})$ be a composition of length
$n-1$ such that $\beta_{1}>1$, $\beta_{i}>0$ for $i\in\\{2,\dots,n-1\\}$. By
abuse of notation, we say that an irreducible subring $L$ has diagonal $\beta$
if the entries on the diagonal of the matrix $A_{L}$ are
$p^{\beta_{1}},\dots,p^{\beta_{n-1}},1$. We set $\mathcal{R_{\beta}}$ to
denote the set of irreducible subrings with diagonal $\beta$. Let
$\beta^{\prime}\mathrel{\mathop{\mathchar
58\relax}}=(\beta_{1}-2,\beta_{2}-1,\dots,\beta_{n-1}-1)$, let
$\mathcal{S}_{\beta^{\prime}}$ denote the set of subring matrices with
diagonal $\beta^{\prime}$. Let $\mathcal{R}^{\prime}_{\beta}$ be the subset of
$\mathcal{R}_{\beta}$ consisting of irreducible subrings with diagonal $\beta$
such that $\pi(L)$ is full and $pu_{1}\notin L$, with respect to the basis
$u_{1},\dots,u_{n}$ for which $A_{L}$ is in Hermite normal form. Given a
finite set $S$, set $\\#S$ to denote the cardinality of $S$.

######  Lemma 7.4.

Let $\beta\mathrel{\mathop{\mathchar
58\relax}}=(\beta_{1},\beta_{2},\dots,\beta_{n-1})$ be a composition of length
$n-1$ such that the following conditions are satisfied

  1. (1)

$\beta_{1}>1$,

  2. (2)

$\beta_{i}>0$ for $i\in\\{2,\dots,n-1\\}$,

  3. (3)

$\sum_{i=1}^{n-1}\beta_{i}>n$.

Then, there is a $p^{n-2}$-to-one surjection from
$\mathcal{R}_{\beta}^{\prime}$ to $\mathcal{S}_{\beta^{\prime}}$. In
particular, we have that

$\\#\mathcal{R}_{\beta}\geq\\#\mathcal{R}^{\prime}_{\beta}\geq
p^{n-2}\\#\mathcal{S}_{\beta^{\prime}}.$

###### Proof.

It follows from Proposition 7.3 that the map
$L\mapsto\frac{1}{p}\mathfrak{m}_{\tau(L)}$ defines a $p^{n-2}$ to one
surjective map $\Phi\mathrel{\mathop{\mathchar
58\relax}}\mathcal{R}_{\beta}^{\prime}\rightarrow\mathcal{S}_{\beta^{\prime}}$.
The inequality follows immediately from this. ∎

The following result comes as a consequence of the above Lemma.

######  Proposition 7.5.

Let $\beta\mathrel{\mathop{\mathchar
58\relax}}=(\beta_{1},\beta_{2},\dots,\beta_{n-1})$ be a composition of length
$n-1$ such that $\beta_{1}>1$, $\beta_{i}>0$ for $i\in\\{2,\dots,n-1\\}$ and
$\sum_{i=1}^{n-1}\beta_{i}>n$. Setting $m_{\beta}\mathrel{\mathop{\mathchar
58\relax}}=\min\\{\lfloor\frac{\beta_{1}}{2}\rfloor,\beta_{2},\dots,\beta_{n-1}\\}$,
we have the following lower bound for $g_{\beta}(p)$

$g_{\beta}(p)\geq p^{(n-2)m_{\beta}}.$

###### Proof.

The result follows upon repeatedly applying the Lemma 7.4. ∎

In particular we see that if $\alpha\mathrel{\mathop{\mathchar
58\relax}}=(k,\ell,\dots,\ell)$ of length $n-1$, then $g_{\alpha}(p)\geq
p^{{\lfloor\frac{k}{2}\rfloor}(n-2)}$. We note that this is a special case of
[Ish22b, Corollary 4.6].

######  Theorem 7.6.

We have the following polynomial lower bound

$g_{n}(p^{e})\geq\sum_{j=1}^{\lfloor
e/n\rfloor}p^{(n-2)j}\left(\binom{e-1-nj}{n-2}-\binom{e-1-n(j+1)}{n-2}\right).$

###### Proof.

Let $\mathcal{C}_{n,e}^{j}$ be the subset of $\mathcal{C}_{n,e}$ consisting of
all compositions $\beta=(\beta_{1},\dots,\beta_{n-1})$ such that
$m_{\beta}=j$. It is easy to see that

$\\#\mathcal{C}_{n,e}^{j}=\\#\mathcal{C}_{n,e-nj}-\\#\mathcal{C}_{n,e-n(j+1)}=\binom{e-1-nj}{n-2}-\binom{e-1-n(j+1)}{n-2}.$

It follows from Proposition 7.5 that

$g_{n}(p^{e})\geq\sum_{j=1}^{\lfloor
e/n\rfloor}p^{(n-2)j}\\#\mathcal{C}_{n,e}^{j},$

and the result follows. ∎

We now prove Theorem 1.6.

###### Proof of Theorem 1.6.

Let us assume for simplicity that $t=n-1$. The proof in generality is
identical to this case. Given an $n\times n$ matrix $A$, let $A_{[i,j]}$ be
the $i\times j$ matrix obtained upon deleting the last $(n-i)$ rows and
$(n-j)$ columns. Thus, $A_{[i,j]}$ is the upper left $i\times j$ submatrix of
$A$. Let $S$ denote the set of subring matrices of the form

$A=\begin{pmatrix}p^{\alpha_{1}}&\dots&\dots&\dots&a_{1}p&1\\\
&p^{\alpha_{2}}&\dots&\dots&a_{2}p&1\\\ &&\ddots&&\vdots&\vdots\\\
&&&&\vdots&\vdots\\\ &&&&p^{k\alpha_{n-1}}&1\\\ &&&&&1\end{pmatrix}$

that are in Hermite normal form. We note that the following conditions hold

  1. (1)

$0\leq a_{i}\leq p^{\gamma-1}-1$,

  2. (2)

setting $\hat{A}\mathrel{\mathop{\mathchar 58\relax}}=A_{[n-2,n-2]}$, we note
that

$(a_{1}^{2}p^{2}-a_{1}p^{k\alpha_{n-1}+1},\dots,a_{n-2}^{2}p^{2}-a_{n-2}p^{k\alpha_{n-1}+1})^{t}\in\operatorname{Col}\hat{A}=\hat{A}(\mathbb{Z}^{n-2}).$

We note in passing that $g_{\alpha_{/k,t}}(p)=\\#S$. We denote the set of all
irreducible subring matrices of size $(n-1)$ and with diagonal
$(p^{\alpha_{1}},p^{\alpha_{2}},\dots,p^{\alpha_{n-2}},1)$ by $\mathcal{A}$.

We note that for each index $i$ in the range $1\leq i\leq n-2$ we have that
$|a_{i}^{2}p^{2}-a_{i}p^{k\alpha_{i}+1}|\leq|a_{i}^{2}|p^{2}+|a_{i}p^{k\alpha_{i}+1}|\leq
2p^{(k+1)\gamma}$.

In order to simplify notation, for $B\in\mathcal{A}$, set
$B^{\prime}\mathrel{\mathop{\mathchar 58\relax}}=B_{[n-2,n-2]}$. Setting
$\mathcal{C}\mathrel{\mathop{\mathchar
58\relax}}=[-2p^{(k+1)\gamma},2p^{(k+1)\gamma}]^{n-2}$, we find that

(7.2)
$\\#S\leq\sum_{B\in\mathcal{A}}\\#\left(B^{\prime}(\mathbb{Z}^{n-2})\cap\mathcal{C}\right).$

For $B\in\mathcal{A}$, the number of points in $v\in\mathbb{Z}^{n-2}$ such
that $B^{\prime}v\in\mathcal{C}$ is same as the number of points
$w\in\mathcal{C}$ such that
$\left(B^{\prime}\right)^{-1}(w)\in\mathbb{Z}^{n-2}$. Therefore using
inequality 7.2 we deduce that

(7.3)
$\\#S\leq\sum_{B\in\mathcal{A}}\\#(\left(B^{\prime}\right)^{-1}(\mathcal{C})\cap\mathbb{Z}^{n-2}).$

For $w=(w_{1},\dots,w_{n-2})\in\mathbb{Z}^{n-2}$, set $\lVert w\rVert$ to be
the Euclidean norm $\sqrt{\sum_{i}w_{i}^{2}}$. For any $w\in\mathcal{C}$ we
have that
$\lVert(B^{\prime})^{-1}w\rVert\leq\lVert(B^{\prime})^{-1}\rVert\lVert
w\rVert$. It is easy to see that $\lVert w\rVert\leq
2p^{(k+1)\gamma}\sqrt{n-2}$. On the other hand, since $\mathcal{A}$ is a
finite set which is defined independent of $k$, we find that for any
$B\in\mathcal{A}$ and $w\in\mathcal{C}$, $\lVert(B^{\prime})^{-1}w\rVert\leq
M\sqrt{n-2}p^{(k+1)\gamma}$ where $M\in\mathbb{R}_{>0}$ is a suitably large
constant (not depending on $k$). Using the inequality (7.3), we deduce that

(7.4)
$\\#S\leq\sum_{L\in\mathcal{A}}\\#([-M\sqrt{n-2}p^{(k+1)\gamma},M\sqrt{n-2}p^{(k+1)\gamma}]^{n-2}\cap\mathbb{Z}^{n-2})$

Fxing an integer $N>M\sqrt{n-2}$, we deduce that

(7.5)
$\\#S\leq\sum_{L\in\mathcal{A}}\\#([-Np^{(k+1)\gamma},Np^{(k+1)\gamma}]^{n-2}\cap\mathbb{Z}^{n-2})$

Therefore, $\\#S\leq\\#(\mathcal{A})(2N)^{n-2}p^{(k+1)\gamma{(n-2)}}$. We have
proved that

$g_{\alpha_{/k,t}}(p)=\\#S\leq\\#(\mathcal{A})(2N)^{n-2}p^{\gamma{(n-2)}}p^{\gamma
k{(n-2)}}$

Therefore, $g_{\alpha_{/k,t}}(p)=O(p^{\gamma k(n-2)})\text{ as }k\to\infty.$ ∎

## References

  * [AKKM21] Stanislav Atanasov, Nathan Kaplan, Benjamin Krakoff, and Julia H Menzel.  Counting finite index subrings of $\mathbb{Z}^{n}$.  Acta Arithmetica, 197(3), 2021.
  * [Bra09] Johannes Franciscus Brakenhoff.  Counting problems for number rings.  PhD thesis, Leiden University, 2009.
  * [DSWP08] Marcus Du Sautoy, Luke Woodward, and D Phil.  Zeta functions of groups and rings, volume 1925.  Springer, 2008.
  * [DW88] Boris Datskovsky and David J Wright.  Density of discriminants of cubic extensions.  1988\.
  * [Dwo62] Bernard Dwork.  On the zeta function of a hypersurface.  Publications Mathématiques de l’IHÉS, 12:5–68, 1962.
  * [GSS88] Fritz J Grunewald, Dan Segal, and Geoff C Smith.  Subgroups of finite index in nilpotent groups.  Inventiones mathematicae, 93(1):185–223, 1988.
  * [HRV08] Tamás Hausel and Fernando Rodriguez-Villegas.  Mixed hodge polynomials of character varieties.  Inventiones mathematicae, 174(3):555–624, 2008.
  * [Ish22a] Kelly Isham.  Is the number of subrings of index $p^{e}$ in $\mathbb{Z}^{n}$ polynomial in $p$?  arXiv preprint arXiv:2203.00646, 2022.
  * [Ish22b] Kelly Isham.  Lower bounds for the number of subrings in $\mathbb{Z}^{n}$.  Journal of Number Theory, 234, 2022.
  * [KMTB15] Nathan Kaplan, Jake Marcinek, and Ramin Takloo-Bighash.  Distribution of orders in number fields.  Research in the Mathematical Sciences, 2(1):1–57, 2015.
  * [Liu07] Ricky Ini Liu.  Counting subrings of $\mathbb{Z}^{n}$ of index k.  Journal of Combinatorial Theory, Series A, 114(2):278–299, 2007\.
  * [LS03] Alexander Lubotzky and Dan Segal.  Subgroup growth, volume 212.  Springer, 2003.
  * [Nak96] Jin Nakagawa.  Orders of a quartic field, volume 583.  American Mathematical Soc., 1996.
  * [Spa79] Kenneth W Spackman.  Simultaneous solutions to diagonal equations over finite fields.  Journal of Number Theory, 11(1):100–115, 1979.