<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}


\usepackage{setspace}
\usepackage{bm}
\usepackage{amsfonts}
\usepackage{amstext}
\usepackage{multicol}
\usepackage{mathdots}
\usepackage{url}
\usepackage{mathrsfs}
\usepackage{lscape}
\usepackage{enumerate}
\usepackage{amsthm}
\usepackage{mathtools}

\def\modd#1 #2{#1\ \mbox{\rm (mod}\ #2\mbox{\rm )}}
\DeclareMathOperator{\mex}{mex}
\DeclareMathOperator{\SL}{SL}
\newcommand{\mexover}[1]{ \overline{\mex}({#1})}
\newcommand{\smexover}[1]{\sigma \overline{\mex}({#1})}
\newcommand{\mexrover}[1]{ \overline{\mex}_r({#1})}
\newcommand{\srmexover}[1]{\sigma_r \overline{\mex}({#1})}


\begin{document}
\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf A Minimal Excludant over Overpartitions
}
\vskip 1cm
\large
Victor Manuel R. Aricheta and Judy Ann L. Donato\\
Institute of Mathematics\\
University of the Philippines Diliman\\ 
Diliman, Quezon City 1101\\
Philippines\\
\href{mailto:vmaricheta@math.upd.edu.ph}{\tt vmaricheta@math.upd.edu.ph} \\
\href{mailto:jadonato@math.upd.edu.ph}{\tt jadonato@math.upd.edu.ph} \\
\end{center}

\vskip .2 in

\begin{abstract}
Define the minimal excludant of an overpartition $\pi$, denoted $\overline{\mex}(\pi)$, to be the smallest positive integer that is not a part of the non-overlined parts of $\pi$. For a positive integer $n$, the function $\sigma\overline{\mex}(\pi)$ is the sum of the minimal excludants over all overpartitions of $n$. In this paper, we prove that the  $\sigma\overline{\mex}(\pi)$ equals the number of partitions of $n$ into distinct parts using three colors. We also provide an asymptotic formula for  $\sigma\overline{\mex}(\pi)$  and show that  $\sigma\overline{\mex}(\pi)$  is almost always even and is odd exactly when $n$ is a triangular number. Moreover, we generalize $\overline{\mex}(\pi)$ using the least $r$-gaps, denoted $\overline{\mex}_r(\pi)$, defined as the smallest part of the non-overlined parts of the overpartition $\pi$ appearing less than $r$ times. Similarly, for a positive integer $n$, the function $\sigma_r\overline{\mex}(\pi)$ is the sum of the least $r$-gaps over all overpartitions of $n$. We derive a generating function and  an asymptotic formula for  $\sigma_r\overline{\mex}(\pi)$. Lastly, we study the arithmetic density of  $\sigma_r\overline{\mex}(\pi)$ modulo $2^k$, where $r=2^m\cdot3^n, m,n \in \mathbb{Z}_{\geq 0}$.
\end{abstract}

\section{Introduction}
The minimal excludant (mex) of a subset $S$ of a well-ordered set $U$ is the smallest value in $U$ that is not in $S$.  In particular, the minimal excludant of a set $S$ of positive integers, denoted $\mex(S)$, is the least positive integer not in $S$, i.e., $\mex(S)=\min(\mathbb{Z}^{+} \setminus S)$. The history of the minimal excludant goes way back in the 1930s when it was first used in combinatorial game theory by Sprague and Grundy \cite{grundy, sprague}.

In 2019, Andrews and Newman \cite{andrewsnewman} studied the minimal excludant of an integer partition $\pi$, denoted $\mex(\pi)$, which is defined as the smallest positive integer that is not a part of $\pi$. Moreover, they also introduced the arithmetic function
\[\sigma\mex(n):=\displaystyle \sum_{\pi \in \mathcal{P}(n)} \mex(\pi),\]
where $\mathcal{P}(n)$ is the set of all partitions of $n$.

In their paper, Andrews and Newman proved the following interesting relationship between $\sigma\mex(n)$ and $D_2(n)$ which is the number of partitions of $n$ into distinct parts using two colors:
\[\sigma \mex(n)=D_2(n).\]
Moreover, they showed that $\sigma\mex(n)$ is almost always even; in particular, they showed that $\sigma\mex(n)$ is odd exactly when $n=j(3j\pm 1)$ for some $j \in \mathbb{Z}^{+}$.

Recall that an overpartition of a positive integer $n$ is a non-increasing sequence of natural numbers whose sum is $n$ in which the first occurrence  of a number may be overlined. We denote by $\overline{p}(n)$ the number of overpartitions of $n$. For example, $\overline{p}(3)=8$ since there are 8 overpartitions of $3$ which are: 
\[3, \overline{3}, 2+1, \overline{2}+1, 2+\overline{1}, \overline{2}+\overline{1}, 1+1+1, \overline{1}+1+1.\]

The goal of this paper is to extend the notion of minimal excludant of partitions to overpartitions. There are several ways to obtain such a generalization. (For example, see Section 4 of \cite{dhar} for one such definition of minimal excludant of overpartitions and its relation to the Ramanujan function $R(q)$.)  We propose the  following definition below (Definition \ref{def1}). We justify using this definition through the results we obtain, which are overpartition analogues of results concerning the classical partition function (see Proposition \ref{Tk}). We also note that our definition coincides with the one given in a recent paper of Yang and Zhou on identities involving mex-related partitions \cite{yang}.

\begin{definition} \label{def1}
    The \textit{minimal excludant of an overpartition} $\pi$, denoted $\mexover{\pi}$, is the smallest positive integer that is not a part of the non-overlined parts of $\pi$.  For a positive integer $n$, denote the sum of $\mexover{\pi}$ over all overpartitions $\pi$ of $n$ as $\smexover{n}:$
\[\smexover{n}=\displaystyle \sum_{\pi \in \overline{\mathcal{P}}(n)} \mexover{\pi}, \]
where $\overline{\mathcal{P}}(n)$ is the set of all overpartitions of $n$. We set $\smexover{0}=1$.
\end{definition}

For example, consider $n=3$. The table below shows all overpartitions of $3$ and their corresponding minimal excludant.

	\begin{table}[H]
		\centering
\begin{tabular}{ |c|c| } 
 \hline
 $\pi$ &amp; $\mexover{\pi}$\\
 \hline
 3 &amp; 1 \\ 
$\overline{3}$ &amp; 1 \\ 
  $2 + 1$ &amp; 3 \\
  $\overline{2} + 1$ &amp; 2 \\
   $2 + \overline{1}$ &amp; 1 \\
    $\overline{2} + \overline{1}$ &amp; 1\\
   1+1+1 &amp; 2\\
   $\overline{1}+1+1$ &amp; 2 \\
 \hline 
\end{tabular}
	\caption{Minimal excludants of overpartitions of 3.}
\end{table}

Thus, $\smexover{3}= 13$. The table below shows the first ten values of $\smexover{n}$.

	\begin{table}[H]
	\centering
\begin{tabular}{ |c|c|c|c|c|c|c|c|c|c|c| } 
 \hline
 $n$ &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 \\
 \hline
 $\smexover{n}$ &amp; 1 &amp; 3 &amp; 6 &amp; 13 &amp; 24 &amp; 42 &amp; 73 &amp; 120 &amp; 192 &amp; 302 \\
 \hline 
\end{tabular}
	\caption{First ten values of $\smexover{n}$.}
\end{table}


We observe that these are also the first ten values of the sequence \seqnum{A022568} in OEIS which is $(D_3(n))$, the sequence of number of partitions of $n$ into distinct parts using three colors. In Section 2, we derive the generating function of $\smexover{n}$ and prove the aforementioned observation relating $\smexover{n}$ and $D_3(n)$. This result generalizes the results of Andrews and Newman, which relates $\sigma\mex(n)$ and $D_2(n)$.

\begin{theorem} \label{D3}
For all positive integers $n$, we have \[\smexover{n}=D_3(n).\]
\end{theorem}

We also derive an asymptotic formula for $\smexover{n}$ and prove a theorem regarding the parity of $\smexover{n}$.

\begin{theorem} \label{asym1}
We have
\[\smexover{n} \sim \dfrac{e^{\pi\sqrt{n}}}{8n^{3/4}}\] as $n \rightarrow \infty$.
\end{theorem}

\begin{theorem} \label{parity}
For a positive integer $n$, we have 
\begin{displaymath}
\smexover{n} \equiv \begin{cases}
     \modd{1} {2}, &amp; \text{if $n=\frac{j(j+1)}{2}$ for some  $j \in \mathbb{N}$;}\\
   \modd{0} {2}, &amp; \text{otherwise.}
\end{cases}
\end{displaymath}
\end{theorem}

Ballantine and Merca \cite{ballantinemerca} explored the least $r$-gap of a partition $\pi$, denoted $g_r(\pi)$, which is the smallest part of $\pi$ appearing less than $r$ times. In particular, $g_1(\pi)$ is the minimal excludant of $\pi.$ They defined the arithmetic function 
\[\sigma_r\mex(n)=\displaystyle \sum_{\pi \in \mathcal{P}(n)} g_r(\pi)\]
which is the sum of the least $r$-gaps in all partitions of $n$. They also derived the following generating function for $\sigma_r\mex(n)$:
\[\displaystyle \sum_{n=0}^\infty \sigma_r\mex(n)q^n=\dfrac{(q^{2r};q^{2r})_\infty}{(q;q)_\infty(q^r;q^{2r})_\infty}\]
where $(a;q)_{\infty} := \prod_{k=0}^{\infty} (1-aq^k)$.

In this paper, we generalize $\mexover{\pi}$ into $r$-gaps.

\begin{definition} \label{def2}
The \textit{least $r$-gap of an overpartition $\pi$}, denoted $\mexrover{\pi}$ is the smallest part of the non-overlined parts of $\pi$ appearing less than $r$ times. Moreover, the function
 \[\srmexover{n} = \displaystyle \sum_{\pi \in \overline{\mathcal{P}}(n)} \mexrover{\pi} \]
is the  sum of the least $r$-gaps over all overpartitions of $n.$ Moreover, we set $\srmexover{0} =
1$.
\end{definition}

For example, let $r =2$ and $n=3$. The table below shows all overpartitions of $3$ and their corresponding least 2-gap.

\begin{table}[H]
	\centering
\begin{tabular}{ |c|c| } 
 \hline
 $\pi$ &amp; $\mexover{\pi}$\\
 \hline
 3 &amp; 1 \\ 
$\overline{3}$ &amp; 1 \\ 
  $2 + 1$ &amp; 1 \\
  $\overline{2} + 1$ &amp; 1 \\
   $2 + \overline{1}$ &amp; 1 \\
    $\overline{2} + \overline{1}$ &amp; 1\\
   1+1+1 &amp; 2\\
   $\overline{1}+1+1$ &amp; 2 \\
 \hline 
\end{tabular}
	\caption{Least 2-gaps of overpartitions of 3.}
\end{table}
Thus, $\sigma_2 \overline{\mex}(2)= 10$. The first ten values of  $\sigma_2 \overline{\mex}(n)$ are given in the following table below.


\begin{table}[H]
	\centering
\begin{tabular}{ |c|c|c|c|c|c|c|c|c|c|c| } 
  \hline
 $n$ &amp; 0 &amp; 1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 \\
 \hline
 $\sigma_2 \overline{\mex}(n)$ &amp; 1 &amp; 2 &amp; 5 &amp; 10 &amp; 18 &amp; 32 &amp; 55 &amp; 90 &amp; 144 &amp; 226 \\
 \hline 
\end{tabular}
\caption{First ten values of $\sigma_2 \overline{\mex}(n)$.}
\end{table}

We observe that these are also the first ten values of the sequence \seqnum{A001936} in OEIS which is the sequence of coefficients of $q^n$ in the expansion of \[\dfrac{(-q;q)_\infty(q^{4};q^{4})_\infty}{(q;q)_\infty(q^{2};q^{4})_\infty}.\]
In Section 3, we derive the generating function and asymptotic formula for $\srmexover{n}$.

\begin{theorem} \label{gen}
For all positive integers $r$, we have
\[\displaystyle\sum_{n=0}^{\infty} \srmexover{n}q^n = \dfrac{(-q;q)_\infty(q^{2r};q^{2r})_\infty}{(q;q)_\infty(q^{r};q^{2r})_\infty}.\]\end{theorem}

\begin{theorem} \label{asym2}
For all positive integers $r$, we have
    \[\srmexover{n} \sim \dfrac{e^{\pi\sqrt{n}}}{8\sqrt{r}n^{3/4}}\] \text{ as } $ n \rightarrow \infty.$ 
\end{theorem}

Chakraborty and Ray \cite{chakrabortyray} studied the arithmetic density of $\sigma_2\mex(n)$ and $\sigma_3\mex(n)$ modulo $2^k$ for a positive integer $k$ and proved that for almost every nonnegative integer $n$ lying in an arithmetic progression, the integer
$\sigma_r \mex(n)$ is a multiple of $2^k$ where $r \in \{2,3\}$.

We also study the arithmetic density of $\srmexover{n}$ when $r=2^m \cdot 3^n$, where $m,n \in \mathbb{Z}_{\geq 0}$. In Section 4, we prove the following result. 

\begin{theorem} \label{main}
    Let $r = 2^m \cdot 3^n$ where $m,n \in \mathbb{Z}_{\geq 0}$ and  $k \geq 1$ be a positive integer. Then 
\[\displaystyle \lim_{X \to +\infty} \dfrac{\#\{n\leq X: \srmexover{n} \equiv \modd{0} {2^k}\}}{X}=1.\]
\end{theorem}


Equivalently, for almost every nonnegative integer $n$ lying in an arithmetic progression, the integer
$\srmexover{n}$ is a multiple of $2^k$ when $r=2^m \cdot 3^n, m,n \in \mathbb{Z}_{\geq 0}$.

\section{Minimal excludant of an overpartition}
\subsection{Generating function of $\smexover{n}$}

\begin{proof}[Proof of Theorem \ref{D3}]
Let $p^{\overline{\mex}}(m,n)$ be the number of overpartitions $\pi$ of $n$ with $\overline{\mex}(\pi)=m$.
Then we have the following double series $M(z,q)$ in which the coefficient of $z^mq^n$ is $p^{\overline{\mex}}(m,n)$:
\begin{align*}
M(z,q):=\displaystyle\sum_{n=0}^\infty \sum_{m=1}^\infty p^{\overline{\mex}}(m,n)  z^mq^n &amp;= \displaystyle \sum_{m=1}^\infty z^mq^1\cdot q^2 \cdots \cdot q^{m-1} \cdot \dfrac{\displaystyle\prod_{n=1}^\infty (1+q^n)}{\displaystyle\prod_{\substack{n=1 \\ n \neq m}}^\infty (1-q^n)}\\
    &amp;=\displaystyle \sum_{m=1}^\infty z^mq^{m \choose 2} \cdot \dfrac{(-q;q)_\infty}{(q;q)_\infty} \cdot (1-q^m)\\
    &amp;=\dfrac{(-q;q)_\infty}{(q;q)_\infty} \displaystyle \sum_{m=1}^\infty z^mq^{m \choose 2} \cdot (1-q^m).
\end{align*}

Thus we have
\begingroup
\allowdisplaybreaks
\begin{align*}
    \displaystyle \sum_{n \geq 0} \sigma \overline{\mex}(n)q^n &amp;= \dfrac{\partial}{\partial z}\Big|_{z=1} M(z,q)\\
    &amp;=\dfrac{(-q;q)_\infty}{(q;q)_\infty} \displaystyle \sum_{m=0}^\infty mq^{m \choose 2} (1-q^m)\\
     &amp;=\dfrac{(-q;q)_\infty}{(q;q)_\infty} \left( \displaystyle \sum_{m=1}^\infty mq^{m \choose 2} -\displaystyle \sum_{m=1}^\infty mq^{m \choose 2}\cdot q^m\right)\\
    &amp;= \dfrac{(-q;q)_\infty}{(q;q)_\infty} \left( \displaystyle \sum_{m=1}^\infty mq^{m \choose 2} -\displaystyle \sum_{m=1}^\infty (m-1)q^{m \choose 2}\right)\\
    &amp;=\dfrac{(-q;q)_\infty}{(q;q)_\infty} \displaystyle \sum_{m=0}^\infty q^{m+1 \choose 2}\\
    &amp;=\dfrac{(-q;q)_\infty}{(q;q)_\infty} \cdot \dfrac{(q^2;q^2)_\infty}{(q;q^2)_\infty}\\
    &amp;=(-q;q)_\infty \cdot \dfrac{(q^2;q^2)_\infty}{(q;q)_\infty(q;q^2)_\infty}, \text{\,\, (by \cite{andrews2}, Eq.~(2.2.13))}\\
    &amp;=(-q;q)_\infty \cdot (-q;q)^2_\infty\\
    &amp;=(-q;q)^3_\infty\\
    &amp;=\displaystyle \sum_{n \geq 0} D_3(n)q^n.
\end{align*}
\endgroup
\end{proof}



As an illustration, observe that the thirteen 3-colored partitions of 3 are: $3_1, 3_2, 3_3, 2_1+1_1, 2_1+1_2, 2_1+1_3, 2_2+1_1, 2_2+1_2, 2_2+1_3, 2_3+1_1, 2_3+1_2, 2_3+1_3, 1_1+1_2+1_3$, Indeed, $D_3(3)=13=\smexover{3}.$

\subsection{Asymptotic formula for $\smexover{n}$}

To derive an asymptotic formula for $\smexover{n}$, we use the following asymptotic result by Ingham \cite{bringmann} about the coefficients of a power series.

\begin{proposition} \label{asymingham}
  Let $A(q)= \sum_{n=0}^{\infty} a(n)q^n$ be a power series with radius of convergence equal to 1. Assume that $(a(n))$ is a weakly increasing sequence of nonnegative real numbers. If there are constants $\alpha, \beta \in \mathbb{R}$, and $C&gt;0$ such that
\[A(e^{-t})\sim \alpha t^{\beta}e^{\frac{C}{t}}, \text{ as } t \rightarrow 0^{+}, \,\,\,\,\,\,\,\,  A(e^{-z}) \ll |z|^\beta e^{\frac{C}{|z|}} \text{ as } z \rightarrow 0,\]
with $z=x+iy \,\, (x&gt;0, y \in \mathbb{R})$ in each region of the form $|y| \leq \Delta x$ for $\Delta &gt;0$. Then 

\[a(n) \sim \dfrac{\alpha}{2\sqrt{\pi}}\dfrac{C^{\frac{2\beta+1}{4}}}{n^{\frac{2\beta+3}{4}}}e^{2\sqrt{Cn}}, \text{ as } n \rightarrow \infty.\]
\end{proposition}

\begin{proof}[Proof of Theorem \ref{asym1}]
Note that $\smexover{n}=D_3(n)$ and $(D_3(n))$ is an increasing sequence of nonnegative real numbers, thus $\smexover{n}$ is also an increasing sequence of nonnegative real numbers. Let $A(q)=(-q;q)^3_\infty$, where $a(n)=\smexover{n}$ as in Proposition \ref{asymingham}. From \cite{bhorjaetal}, we have
\begin{align}\dfrac{1}{(e^{-t}; e^{-t})_\infty} \sim \sqrt{\dfrac{t}{2\pi}} e^{\frac{\pi^2}{6t}} \text{ as } t \rightarrow 0^+. \label{1}
\end{align}
Moreover, we use the following identity:
\begin{align}
(-q;q)_{\infty}=\dfrac{1}{(q;q^2)_\infty}=\dfrac{(q^2;q^2)_\infty}{(q;q)_\infty}.\label{2}
\end{align}
By (\ref{1}) and (\ref{2}), as $t \rightarrow 0^{+}$, we obtain
\[(-e^{-t};e^{-t})_\infty = \dfrac{(e^{-2t};e^{-2t})_\infty}{(e^{-t};e^{-t})_\infty}\sim \frac{\sqrt{\frac{t}{2\pi}} e^{\frac{\pi^2}{6t}}}{\sqrt{\frac{2t}{2\pi}} e^{\frac{\pi^2}{12t}}}=\dfrac{1}{\sqrt{2}}e^{\frac{\pi^2}{12t}}.\] 
Hence, as $t \rightarrow 0^{+}$, we get
\begin{align}
A(e^{-t})=(-e^{-t}; e^{-t})_\infty^3 \sim \left(\dfrac{1}{\sqrt{2}}e^{\frac{\pi^2}{12t}}\right)^3 = \dfrac{1}{2\sqrt{2}}e^{\frac{\pi^2}{4t}}. \label{3}
\end{align}
 Moreover, from \cite{bringmann}, if $z=x+iy \,\, (x&gt;0)$ with $|y| \leq \Delta x$, then 
\begin{align}
\dfrac{1}{(e^{-z};e^{-z})_\infty} \sim \sqrt{\dfrac{z}{2\pi}}e^{\frac{\pi^2}{6z}}, \,\,\, \text{ as } z \rightarrow 0. \label{bound}
\end{align}
 Similarly, we have
\[A(e^{-z})=(-e^{-z}; e^{-z})_\infty^3=\dfrac{(e^{-2z};e^{-2z})^3_\infty}{(e^{-z};e^{-z})^3_\infty} \sim \dfrac{1}{2\sqrt{2}}e^{\frac{\pi^2}{4z}}\]
as $z \rightarrow 0$, in these regions. From Remark 2 in \cite{bringmann}, this implies that
\[A(e^{-z}) \ll 
|z|^0e^{\frac{\pi^2}{4|z|}},  \,\,\, \text{ as } z \rightarrow 0 \]
in each region of the form $|y| \leq \Delta x$ for $\Delta &gt;0.$

 Take $\alpha=\frac{1}{2\sqrt{2}}, \beta=0$ and $C=\frac{\pi^2}{4}$. By Proposition \ref{asymingham}, we obtain
\[\smexover{n} \sim \dfrac{\frac{1}{2\sqrt{2}}}{2\sqrt{\pi}} \dfrac{\left(\frac{\pi^2}{4}\right)^{1/4}}{n^{3/4}}e^{2\sqrt{\frac{\pi^2}{4}n}} = \dfrac{e^{\pi{\sqrt{n}}}}{8n^{3/4}} \]
as $n \rightarrow \infty$.
\end{proof}

\subsection{Parity of $\smexover{n}$}

\begin{proof}[Proof of Theorem \ref{parity}]
We have
    \begin{align*}
        \displaystyle \sum_{n \geq 0} \smexover{n}q^n   &amp;=(-q;q)_\infty^3 \\
        &amp;= \displaystyle \prod_{n=1}^{\infty} (1+q^n)^3\\
        &amp;\equiv \modd{\displaystyle \prod_{n=1}^{\infty} (1-q^n)^3} {2}\\
        &amp;=(q;q)_\infty^3\\
        &amp;=\displaystyle \sum_{j=0}^\infty (-1)^j(2j+1)q^{\frac{j(j+1)}{2}}, \text{ by Jacobi's identity \cite{jacobi}.} 
    \end{align*}
\end{proof}

Comparing coefficients, we have that $\smexover{n} \equiv \modd{0} {2}$ for $n \neq \frac{j(j+1)}{2}$ for every $j \in \mathbb{N}$ and $\smexover{n} \equiv \modd{1} {2}$ otherwise. This shows that $\smexover{n}$ is almost always even and is odd exactly when $n$ is a triangular number.

\section{Least $r$-gaps}

\subsection{Generating function of $\srmexover{n}$}

 Ballantine and Merca \cite{ballantinemerca} proved that for $n \geq 0$ and $r \geq 1$,
\[\displaystyle \sum_{k=0}^{\infty} p(n-rT_k) = \sigma_r \mex(n).\]

We extend this result to overpartitions and present an analogous proof for the following proposition.
    \begin{proposition} \label{Tk}
        For $n \geq 0$ and $r \geq 1,$
        \[\displaystyle\sum_{k=0}^{\infty} \overline{p}(n-rT_k)=\srmexover{n}.\]  
    \end{proposition} 
          

    \begin{proof}
        Fix $r \geq 1$. For each $k \geq 0$,  consider the staircase partition 
        \[\delta_r(k)=(1^r, 2^r,\ldots,  (k-1)^r, k^r)\]
        where each part from 1 to $k$ is repeated $r$ times. We create an injection from the set of overpartitions of $n-rT_k$ into the set of overpartitions of $n$ with the following mapping:
        \[\phi_{r,n,k}: \overline{\mathcal{P}}(n-rT_k)  \xhookrightarrow{} \overline{\mathcal{P}}(n)\]
        where for an overpartition $\pi$ of $n-rT_k$, $\phi_{r,n,k}(\pi)$ is the overpartition obtained by inserting the non-overlined staircase partition $\delta_r(k)$.
    
        For example, if $\pi= 4+\overline{3}+2+\overline{1}+1=11$, we have $\phi_{2,23,3}=4+\overline{3}+2+\overline{1}+1+3+3+2+2+1+1=23$.
        
        Let $\mathcal{A}_{r,n,k}$ be the image of the overpartitions of $n-rT_k$ under $\phi_{r,n,k}$. We have $\overline{p}(n-rT_k)=|\mathcal{A}_{r,n,k}|$ and $\mathcal{A}_{r,n,k}$ consists of the partitions of $n$ satisfying $\mexrover{\pi}&gt;k$.

        Now, suppose $\pi$ is an overpartition of $n$ with $\mexrover{\pi}=k$. Then $\pi \in \mathcal{A}_{r,n,i}$, for $ i=0,1,\ldots,k-1$ and $\pi \notin A_{r,n,j}$ with $j \geq k$. Thus each overpartition of $n$ with $\mexrover{\pi}=k$ is counted by the summation $\displaystyle\sum_{k=0}^{\infty} \overline{p}(n-rT_k)$ exactly $k$ times.
    \end{proof}
        
        \begin{proof}[Proof of Theorem \ref{gen}] We have
\begin{align*}
    \displaystyle \sum_{n=0}^{\infty} \srmexover{n}q^n &amp;= \displaystyle \sum_{n=0}^{\infty}
\left(\displaystyle\sum_{k=0}^{\infty} \overline{p}(n-rT_k)\right)q^n, \text{ by Proposition \ref{Tk}}
\end{align*}
\newpage
\begin{align*}
  &amp;= \displaystyle \sum_{n=0}^{\infty} 
\displaystyle\sum_{k=0}^{\infty} \overline{p}(n-rT_k)q^n\\
&amp;=\displaystyle \sum_{n=0}^\infty \displaystyle \sum_{k=0}^\infty \overline{p}(n)q^{n+rT_k} \\
&amp;=\left(\displaystyle \sum_{n=0}^\infty \overline{p}(n)q^n \right)\left(\displaystyle \sum_{k=0}^\infty q^{rT_k} \right).
\end{align*}
Note that the generating function for $\overline{p}(n)$ is
\[\displaystyle \sum_{n=0}^\infty \overline{p}(n)q^n = \dfrac{(-q;q)_\infty}{(q;q)_\infty}.\]
Moreover, from \cite{ballantinemerca}, we have
\[\displaystyle \sum_{k=0}^\infty q^{rT_k} = \dfrac{(q^{2r};q^{2r})_\infty}{(q^r;q^{2r})_\infty}.\]
Thus we have
\[  \displaystyle \sum_{n=0}^{\infty} \srmexover{n}q^n = \left(\displaystyle \sum_{n=0}^\infty \overline{p}(n)q^n \right)\left(\displaystyle \sum_{k=0}^\infty q^{rT_k} \right) = \dfrac{(-q;q)_\infty(q^{2r};q^{2r})_\infty}{(q;q)_\infty(q^{r};q^{2r})_\infty}.\]
\end{proof}

\subsection{Asymptotic formula for $\srmexover{n}$}

Here, we generalize our asymptotic result in Theorem \ref{asym1} for the least $r$-gaps.

\begin{proof}[Proof of Theorem \ref{asym2}]
Note that $\overline{p}(n) &lt; \overline{p}(n+1)$ for $n \in \mathbb{N}$, since for every overpartition of $n$, say $n=a_1+a_2+\cdots+a_l$, we correspondingly have $n+1=a_1+a_2+\cdots+a_l+1$ as an overpartition of $n+1$.  Since $\srmexover{n}$ is the sum of the least $r$-gaps taken over all overpartitions of $n$, then we can conclude that $\srmexover{n}$ is a weakly increasing sequence. \\

\noindent Let $A(q)=\dfrac{(-q;q)_\infty(q^{2r};q^{2r})_\infty}{(q;q)_\infty(q^{r};q^{2r})_\infty}$, where $a(n)=\srmexover{n}$ as in Proposition \ref{asymingham}. First,
\[A(q)=\dfrac{(-q;q)_\infty(q^{2r};q^{2r})_\infty}{(q;q)_\infty(q^{r};q^{2r})_\infty}=\dfrac{(-q;q)_\infty(-q^r;q^r)^2_\infty (q^r;q^r)_\infty}{(q;q)_\infty}.\]
Hence, using (\ref{3}), as $t \rightarrow 0^{+}$, we get
\begin{align*}
    A(e^{-t}) &amp; = \dfrac{(-e^{-t};e^{-t})_\infty(-e^{-rt};e^{-rt})_\infty^2(e^{-rt};e^{-rt})_\infty}{(e^{-t};e^{-t})_\infty}\\
    &amp; \sim \dfrac{\frac{1}{\sqrt{2}}e^{\frac{\pi^2}{12t}}\left(\frac{1}{\sqrt{2}}e^{\frac{\pi^2}{12rt}}\right)^2\sqrt{\frac{t}{2\pi}}e^{\frac{\pi^2}{6t}}}{\sqrt{\frac{rt}{2\pi}}e^{\frac{\pi^2}{6rt}}}\\
    &amp;=\dfrac{1}{2\sqrt{2r}}e^{\frac{\pi^2}{4t}}.
\end{align*}
Moreover, if $z=x+iy \,\, (x&gt;0)$ with $|y| \leq \Delta x$, then from (\ref{bound}), we have
\[A(e^{-z})=\dfrac{(-e^{-z};e^{-z})_\infty(-e^{-rz};e^{-rz})_\infty^2(e^{-rz};e^{-rz})_\infty}{(e^{-z};e^{-z})_\infty} \sim \dfrac{1}{2\sqrt{2r}}e^{\frac{\pi^2}{4z}}, \,\,\, \text{ as } z \rightarrow 0.\]
From Remark 2 in \cite{bringmann}, this implies that
$A(e^{-z}) \ll 
|z|^0e^{\frac{\pi^2}{4|z|}}$ as $z \rightarrow 0$ 
in each region of the form $|y| \leq \Delta x$ for $\Delta &gt;0$.

 Take $\alpha=\dfrac{1}{2\sqrt{2r}},  \beta=0$ and $C=\frac{\pi^2}{4}$, by Proposition \ref{asymingham}, we obtain
\[\srmexover{n} \sim \dfrac{\frac{1}{2\sqrt{2}r}}{2\sqrt{\pi}} \dfrac{\left(\frac{\pi^2}{4}\right)^{1/4}}{n^{3/4}}e^{2\sqrt{\frac{\pi^2}{4}n}} = \dfrac{e^{\pi{\sqrt{n}}}}{8\sqrt{r}n^{3/4}} \]
as $n \rightarrow \infty$.
\end{proof}

\section{Distribution of $\srmexover{n}$}

\subsection{Preliminaries}
We first discuss some preliminaries about modular forms. We  define the upper-half complex plane 
\[\mathbb{H}=\{z \in \mathbb{C} \mid \Im(z)&gt;0\}\]
and the modular group 
    \[\SL_2(\mathbb{Z}) = \left\{\begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix} \Big| \, ad-bc = 1; a,b,c,d \in \mathbb{Z}\right\}.\]

 
For $A={\begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix}} \in \SL_2(\mathbb{Z})$, the modular group $\SL_2(\mathbb{Z})$ acts on $\mathbb{H}$ by the following linear fractional transformation: 
  \[Az= {\begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix}}z =\dfrac{az+b}{cz+d}.\]
  

Moreover, if $N \in \mathbb{Z}^+$, we define the following \textit{congruence subgroups} of $SL_2(\mathbb{Z})$ of level $N$: 
\[\Gamma_0(N):=\left\{\begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix} \in \SL_2(\mathbb{Z}) \Big| \begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix} \equiv \modd{\begin{pmatrix}
      * &amp; *\\
      0 &amp; *
  \end{pmatrix}} {N} \right\}\]
 \[ \Gamma_1(N):=\left\{\begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix} \in \SL_2(\mathbb{Z}) \Big| \begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix} \equiv \modd{\begin{pmatrix}
      1 &amp; *\\
      0 &amp; 1
  \end{pmatrix}} {N} \right\}\]
  \[\Gamma(N):=\left\{\begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix} \in \SL_2(\mathbb{Z}) \Big| \begin{pmatrix}
      a &amp; b\\
      c &amp; d
  \end{pmatrix} \equiv \modd{\begin{pmatrix}
      1 &amp; 0\\
      0 &amp; 1
  \end{pmatrix}} {N} \right\}.\]

Note that the following inclusions are true:
\[\Gamma(N) \subseteq \Gamma_1(N) \subseteq \Gamma_0(N) \subseteq \SL_2(\mathbb{Z}).\]

 Modular forms are complex functions on $\mathbb{H}$ that transforms nicely under these congruence subgroups of $\SL_2({\mathbb{Z}})$. For this paper, we are interested on modular forms transforming nicely with respect to $\Gamma_0(N)$ having a  Nebentypus character $\chi$ defined as follows. 


\begin{definition}
    Let $\chi$ be a Dirichlet character modulo $N$ (a positive integer). Then a modular form $f \in M_k(\Gamma_1(N))$ has \textit{Nebentypus character} $\chi$ if 
    \[f\left(\dfrac{az+b}{cz+d}\right)=\chi(d)(cz+d)^k f(z)\]
    for all $z \in \mathbb{H}$ and all $\begin{pmatrix}
        a &amp; b\\
        c &amp; d
    \end{pmatrix} \in \Gamma_0(N)$. 
    The space of all such modular forms is denoted $M_k(N,\chi)$.
\end{definition}


In particular, we look at modular forms involving the Dedekind eta function which is defined as follows.
\begin{definition}The \textit{Dedekind eta function} is the function $\eta(z)$ where $z \in  \mathbb{H}:$ 
    \[\eta(z) = e^{\frac{\pi iz}{12}} \prod_{n=1}^{\infty} (1-e^{2\pi i nz}).\]
   Defining $q:=e^{2\pi i z}$, we have:
    \[\eta(z)=q^{\frac{1}{24}} \prod_{n=1}^{\infty}(1-q^n).\]
\end{definition}

\begin{definition}
      A function $f(z)$ is called an \textit{eta-product} if it is expressible as  a finite product of the form
    \[f(z)=\prod_{\delta \mid N} \eta^{r_\delta}(\delta z)\]
    where $N$ and each $r_\delta$ is an integer.
\end{definition}


We use the next two theorems to prove that an eta-product is a holomorphic modular form.


\begin{theorem}[Gordon, Hughes, Newman] \label{gordon}
    If $f(z)= \prod_{\delta \mid N} \eta^{r_\delta}(\delta z)$ is an eta-product for which 
  \begin{align}\displaystyle \sum_{\delta \mid N} \delta r_{\delta} \equiv \modd{0} {24} \label{4} \end{align}
and
\begin{align}
\displaystyle \sum_{\delta \mid N} \dfrac{N}{\delta}r_{\delta} \equiv \modd{0} {24} \label{5}
\end{align}
then $f(z)$ satisfies
\[f(Az)=\chi(d)(cz+d)^kf(z)\]
for all $A=\begin{pmatrix}
a &amp; b\\
c &amp; d 
\end{pmatrix} \in \Gamma_0(N)$ where $k=\displaystyle \sum_{\delta \mid N} r_\delta$. Here the character $\chi$ is defined by $\chi(d)=\left(\dfrac{(-1)^ks}{d}\right)$ and $s=\displaystyle\prod_{\delta \mid N} \delta^{r_\delta}$.
\end{theorem}

\begin{theorem}[Ligozat] \label{ligozat}
    Let $c,d$ and $N$ be positive integers with $d \mid N$ and $\gcd(c,d)=1$. With the notation as above, if the eta-product $f(z)$ satisfies (\ref{4}) and (\ref{5}), then the order of vanishing of $f(z)$ at the cusp $\frac{c}{d}$ is 
         \[\dfrac{1}{24}\displaystyle\sum_{\delta \mid N} \dfrac{N\gcd(d,\delta)^2r_\delta}{\gcd\left(d,\frac{N}{d}\right)d\delta}.\]
\end{theorem}

\subsection{Proof of main result}

Before we prove Theorem \ref{main}, we prove two propositions first. 
\begin{proposition}\label{fourier}
     Let $k$ be a positive integer. Then
    \[f_{r,k}(z):=\dfrac{\eta(48z)\eta(24rz)^{2^k-1}}{\eta(24z)^2\eta(48rz)^{2^{k-1}-2}} \equiv \modd{\displaystyle\sum_{n=0}^\infty \srmexover{n}q^{24n+3r}} {2^k}.\]
\end{proposition}
   
\begin{proof}
Consider $$g(z)=\dfrac{\eta(24rz)^2}{\eta(48rz)}= \dfrac{(q^{24r};q^{24r})^2_\infty}{(q^{48r};q^{48r})_\infty}.$$
By the binomial theorem, $(q^r;q^r)^{2^k}_\infty \equiv \modd{(q^{2r};q^{2r})^{2^{k-1}}_\infty} {2^k}$. Thus we have 
\[(q^{24r};q^{24r})^{2^k}_\infty \equiv \modd{(q^{48r};q^{48r})^{2^{k-1}}_\infty} {2^k},\] and so \[g^{2^{k-1}}(z)=\dfrac{(q^{24r};q^{24r})^{2^k}_\infty}{(q^{48r};q^{48r})^{2^{k-1}}_\infty} \equiv \modd{1} {2^k}.\]
 Now, consider 
\begin{align*}
\dfrac{\eta(48z)\eta(48rz)^2}{\eta(24z)^2\eta(24rz)}\cdot  g^{2^{k-1}}(z)&amp;= \dfrac{\eta(48z)\eta(48rz)^2}{\eta(24z)^2\eta(24rz)}\cdot \dfrac{\eta(24rz)^{2^k}}{\eta(48rz)^{2^k-1}}\\
&amp;=\dfrac{\eta(48z)\eta(24rz)^{2^k-1}}{\eta(24z)^2\eta(48rz)^{2^{k-1}-2}}\\
&amp;=f_{r,k}(z).
\end{align*}
Observe that
\begin{align*}
    f_{r,k}(z)&amp;=\dfrac{\eta(48z)\eta(48rz)^2}{\eta(24z)^2\eta(24rz)}\cdot  g^{2^k-1}(z)\\
    &amp;\equiv \modd{\dfrac{\eta(48z)\eta(48rz)^2}{\eta(24z)^2\eta(24rz)}} {2^k}\\
    &amp;=q^{3r} \dfrac{(q^{48};q^{48})_\infty(q^{48r};q^{48r})^2_\infty}{(q^{24};q^{24})^2_\infty (q^{24r};q^{24r})_\infty}.
\end{align*}
Note that
\begin{align*}
    \displaystyle\sum_{n=0}^\infty \sigma_r\overline{\mex}(n)q^n &amp;= \dfrac{(-q;q)_\infty (q^{2r};q^{2r})_\infty}{(q;q)_\infty (q^{r};q^{2r})_\infty}\\
    &amp;=\dfrac{(-q;q)_\infty (q^{2r};q^{2r})^2_\infty}{(q;q)_\infty (q^{r};q^{r})_\infty}\\
    &amp;=\dfrac{(q^2;q^2)_\infty (q^{2r};q^{2r})^2_\infty}{(q;q)^2_\infty (q^{r};q^{r})_\infty}.
\end{align*}
Thus we have \[f_{r,k}(z) \equiv \modd{q^{3r}  \displaystyle\sum_{n=0}^\infty \sigma_r\overline{\mex}(n)q^{24n}} {2^k} =  \displaystyle\sum_{n=0}^\infty \sigma_r\overline{\mex}(n)q^{24n+3r}.\]
\end{proof}

\begin{proposition}
    Let  $r=2^m \cdot 3^n$ where $m,n \in \mathbb{Z}_{\geq 0}$ and $k \geq m+2n+1$ be an integer greater than 3. Then
$f_{r,k}(z) \in M_{2^{k-2}}(\Gamma_0(N),\chi)$, where \begin{displaymath}
N = \begin{cases}
  2^7 \cdot 3^{n+1}, &amp; \text{if $m=0,1,2$;}\\
  2^{m+4}\cdot 3^{n+1}, &amp; \text{if $m \geq 3$.}
\end{cases}
\end{displaymath}
\end{proposition}

 \begin{proof} 
 Let $r=2^m \cdot 3^n$ where $m,n \in \mathbb{Z}_{\geq 0}.$ First, the weight of $f_{r,k}(z)$ is
    \[\ell=\dfrac{1}{2}\displaystyle \sum_{\delta |N} r_{\delta} = \dfrac{1}{2}\left[1+(2^k-1)-2-(2^{k-1}-2)\right]=2^{k-1}-2^{k-2}=2^{k-2}.\]
Second, since $f_{r,k}(z)=\dfrac{\eta(48z)\eta(24rz)^{2^k-1}}{\eta(24z)^2\eta(48rz)^{2^{k-1}-2}},$ then $\delta_1=48, \delta_2=24r, \delta_3=24$ and $\delta_4=48r$ with $r_{48}=1, r_{24r}=2^k-1, r_{24}=-2,$ and $r_{48r}=2-2^{k-1}$. Clearly, $f_{r,k}(z)$ satisfies equation (\ref{4}) since
   \[\displaystyle \sum_{\delta | N} \delta r_\delta = 48\cdot 1 + 24r \cdot (2^k-1) + 24 \cdot (-2) + 48r \cdot (2-2^{k-1}) \equiv \modd{0} {24}.\]
    Moreover, to satisfy equation (\ref{5}), we can let $N=48ru$, where $u$ is the smallest positive integer satisfying 
    \[\displaystyle \sum_{\delta | N} \dfrac{N}{\delta} r_{\delta} \equiv \modd{0} {24}.\]
    Then we have 
    \begin{align*}
    \displaystyle \sum_{\delta | N} \dfrac{N}{\delta}r_\delta &amp;=\dfrac{48ru}{48}+\dfrac{48ru}{24r}(2^k-1)-\dfrac{48ru}{24}(2)-\dfrac{48ru}{48r}(2^{k-1}-2)\\
    &amp;=ru+2u(2^k-1)-4ru-u(2^{k-1}-2)\\
    &amp;=u(2^{k+1}-2^{k-1}-3r)\\
    &amp;=u(3\cdot 2^{k-1} -3r) \equiv \modd{0} {24}.
    \end{align*}
    We have the following:
\begin{itemize}
\item If $m=0$, then $u=8$, and so $N=48 \cdot (2^0\cdot3^n) \cdot 8 =2^7\cdot3^{n+1}$.
\item If $m=1$, then $u=4$, and so $N=48 \cdot (2^1\cdot3^n) \cdot 4 =2^7\cdot3^{n+1}$.
\item If $m=2$, then $u=2$, and so $N=48 \cdot (2^1\cdot3^n) \cdot 4 =2^7\cdot3^{n+1}$.
\item If $m\geq 3$, then $u=1$, and so  $N=48\cdot (2^m\cdot3^n)\cdot 1 =2^{m+4}\cdot3^{n+1}$. 
\end{itemize}    


To prove that $f_{r,k}(z) \in M_{2k-2}(\Gamma_0(N),\chi)$, it suffices to show that $f_{r,k}(z)$ is holomorphic at all cusps of $\Gamma_0(N)$. From Theorem \ref{ligozat}, the order of vanishing of $f_{r,k}(z)$ at the cusp $\frac{c}{d}$ where $d|N$ and gcd$(c,d)=1$, is

\[\dfrac{N}{24} \displaystyle \sum_{\delta |N} \dfrac{\gcd(d,\delta)^2r_\delta}{\gcd\left(d, \frac{N}{d}\right)d\delta}.\]
Hence $f_{r,k}(z)=\dfrac{\eta(48z)\eta(24rz)^{2^k-1}}{\eta(24z)^2\eta(48rz)^{2^{k-1}-2}}$ is holomorphic at the cusp $\frac{c}{d}$ if and only if
\[    \dfrac{N}{24} \displaystyle \sum_{\delta |N} \dfrac{\gcd(d,\delta)^2r_\delta}{\gcd\left(d, \frac{N}{d}\right)d\delta} \geq 0  \iff \displaystyle \sum_{\delta |N} \dfrac{\gcd(d,\delta)^2r_\delta}{\delta} \geq 0. \]
That is,   \[\dfrac{\gcd(d,48)^2}{48}-2\dfrac{\gcd(d,24)^2}{24}+(2^k-1)\dfrac{\gcd(d,24r)^2}{24r}-(2^{k-1}-2)\dfrac{\gcd(d,48r)^2}{48r} \geq 0.\]
 Equivalently, 
     \begin{equation}
          r\gcd(d,48)^2-4r\gcd(d,24)^2+(2^{k+1}-2)\gcd(d,24r)^2-(2^{k-1}-2)\gcd(d,48r)^2 \geq 0. \label{LHS}
     \end{equation}
    
Now, if $N=2^7\cdot 3^{n+1}$, then $d=2^t\cdot 3^s, 0 \leq t \leq 7, 0 \leq s \leq n+1$. Similarly, if $N=2^{m+4}\cdot 3^{n+1}$, then $d=2^t\cdot 3^s, 0 \leq t \leq m+4, 0 \leq s \leq n+1$. 

Let $(\star)$ be the left-hand side of inequality (\ref{LHS}). We now prove that $(\star) \geq 0$ for $k\geq m+2n+1$. We divide our proof into 6 cases.

\bigskip
\noindent \textit{Case 1:} $d=1$.

\noindent We have $\gcd(d,48)=1$, $\gcd(d,24)=1$, $\gcd(d,24r)=1$, and $\gcd(d,48r)=1$. Then
\begin{align*}
(\star) &amp;=(2^m\cdot3^n)-4(2^m\cdot3^n)+(2^{k+1}-2)-(2^{k-1}-2)\\
&amp;=2^{k+1}-2^{k-1}-3\cdot(2^m\cdot 3^n)\\
&amp;=3\cdot 2^{k-1} - 2^{m} \cdot 3^{n+1}.
\end{align*}
If we let $k \geq  m+2n+1$, then
\begin{align*}
3\cdot 2^{k-1} &amp;\geq 3\cdot 2^{m+2n}\\
&amp;=  3\cdot 2^{m} \cdot 2^{2n}\\
&amp;\geq  3\cdot 2^{m} \cdot 3^{n}\\
&amp; =  2^{m} \cdot 3^{n+1},
\end{align*}
 proving that $(\star) \geq 0$ for $k \geq m+2n+1$.

\bigskip
\noindent \textit{Case 2:} $d=3^s, 1 \leq s \leq n+ 1$.

\noindent We have $\gcd(d,48)=3$, $\gcd(d,24)=3$, $\gcd(d,24r)=\gcd(d, 2^{m+3}\cdot3^{n+1})=3^s$, and $\gcd(d,48r)=\gcd(d, 2^{m+4}\cdot3^{n+1})=3^s$. Then
\begin{align*}
(\star) &amp;=(2^m\cdot3^n)\cdot9 -4(2^m\cdot3^n)\cdot 9 +(2^{k+1}-2) \cdot 3^{2s}-(2^{k-1}-2)\cdot 3^{2s}\\
&amp;=3^{2s}\cdot 3\cdot 2^{k-1} - 3 \cdot 9 \cdot (2^m\cdot3^n)\\
&amp;=2^{k-1} \cdot 3^{2s+1} -2^m\cdot 3^{n+3}.
\end{align*}
If we let $k \geq  m+2n-4s+5$, then
\begin{align*}
 2^{k-1} \cdot 3^{2s+1} &amp; \geq 2^{m+2n-4s+4} \cdot 3^{2s+1} \\
&amp;=  2^{m} \cdot 2^{2n-4s+4} \cdot 3^{2s+1} \\
&amp;\geq 2^{m} \cdot 3^{n-2s+2} \cdot 3^{2s+1} \\
&amp; =  2^{m+4} \cdot 3^{n+3},
\end{align*}
proving that $(\star) \geq 0$ for $k \geq m+2n-4s+5$. Moreover, since $m+2n-4s+5 \leq m+2n+1$, it follows that $(\star) \geq 0$ for $k \geq m+2n+1$. 

\bigskip
\noindent \textit{Case 3:} $d=2^t, 0 &lt; t \leq 3$.

\noindent We have $\gcd(d,48)=2^t$, $\gcd(d,24)=2^t$, $\gcd(d,24r)=2^t$, and $\gcd(d,48r)=2^t$. Then
\begin{align*}
(\star) &amp;=(2^m\cdot3^n)\cdot2^{2t} -4(2^m\cdot3^n)\cdot 2^{2t} +(2^{k+1}-2) \cdot 2^{2t}-(2^{k-1}-2)\cdot 2^{2t}\\
&amp;=2^{2t}\cdot 3\cdot 2^{k-1} - 3 \cdot 2^{2t} \cdot (2^m\cdot3^n)\\
&amp;=2^{k+2t-1} \cdot 3 -2^{m+2t}\cdot 3^{n+1}.
\end{align*}
If we let $k \geq  m+2n+1$, then
\begin{align*}
 2^{k+2t-1} \cdot 3 &amp; \geq 2^{m+2n+2t} \cdot 3 \\
&amp;=  2^{m+2t} \cdot 2^{2n} \cdot 3\\
&amp;\geq 2^{m+2t} \cdot 3^{n} \cdot 3 \\
&amp; =  2^{m+2t} \cdot 3^{n+1},
\end{align*}
proving that $(\star) \geq 0$ for $k \geq m+2n+1$.

\bigskip
\noindent \textit{Case 4:} $d=2^t, 3&lt;t\leq m+4$.

\noindent We have $\gcd(d,48)=2^4$, $\gcd(d,24)=2^3$, $\gcd(d,24r)=\gcd(d, 2^{m+3}\cdot3^{n+1})=2^t$, and $\gcd(d,48r)=\gcd(d, 2^{m+4}\cdot3^{n+1})=2^t$. Then
\begin{align*}
(\star)&amp;=(2^m\cdot3^n)\cdot2^{8} -4(2^m\cdot3^n)\cdot 2^{6} +(2^{k+1}-2) \cdot 2^{2t}-(2^{k-1}-2)\cdot 2^{2t}\\
&amp;=2^{2t}\cdot 3\cdot 2^{k-1}\\
&amp;=2^{k+2t-1} \cdot 3 \geq 0 \text{ for } k \geq 1.
\end{align*}

\bigskip
\noindent \textit{Case 5:} $d=2^t \cdot 3^s, 0 &lt; t \leq 3, 1 \leq s \leq n+1$.

\noindent We have $\gcd(d,48)=2^t\cdot 3$, $\gcd(d,24)=2^t \cdot 3$, $\gcd(d,24r)=\gcd(d, 2^{m+3}\cdot3^{n+1})=2^t \cdot 3^s$, and $\gcd(d,48r)=\gcd(d, 2^{m+4}\cdot3^{n+1})=2^t \cdot 3^s$. Then
\begin{align*}
(\star)&amp;=(2^m\cdot3^n)\cdot(2^{2t}\cdot 3^2) -4(2^m\cdot3^n)\cdot(2^{2t}\cdot 3^2)+(2^{k+1}-2)\cdot(2^{2t}\cdot 3^{2s})\\
&amp;-(2^{k-1}-2)\cdot(2^{2t}\cdot 3^{2s})\\
&amp;=(2^{2t}\cdot 3^{2s}) \cdot 3\cdot 2^{k-1} - 3 \cdot(2^{2t}\cdot 3^2) \cdot (2^m\cdot3^n)\\
&amp;=2^{k+2t-1} \cdot 3^{2s+1} -2^{m+2t}\cdot 3^{n+3}.
\end{align*}
If we let $k \geq  m+2n-4s+5$, then
\begin{align*}
2^{k+2t-1} \cdot 3^{2s+1} &amp; \geq 2^{m+2n+2t-4s+4} \cdot 3^{2s+1} \\
&amp;=  2^{m+2t} \cdot 2^{2n-4s+4} \cdot 3^{2s+1}\\
&amp;\geq 2^{m+2t} \cdot 3^{n-2s+2} \cdot 3^{2s+1} \\
&amp; =  2^{m+2t} \cdot 3^{n+3},
\end{align*}
proving that $(\star) \geq 0$ for $k \geq m+2n-4s+5$. Moreover, since $m+2n-4s+5 \leq m+2n+1$, it follows that $(\star) \geq 0$ for $k \geq m+2n+1$.

\bigskip
\noindent \textit{Case 6:} $d=2^t \cdot 3^s, 3 &lt; t \leq m+4, 1 \leq s \leq n+1$.

\noindent We have $\gcd(d,48)=2^4\cdot 3$, $\gcd(d,24)=2^3 \cdot 3$, $\gcd(d,24r)=\gcd(d, 2^{m+3}\cdot3^{n+1})=2^t \cdot 3^s$, and $\gcd(d,48r)=\gcd(d, 2^{m+4}\cdot3^{n+2})=2^t \cdot 3^s$. Then
\begin{align*}
(\star)&amp;=(2^m\cdot3^n)\cdot(2^8\cdot 3^2) -4(2^m\cdot3^n)\cdot(2^6\cdot 3^2)+(2^{k+1}-2)\cdot(2^{2t}\cdot 3^{2s})\\
&amp;-(2^{k-1}-2)\cdot(2^{2t}\cdot 3^{2s})\\
&amp;=(2^{2t}\cdot 3^{2s}) \cdot 3\cdot 2^{k-1}\\
&amp;=2^{k+2t-1}\cdot 3^{2s+1} \geq 0 \text{ for } k \geq 1.
\end{align*}

In all possible cases, we have that $(\star) \geq 0$ for $k \geq m+2n+1$ where $k$ is a positive integer greater than 3. Hence by Theorem \ref{ligozat}, $f_{r,k}(z)$ is a modular form of weight $2^{k-2}$.

\end{proof}
Lastly, we will use Serre's theorem \cite{serre} regarding the coefficients of the Fourier expansion of a holomorphic modular form to prove our final result.

\begin{theorem} [Serre]
Let $k,m$ be positive integers. If $f(z) \in M_k(\Gamma_0(N), \chi)$ has Fourier expansion $f(z) = \sum_{n=0}^{\infty} c(n)q^n \in \mathbb{Z}[[q]]$, then there is a constant $\alpha &gt;0$ such that 
\[\#\{n\leq X: c(n) \not\equiv \modd{0} {m}\} = \mathcal{O}\left(\dfrac{X}{\log^\alpha X}\right).\]
\end{theorem}

\begin{proof}[Proof of Theorem \ref{main}]
Let $r = 2^m \cdot 3^n$ where $m,n \in \mathbb{Z}_{\geq 0}$ and  $k \geq m+2n+1, \, k \geq 3$ be a positive integer.  Since $f_{r,k}(z) \in M_{2^{k-2}}(\Gamma_0(N),\chi)$ and the Fourier coefficients of $f_{r,k}(z)$ are integers, then by Serre's theorem, we can find a constant $\alpha &gt;0$ such that 
\[\#\{n\leq X: \srmexover{n} \not\equiv \modd{0} {2^k}\} = \mathcal{O}\left(\dfrac{X}{\log^\alpha X}\right),\]
for $k \geq m+2n+1$. Then 
\[\displaystyle \lim_{X \to +\infty} \dfrac{\#\{n\leq X: \srmexover{n} \equiv \modd{0} {2^k}\}}{X}=1.\]

Equivalently, for  almost every nonnegative integer $n$ lying in an arithmetic progression, $\srmexover{n}$ is a multiple of $2^k$ where $r = 2^m \cdot 3^n$ where $m,n \in \mathbb{Z}_{\geq 0}$ and  $k \geq m+2n+1, k \geq 3$. Consequently, $\srmexover{n}$ is a multiple of $2^k$, where $k \geq 1$.
\end{proof}

\section{Acknowledgments}
We express our gratitude to Joshua Males and Aritram Dhar for their helpful comments and corrections on the initial draft of this paper.

\begin{thebibliography}{99}     

\bibitem{andrews2} G. E. Andrews, \textit{The Theory of Partitions,} 
 Addison-Wesley Publishing Company, 1976.

\bibitem{andrewsnewman} G. E. Andrews and D. Newman, Partitions and the minimal excludant, \textit{Ann. Comb.} \textbf{23} (2019), 249--254.

\bibitem{ballantinemerca}  C. Ballantine and M. Merca, Bisected theta series, least $r$-gaps in partitions, and polygonal numbers, \textit{Ramanujan J.} \textbf{52} (2020), 433--444.

\bibitem{bhorjaetal} S. C. Bhoria, P. Eyyunni, P. S. Kaur, and B. Maji, Minimal excludant over partitions into distinct parts,
/Serre: Command not found.


\bibitem{bringmann} K. Bringmann, C. Jennings-Shaffer, and  K. Mahlburg, On a Tauberian theorem of Ingham and Euler-Maclaurin summation, \textit{Ramanujan J.}  \textbf{61} (2023), 55--86.


\bibitem{chakrabortyray} K. Chakraborty and C. Ray, Distribution of generalized mex-related integer partitions, \textit{Hardy-Ramanujan J.} \textbf{43} (2021), 122--128.

\bibitem{dhar} A. Dhar, A. Mukhopadhyay, and R. Sarma, Generalization of the extended minimal
excludant of Andrews and Newman, \textit{J. Integer Sequences} \textbf{26} (2023).


\bibitem{grundy} P. Grundy, Mathematics and games, \textit{Eureka} \textbf{2} (1939), 6--9.

\bibitem{ingham} A. E. Ingham, A Tauberian theorem for partitions,  \textit{Ann. of Math (2)}  \textbf{42} (1941), 1075--1090.

\bibitem{jacobi} C. Jacobi, \textit{Fundamenta nova theoriae function ellipticarum}, Mathematische Werke \textbf{1} (1829), 49--239.


\bibitem{killford} L. Kilford, \textit{Modular Forms: A Classical and Computational Introduction}, Imperial College Press, 2008.

\bibitem{sprague} R. Sprague, \"{U}ber mathematische Kampfspiele, \textit{Tohoku Mathematical J.} \textbf{41} (1935), 438--444.

\bibitem{serre}  J.-P. Serre, Divisibilit\'e des coefficients des formes modulaires de poids entier,  \textit{C.R. Acad. Sci. Paris} \textbf{279} (1974), 679--682

\bibitem{yang}  J. Yang and L. Zhou, Identities on mex-related partitions, \textit{Ramanujan J.} \textbf{63} (2023), 1--25.
\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}: Primary 11P81; Secondary  05A17, 11P82, 11P83.

\noindent \emph{Keywords:} partition, minimal excludant, least gap,
modular form.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A001936} and \seqnum{A022568}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received October 20 2023;
revised versions received November 6 2023; August 15 2024; August 16 2024.
Published in {\it Journal of Integer Sequences},
August 16 2024.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{https://cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in

\end{document}
</pre></body></html>