\documentclass[12pt,reqno]{amsart} \usepackage[a4paper,margin=2.5cm,top=2.5cm,bottom=2.5cm,centering,headheight=3ex,headsep=4ex,vcentering]{geometry} \usepackage{amssymb,amsfonts,amsmath,amsthm,booktabs} \usepackage{orcidlink} %\usepackage{charter} %\usepackage[cal=cm,scr=euler]{mathalfa} \usepackage{microtype} \usepackage{mlmodern} \linespread{1.15} \numberwithin{equation}{section} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{conjecture}[theorem]{Conjecture} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \theoremstyle{remark} \newtheorem{remark}[theorem]{Remark} \newcommand{\NN}{\mathbb{N}} \newcommand{\ZZ}{\mathbb{Z}} \newcommand{\poch}{(q;q)_\infty} \newcommand{\podf}{\operatorname{pod}} \newcommand{\lead}{\mathrm{lead}} \DeclareMathOperator{\ord}{ord} \title[A truncated theta-type series with triangular weights] {A truncated theta-type series with triangular weights} \author[M. P. Saikia]{Manjil P. Saikia\,\orcidlink{0000-0002-2997-6731}} \address[M. P. Saikia]{Mathematical and Physical Sciences division, School of Arts \& Sciences, Ahmedabad University, Navrangpura, Ahmedabad 380009, Gujarat, India} \email{manjil.saikia@ahduni.edu.in} \subjclass[2020]{Primary 11P81; Secondary 05A17, 05A20, 11P84, 11B65} \keywords{Integer partitions; truncated theta series; partitions with odd parts distinct; positivity of $q$-series} %\date{Draft version of 04 October 2026; final version will contain some more details.} \begin{document} \begin{abstract} Merca (2026) recently introduced the two-block odd partition function $a(n)$, proved that its generating function factors as $A(q)=P(q)S(q)$, where $P(q)$ is the generating function of partitions whose odd parts are distinct and whose even parts are unrestricted and $S(q)$ is a theta-type series with triangular-number weights, and conjectured that for $N\equiv1,2\pmod 4$ the truncation $P(q)S_N(q)$ of this product has nonnegative coefficients, positive from $q^{3}$ onward. We prove the conjecture in the stronger form $P(q)S_N(q)-A(q)\in\NN[[q]]$. \end{abstract} \maketitle \section{Introduction}\label{sec:intro} Recently Merca \cite{Merca} defined the \emph{two-block odd partition function} $a(n)$ as the signed number of partitions of $n$ into exactly two distinct part sizes, each occurring an odd number of times: $a(n)$ counts the representations $n=(2r_1+1)x+(2r_2+1)y$ with $1\le x0}$. Among other things, Merca \cite{Merca} proved the following results. \begin{theorem}[{\cite[Theorem 1.1 and Corollary 1.2]{Merca}}]\label{thm:merca-a} For every $n\ge1$, \begin{equation}\label{eq:aformula} a(n)=\frac{\sigma(n)-\lambda(n)}{4}-\frac{\sigma(n/2)}{2}+\sigma(n/4). \end{equation} Consequently $a(n)\ge0$ for all $n\ge1$, with equality if and only if $n\in\{1,2\}$. \end{theorem} \begin{theorem}[{\cite[Theorem 1.3]{Merca}}]\label{thm:merca-fact} Let \begin{equation}\label{eq:P} P(q):=\sum_{n\ge0}\podf(n)q^{n}=\frac{(-q;q^{2})_\infty}{(q^{2};q^{2})_\infty} =\frac{(q^{2};q^{4})_\infty}{(q;q)_\infty} \end{equation} be the generating function of the partitions in which odd parts are distinct and even parts are unrestricted, and let \begin{equation}\label{eq:S} S(q):=\sum_{r\ge1}(-1)^{T_{r-1}}\,T_{\lceil r/2\rceil}\,q^{T_{r+1}} = q^{3}-q^{6}-3q^{10}+3q^{15}+6q^{21}-6q^{28}-10q^{36}+10q^{45}+\cdots. \end{equation} Then $A(q)=P(q)S(q)$. \end{theorem} For $N\ge1$ let $S_N(q)$ be the $N$-th partial sum of \eqref{eq:S} and let \begin{equation}\label{eq:FN} F_N(q):=P(q)\,S_N(q)=\frac{(q^{2};q^{4})_\infty}{(q;q)_\infty} \sum_{r=1}^{N}(-1)^{T_{r-1}}\,T_{\lceil r/2\rceil}\,q^{T_{r+1}}. \end{equation} Since $A=PS\in\NN[[q]]$ by Theorem~\ref{thm:merca-a}, it is natural to ask whether the truncations $F_N$ are nonnegative as well. This is what Merca conjectured. \begin{conjecture}\label{conj:Merca}\cite{Merca} If $N\equiv1,2\pmod4$, then $F_N(q)$ has nonnegative coefficients. Moreover, for all $n\ge3$ the coefficient of $q^{n}$ in $F_N(q)$ is positive. \end{conjecture} \noindent Our goal here is to prove this conjecture\footnote{We note that Jha \cite{Jha} has also announced a different proof of Conjecture \ref{conj:Merca}. The techniques used in Jha seems to be different from those used in the present work.}. We write $R_N:=S-S_N$ for the tail of the series \eqref{eq:S}, so that \begin{equation}\label{eq:reduction} F_N(q)=P(q)S_N(q)=A(q)-P(q)R_N(q). \end{equation} The main result of this note is that the second term is itself a series with nonpositive coefficients whenever $N\equiv1,2\pmod 4$. This is the exact analogue of the phenomenon behind the truncated pentagonal number theorem of Andrews and Merca \cite{AM12}, where the tail of the pentagonal series divided by $\poch$ has coefficients of constant sign. \begin{theorem}\label{thm:main} Let $N\equiv1, 2\pmod4$. Then \[ -P(q)R_N(q)\in\NN[[q]],\qquad\text{equivalently}\qquad P(q)S_N(q)-A(q)\in\NN[[q]]. \] In particular Conjecture \ref{conj:Merca} holds, that is, we have $F_N(q)\in\NN[[q]]$, and the coefficients of $q^{0},q^{1},q^{2}$ in $F_N$ vanish, and $[q^{n}]F_N\ge a(n)>0$ for every $n\ge3$. \end{theorem} Theorem~\ref{thm:main} is a consequence of two results which we state below, where the tail is divided by a finite product rather than by $P(q)^{-1}$. Both of these results are proved by the method of \cite{SS26}: explicit quasi-polynomial estimates for the number of partitions into a fixed finite set of parts, an exact evaluation of the resulting alternating polynomial sums, and a case analysis whose finitely many polynomial inequalities are certified by computer algebra. This method has been applied successfully to several open problems in the recent years: see for example the work of Zhou \cite{Zhou2024}, Yao \cite{Yao2024}, Chen and Yao \cite{ChenYao2025} and Liu \cite{Liu2024} for a sampler of this. \begin{theorem}\label{thm:N1} Let $k\ge0$ be even and $N=2k+1$ (that is, $N\equiv1\pmod4$). Then \[ \frac{-R_N(q)}{(1-q)(1-q^{3})(1-q^{5})}\in\NN[[q]]. \] \end{theorem} \begin{theorem}\label{thm:N2} Let $k\ge0$ be even and $N=2k+2$ (that is, $N\equiv2\pmod4$). Then \[ \frac{-R_N(q)}{(1-q)(1-q^{3})(1-q^{4})(1-q^{5})(1-q^{7})}\in\NN[[q]]. \] \end{theorem} The rest of the paper is organized as follows: Section~\ref{sec:prelim} rewrites $S$, its truncations and its tails in a convenient paired form, records the elementary factorisation of $P(q)$ that we need, and proves the reduction of Theorem~\ref{thm:main} to Theorems~\ref{thm:N1} and~\ref{thm:N2}. Section~\ref{sec:tools} collects all the necessary tools that we need: quasi-polynomials for partitions into the parts of $\{1,3,5\}$ and of $\{1,3,4,5,7\}$, an exact summation formula for alternating sums of polynomials, and two elementary positivity criteria for polynomials on an interval. Sections~\ref{sec:N1} and~\ref{sec:N2} prove Theorems~\ref{thm:N1} and~\ref{thm:N2} respectively. The explicit polynomials needed in Section~\ref{sec:N1} are displayed there; those needed in Section~\ref{sec:N2} are given in Appendix~\ref{app:N2}. \section{Preliminary Results and a Reduction}\label{sec:prelim} We use the following notation throughout. For $m\ge1$ put \begin{equation}\label{eq:ab} a_m:=m(2m+1)=T_{2m},\qquad b_m:=(m+1)(2m+1)=T_{2m+1}, \end{equation} so that \begin{equation}\label{eq:gaps} b_m-a_m=2m+1,\qquad a_{m+1}-b_m=2m+2,\qquad a_{m+1}-a_m=4m+3, \end{equation} and $a_10$, and let $L>0$. If \[ \varphi(0)\ge0,\qquad \varphi(L)\ge0,\qquad A_0-A_2L^{2}\ge0, \] then $\varphi(u)\ge0$ for all $u\in[0,L]$. The same conclusion holds if $\varphi(0)\ge0$ and $A_1\ge0$. \end{lemma} \begin{proof} Put $u^{*}:=-A_1/(2A_2)$. Completing the square gives us \[ \varphi(u)=A_2\,(u-u^{*})^{2}+\varphi(u^{*}),\qquad \varphi(u^{*})=A_0-\frac{A_1^{2}}{4A_2}, \] so $\varphi$ is decreasing on $(-\infty,u^{*}]$ and increasing on $[u^{*},\infty)$. We distinguish three cases according to the position of $u^{*}$. \emph{Case $u^{*}\le0$.} Then $\varphi$ is increasing on $[0,L]$, so $\varphi(u)\ge\varphi(0)\ge0$ for $u\in[0,L]$. \emph{Case $u^{*}\ge L$.} Then $\varphi$ is decreasing on $[0,L]$, so $\varphi(u)\ge\varphi(L)\ge0$ for $u\in[0,L]$. \emph{Case $00$ and $0\ A_0-A_2L^{2}\ \ge\ 0 \qquad(u\in[0,L]). \] This proves the first assertion. For the second, note that $A_1\ge0$ is equivalent to $u^{*}\le0$, so we are in the first case and $\varphi(u)\ge\varphi(0)\ge0$ for all $u\ge0$. \end{proof} \begin{lemma}\label{lem:bernstein} Let $p(u)=\sum_{j=0}^{d}c_ju^{j}$ be a polynomial of degree at most $d$ and let $L>0$. Define \begin{equation}\label{eq:bern} \beta_i:=\sum_{j=0}^{i}\frac{\binom{i}{j}}{\binom{d}{j}}\,c_jL^{j}\qquad(0\le i\le d). \end{equation} Then \[p(Lx)=\sum_{i=0}^{d}\beta_i\binom{d}{i}x^{i}(1-x)^{d-i},\] and consequently $\beta_0,\dots,\beta_d\ge0$ implies $p(u)\ge0$ for all $u\in[0,L]$. \end{lemma} \begin{proof} We have \begin{align*} x^{j}&=x^{j}(x+(1-x))^{d-j}\\ &=\sum_{i=j}^{d}\binom{d-j}{i-j}x^{i}(1-x)^{d-i} \\&=\sum_{i=j}^{d}\frac{\binom{i}{j}}{\binom{d}{j}}\binom{d}{i}x^{i}(1-x)^{d-i}, \end{align*} where in the last step, we used $\binom{d-j}{i-j}\binom{d}{j}=\binom{d}{i}\binom{i}{j}$. Multiplying the $j$-th identity by $c_jL^{j}$ and summing over $0\le j\le d$, the left-hand side becomes $p(Lx)$, while on the right-hand side the coefficient of $\binom{d}{i}x^{i}(1-x)^{d-i}$ is $\sum_{j\le i}\binom{i}{j}\binom{d}{j}^{-1}c_jL^{j}=\beta_i$; this proves, for all real $x$, we have \[p(Lx)=\sum_{i=0}^{d}\beta_i\binom{d}{i}x^{i}(1-x)^{d-i}.\] Now let $u\in[0,L]$ and put $x=u/L\in[0,1]$. Then $x\ge0$ and $1-x\ge0$, so each $\binom{d}{i}x^{i}(1-x)^{d-i}$ is nonnegative, and if $\beta_0,\dots,\beta_d\ge0$ then $p(u)=p(Lx)\ge0$. \end{proof} \section{Proof of Theorem~\ref{thm:N1}: the case $N\equiv1\pmod4$}\label{sec:N1} Throughout this section, $k\ge0$ is an even integer and $N=2k+1$. By \eqref{eq:tail1} and Lemma~\ref{lem:o3}, we can write \begin{equation}\label{eq:bkgf} \frac{-R_N(q)}{(1-q)(1-q^{3})(1-q^{5})}=\sum_{n\ge0}b_k(n)\,q^{n}, \end{equation} where \begin{equation}\label{eq:bk} b_k(n):=T_{k+1}\,o_3(n-b_{k+1})+\sum_{m\ge k+2}(-1)^{m}T_m\bigl(o_3(n-a_m)-o_3(n-b_m)\bigr), \end{equation} with the convention $o_3(x)=0$ for $x<0$. Thus, to prove Theorem~\ref{thm:N1}, it suffices to show that $b_k(n)\ge0$ for all integers $n\ge0$. Note that, since $o_3$ is nondecreasing, the $m$-th summand in \eqref{eq:bk} is nonnegative for even $m$ and nonpositive for odd $m$. For $m_0\ge k+2$ we define the partial sums \begin{equation}\label{eq:Bpartial} B(n,k,m_0):=T_{k+1}\,o_3(n-b_{k+1})+\sum_{m=k+2}^{m_0-1}(-1)^{m}T_m\bigl(o_3(n-a_m)-o_3(n-b_m)\bigr), \end{equation} so that $B(n,k,k+2)=T_{k+1}o_3(n-b_{k+1})$. The following lemma, which is the analogue of \cite[Lemma 2.2]{SS26} and of \cite[Lemma 2.3]{ChenYao2025}, gives a polynomial lower bound for these partial sums. \begin{lemma}\label{lem:Bbound} Let $k\ge0$ be even, $m_0\ge k+2$ and $n\ge b_{m_0-1}$ be integers. Then \begin{equation}\label{eq:Bbound} B(n,k,m_0)\ \ge\ \Phi(n,k,m_0):=\Phi_0(n,k)+(m_0^{3}-m_0)\Bigl((-1)^{m_0}\,\frac{2m_0^{2}-n-8}{30}-\frac{11}{90}\Bigr), \end{equation} where \begin{multline}\label{eq:Phi0} \Phi_0(n,k):=\frac{(k+1)(k+2)}{60}\,n^{2} -\Bigl(\frac{k^{4}}{15}+\frac{2k^{3}}{5}+\frac{41k^{2}}{60}+\frac{k}{4}-\frac1{10}\Bigr)n\\ +\frac{k^{6}}{15}+\frac{3k^{5}}{5}+\frac{107k^{4}}{60}+\frac{82k^{3}}{45}+\frac{7k^{2}}{60}-\frac{k}{18}+\frac25 . \end{multline} \end{lemma} \begin{proof} Since $n\ge b_{m_0-1}$, all the arguments of $o_3$ in \eqref{eq:Bpartial} are nonnegative, so we may use Lemma~\ref{lem:o3} for each of them. By \eqref{eq:o3}, for all $x,y\ge0$ we have $o_3(x)\ge Q(x)-\frac{49}{120}$ and $o_3(x)-o_3(y)\ge Q(x)-Q(y)-\frac{49}{120}-\frac{39}{120} =Q(x)-Q(y)-\frac{11}{15}$, and the same with the roles of $x$ and $y$ interchanged. Hence \begin{align} B(n,k,m_0)&\ge T_{k+1}\Bigl(Q(n-b_{k+1})-\frac{49}{120}\Bigr)\notag\\ &\quad+\sum_{m=k+2}^{m_0-1}\Bigl((-1)^{m}T_m\bigl(Q(n-a_m)-Q(n-b_m)\bigr)-\frac{11}{15}T_m\Bigr).\label{eq:Bstep1} \end{align} A short computation using \eqref{eq:ab} gives \[ Q(n-a_m)-Q(n-b_m)=\frac{(b_m-a_m)\bigl(2n-a_m-b_m+9\bigr)}{30} =\frac{(2m+1)\bigl(n-2m^{2}-2m+4\bigr)}{15}, \] so that $T_m\bigl(Q(n-a_m)-Q(n-b_m)\bigr)=\dfrac{f(m)}{30}$ with \[ f(m):=m(m+1)(2m+1)\bigl(n-2m^{2}-2m+4\bigr). \] One checks directly that the polynomial $g(m):=-(m^{3}-m)(2m^{2}-n-8)$ satisfies $g(m)+g(m+1)=f(m)$. Therefore, by Lemma~\ref{lem:altsum} (recall that $k+2$ is even) and by \eqref{eq:sumT}, we have \[ \sum_{m=k+2}^{m_0-1}(-1)^{m}f(m)=g(k+2)+(-1)^{m_0-1}g(m_0), \] and \[ \sum_{m=k+2}^{m_0-1}T_m=\binom{m_0+1}{3}-\binom{k+3}{3}. \] Substituting these into \eqref{eq:Bstep1}, we obtain \begin{align*} B(n,k,m_0)&\ge\frac{T_{k+1}\bigl((2(n-b_{k+1})+9)^{2}-49\bigr)}{120} +\frac{g(k+2)-(-1)^{m_0}g(m_0)}{30}\\ &\quad-\frac{11}{15}\Bigl(\binom{m_0+1}{3}-\binom{k+3}{3}\Bigr)\\ &=\Phi_0(n,k)+(-1)^{m_0}\,\frac{(m_0^{3}-m_0)(2m_0^{2}-n-8)}{30}-\frac{11}{90}\,(m_0^{3}-m_0), \end{align*} where $\Phi_0(n,k)$ collects all the terms which do not involve $m_0$, namely \[\Phi_0(n,k)=\frac{T_{k+1}((2(n-b_{k+1})+9)^{2}-49)}{120}+\frac{g(k+2)}{30}+\frac{11}{15}\binom{k+3}{3}.\] Expanding this expression gives \eqref{eq:Phi0} which proves the lemma. \end{proof} We are now ready to prove Theorem~\ref{thm:N1}. The argument follows the pattern of \cite[Lemma 2.4]{SS26} and \cite[Section 2.1]{ChenYao2025}: we locate $n$ in one of the intervals $[a_M,a_{M+1})$, $M\ge k+2$, which partition $\{n:\,n\ge a_{k+2}\}$, and in each of four cases we bound $b_k(n)$ from below by an explicit polynomial using Lemma~\ref{lem:Bbound} and Lemma~\ref{lem:o3}. The resulting polynomials are quadratic in the position of $n$ inside the interval, and their nonnegativity is established by Lemma~\ref{lem:interval} after expanding them in the variables $\kappa,s\ge0$ defined by \begin{equation}\label{eq:subst} k=2\kappa,\qquad M=\begin{cases}2\kappa+2+s,&M\ \text{even},\\ 2\kappa+3+s,&M\ \text{odd}.\end{cases} \end{equation} \begin{proof}[Proof of Theorem~\ref{thm:N1}] We show that $b_k(n)\ge0$ for all $n\ge0$. If $n0$ and $A_0\ge0$. We apply Lemma~\ref{lem:interval} on the interval $[0,L]$ with $L=2M=4\kappa+2s+4$. The value at $t=L$ is \begin{align*} 90\,(A_2L^{2}+A_1L+A_0)&=384 \kappa^{4} s^{2} + 960 \kappa^{4} s + 480 \kappa^{4} + 192 \kappa^{3} s^{3} + 1872 \kappa^{3} s^{2} + 4152 \kappa^{3} s \\ &\quad + 2424 \kappa^{3} + 24 \kappa^{2} s^{4} + 552 \kappa^{2} s^{3} + 3162 \kappa^{2} s^{2} + 6426 \kappa^{2} s + 4380 \kappa^{2} \\ &\quad + 36 \kappa s^{4} + 468 \kappa s^{3} + 2139 \kappa s^{2} + 4329 \kappa s + 3408 \kappa + 9 s^{4} + 106 s^{3} \\ &\quad + 513 s^{2} + 1142 s + 972\ \ge0, \end{align*} and \begin{align} 90\,(A_0-A_2L^{2})&=384 \kappa^{4} s^{2} + 576 \kappa^{4} s - 96 \kappa^{4} + 192 \kappa^{3} s^{3} + 1584 \kappa^{3} s^{2} + 2232 \kappa^{3} s \notag\\ &\quad - 216 \kappa^{3} + 24 \kappa^{2} s^{4} + 504 \kappa^{2} s^{3} + 2226 \kappa^{2} s^{2} + 2562 \kappa^{2} s - 84 \kappa^{2} \notag\\ &\quad + 36 \kappa s^{4} + 348 \kappa s^{3} + 933 \kappa s^{2} + 759 \kappa s + 96 \kappa + 3 s^{4} - 5 s^{3} - 78 s^{2} \notag\\ &\quad - 100 s + 60.\label{eq:c1gap} \end{align} We distinguish three sub-cases. \begin{itemize} \item If $s=0$, then by \eqref{eq:c1A1} $A_1=\frac{2}{15}(\kappa+1)^{2}(4\kappa+11)>0$, and the last assertion of Lemma~\ref{lem:interval} gives $b_k(n)\ge A_0\ge0$. \item If $\kappa\ge1$ and $s\ge1$, we replace $\kappa$ by $\kappa+1$ and $s$ by $s+1$ in \eqref{eq:c1gap}; the resulting polynomial in $\kappa,s\ge0$ has only nonnegative coefficients, so $A_0-A_2L^{2}\ge0$ and Lemma~\ref{lem:interval} gives $b_k(n)\ge0$. \item If $\kappa=0$ and $s\ge1$, then $60A_1=-2s^{3}+5s^{2}+59s+88$, which is positive for $1\le s\le7$ (its value at $s=7$ is $60$), so again $b_k(n)\ge A_0\ge0$ for these $s$. For $s\ge8$, \eqref{eq:c1gap} reduces to $3s^{4}-5s^{3}-78s^{2}-100s+60$, and replacing $s$ by $s+8$ gives $3s^{4}+91s^{3}+954s^{2}+3836s+3996>0$; hence $A_0-A_2L^{2}\ge0$ and Lemma~\ref{lem:interval} applies. \end{itemize} Thus $b_k(n)\ge0$ in Case 1. \medskip\noindent\textbf{Case 2.} $a_M\le n\le b_M-1$ and $M$ is odd. Write $M=2\kappa+3+s$ as in \eqref{eq:subst}. By \eqref{eq:bk-split}, Lemma~\ref{lem:Bbound} and \eqref{eq:o3}, \[ b_k(n)=B(n,k,M)-T_M\,o_3(t)\ \ge\ \Phi(n,k,M)-T_M\Bigl(Q(t)+\frac{39}{120}\Bigr)=:\psi(t). \] Here $\psi$ is a quadratic polynomial in $t$ with leading coefficient $-\frac{1}{60}(4\kappa s+8\kappa+s^{2}+7s+10)<0$, so $\psi$ is concave and $\psi(t)\ge\min\{\psi(0),\psi(2M)\}$ for $0\le t\le 2M$. Now \begin{align*} 90\,\psi(0)&=384 \kappa^{4} s^{2} + 1344 \kappa^{4} s + 1152 \kappa^{4} + 192 \kappa^{3} s^{3} + 2160 \kappa^{3} s^{2} \\ &\quad + 6456 \kappa^{3} s + 5808 \kappa^{3} + 24 \kappa^{2} s^{4} + 600 \kappa^{2} s^{3} + 4194 \kappa^{2} s^{2} \\ &\quad + 11286 \kappa^{2} s + 10212 \kappa^{2} + 36 \kappa s^{4} + 588 \kappa s^{3} + 3417 \kappa s^{2} + 8361 \kappa s \\ &\quad + 7182 \kappa + 15 s^{4} + 205 s^{3} + 1008 s^{2} + 2084 s + 1536,\\ 90\,\psi(2M)&=384 \kappa^{4} s^{2} + 1728 \kappa^{4} s + 1920 \kappa^{4} + 192 \kappa^{3} s^{3} + 2448 \kappa^{3} s^{2} \\ &\quad + 8664 \kappa^{3} s + 9072 \kappa^{3} + 24 \kappa^{2} s^{4} + 648 \kappa^{2} s^{3} + 5106 \kappa^{2} s^{2} \\ &\quad + 15150 \kappa^{2} s + 14676 \kappa^{2} + 36 \kappa s^{4} + 660 \kappa s^{3} + 4083 \kappa s^{2} + 10287 \kappa s \\ &\quad + 8946 \kappa + 15 s^{4} + 196 s^{3} + 918 s^{2} + 1805 s + 1266, \end{align*} both of which are clearly positive. Thus $b_k(n)\ge0$ in Case 2. \medskip\noindent\textbf{Case 3.} $b_M\le n\le a_{M+1}-1$ and $M$ is even. Write $M=2\kappa+2+s$ and $t=2M+1+u$, so that $0\le u\le 2M+1$. By \eqref{eq:bk-split} and Lemma~\ref{lem:Bbound} (applied with $m_0=M+1$, which is odd), \begin{align*} 90\,b_k(n)&\ge90\,\Phi(n,k,M+1)\\ &=384 \kappa^{4} s^{2} + 960 \kappa^{4} s + 480 \kappa^{4} + 192 \kappa^{3} s^{3} + 1872 \kappa^{3} s^{2} + 96 \kappa^{3} s u \\ &\quad + 4248 \kappa^{3} s + 144 \kappa^{3} u + 2568 \kappa^{3} + 24 \kappa^{2} s^{4} + 552 \kappa^{2} s^{3} + 24 \kappa^{2} s^{2} u \\ &\quad + 3186 \kappa^{2} s^{2} + 312 \kappa^{2} s u + 6738 \kappa^{2} s + 6 \kappa^{2} u^{2} + 486 \kappa^{2} u + 4728 \kappa^{2} \\ &\quad + 36 \kappa s^{4} + 468 \kappa s^{3} + 54 \kappa s^{2} u + 2193 \kappa s^{2} + 354 \kappa s u + 4551 \kappa s \\ &\quad + 9 \kappa u^{2} + 513 \kappa u + 3582 \kappa + 9 s^{4} + 3 s^{3} u + 109 s^{3} + 39 s^{2} u + 519 s^{2} \\ &\quad + 144 s u + 1121 s + 3 u^{2} + 171 u + 942, \end{align*} which is clearly positive for all $\kappa,s,u\ge0$. Thus $b_k(n)\ge0$ in Case 3. \medskip\noindent\textbf{Case 4.} $b_M\le n\le a_{M+1}-1$ and $M$ is odd. Write $M=2\kappa+3+s$ and $t=2M+1+u$ with $0\le u\le L:=2M+1=4\kappa+2s+7$. By \eqref{eq:bk-split} and Lemma~\ref{lem:Bbound} (applied with $m_0=M+1$, which is even), \[ b_k(n)\ \ge\ \Phi(n,k,M+1)=:A_2u^{2}+A_1u+A_0, \] where \begin{align*} 30\,A_2&=(\kappa+1)(2\kappa+1),\\ 30\,A_1&=32 \kappa^{3} s + 64 \kappa^{3} + 8 \kappa^{2} s^{2} + 96 \kappa^{2} s + 178 \kappa^{2} + 6 \kappa s^{2} + 58 \kappa s + 119 \kappa - s^{3} \\ &\quad - 8 s^{2} - 17 s - 1,\\ 90\,A_0&=384 \kappa^{4} s^{2} + 1728 \kappa^{4} s + 1920 \kappa^{4} + 192 \kappa^{3} s^{3} + 2448 \kappa^{3} s^{2} \\ &\quad + 8760 \kappa^{3} s + 9264 \kappa^{3} + 24 \kappa^{2} s^{4} + 648 \kappa^{2} s^{3} + 5130 \kappa^{2} s^{2} \\ &\quad + 15438 \kappa^{2} s + 15204 \kappa^{2} + 36 \kappa s^{4} + 660 \kappa s^{3} + 4101 \kappa s^{2} + 10461 \kappa s \\ &\quad + 9294 \kappa + 15 s^{4} + 193 s^{3} + 894 s^{2} + 1754 s + 1260. \end{align*} Note that $A_1$ may be negative (for $\kappa=0$ it equals $-(s^{3}+8s^{2}+17s+1)/30$), so the minimum of this quadratic over the real line need not be nonnegative, and we use Lemma~\ref{lem:interval} instead. We have $A_2>0$, $A_0>0$, \begin{align*} 90\,(A_2L^{2}+A_1L+A_0)&=384 \kappa^{4} s^{2} + 2112 \kappa^{4} s + 2784 \kappa^{4} + 192 \kappa^{3} s^{3} + 2736 \kappa^{3} s^{2} \\ &\quad + 11064 \kappa^{3} s + 13224 \kappa^{3} + 24 \kappa^{2} s^{4} + 696 \kappa^{2} s^{3} + 5970 \kappa^{2} s^{2} \\ &\quad + 19530 \kappa^{2} s + 21216 \kappa^{2} + 36 \kappa s^{4} + 684 \kappa s^{3} + 4515 \kappa s^{2} + 12489 \kappa s \\ &\quad + 12390 \kappa + 9 s^{4} + 124 s^{3} + 636 s^{2} + 1475 s + 1386>0, \end{align*} and \begin{align*} 90\,(A_0-A_2L^{2})&=384 \kappa^{4} s^{2} + 1728 \kappa^{4} s + 1824 \kappa^{4} + 192 \kappa^{3} s^{3} + 2448 \kappa^{3} s^{2} \\ &\quad + 8664 \kappa^{3} s + 8784 \kappa^{3} + 24 \kappa^{2} s^{4} + 648 \kappa^{2} s^{3} + 5106 \kappa^{2} s^{2} \\ &\quad + 15126 \kappa^{2} s + 14358 \kappa^{2} + 36 \kappa s^{4} + 660 \kappa s^{3} + 4065 \kappa s^{2} + 10161 \kappa s \\ &\quad + 8685 \kappa + 15 s^{4} + 193 s^{3} + 882 s^{2} + 1670 s + 1113>0. \end{align*} By Lemma~\ref{lem:interval}, $b_k(n)\ge0$ for $0\le u\le L$, which is Case 4. \medskip We have shown that $b_k(n)\ge0$ for all $n\ge0$, and Theorem~\ref{thm:N1} now follows from \eqref{eq:bkgf}. \end{proof} \section{Proof of Theorem~\ref{thm:N2}: the case $N\equiv2\pmod4$}\label{sec:N2} Throughout this section, $k\ge0$ is an even integer, $N=2k+2$, and $\alpha=\alpha_{\{1,3,4,5,7\}}$ is as in Lemma~\ref{lem:alpha5}. By \eqref{eq:tail2}, \begin{equation}\label{eq:ckgf} \frac{-R_N(q)}{(1-q)(1-q^{3})(1-q^{4})(1-q^{5})(1-q^{7})}=\sum_{n\ge0}c_k(n)\,q^{n}, \end{equation} where \begin{equation}\label{eq:ck} c_k(n):=\sum_{m\ge k+2}(-1)^{m}T_m\bigl(\alpha(n-a_m)-\alpha(n-b_m)\bigr), \end{equation} with $\alpha(x)=0$ for $x<0$, and it suffices to show that $c_k(n)\ge0$ for all $n\ge0$. The proof runs parallel to that of Theorem~\ref{thm:N1}, with Lemma~\ref{lem:alpha5} in place of Lemma~\ref{lem:o3}: there is no leading term, the main terms are now of degree $4$ in $n$, and the final positivity check uses Lemma~\ref{lem:bernstein} instead of Lemma~\ref{lem:interval}. For $m_0\ge k+2$ let \begin{equation}\label{eq:Cpartial} C(n,k,m_0):=\sum_{m=k+2}^{m_0-1}(-1)^{m}T_m\bigl(\alpha(n-a_m)-\alpha(n-b_m)\bigr), \end{equation} an empty sum when $m_0=k+2$. Recall $E=\eta_{\max}-\eta_{\min}=\frac{1067}{1260}$ from Lemma~\ref{lem:alpha5}. \begin{lemma}\label{lem:Cbound} Let $k\ge0$ be even, $m_0\ge k+2$ and $n\ge b_{m_0-1}$ be integers. Then \begin{equation}\label{eq:Cbound} C(n,k,m_0)\ \ge\ \Phi_2(n,k,m_0):=\Phi_{2,0}(n,k) +(m_0^{3}-m_0)\Bigl((-1)^{m_0}\,\frac{W(m_0,n)}{20160}-\frac{1067}{7560}\Bigr), \end{equation} where \begin{multline}\label{eq:W} W(m,n):=32m^{6}-48m^{4}n-736m^{4}+24m^{2}n^{2}+692m^{2}n+5322m^{2}\\ -4n^{3}-162n^{2}-2272n-11725 \end{multline} and \begin{align} \Phi_{2,0}(n,k)&:=\Bigl(\frac{k^{3}}{5040}+\frac{k^{2}}{840}+\frac{11k}{5040}+\frac{1}{840}\Bigr)n^{3}\notag\\ &\quad-\Bigl(\frac{k^{5}}{840}+\frac{k^{4}}{84}+\frac{43k^{3}}{1120}+\frac{67k^{2}}{1680}-\frac{5k}{672}-\frac{11}{560}\Bigr)n^{2}\notag\\ &\quad+\Bigl(\frac{k^{7}}{420}+\frac{k^{6}}{30}+\frac{823k^{5}}{5040}+\frac{151k^{4}}{504}+\frac{61k^{3}}{5040}-\frac{229k^{2}}{504}-\frac{55k}{252}+\frac{17}{210}\Bigr)n\notag\\ &\quad-\frac{k^{9}}{630}-\frac{k^{8}}{35}-\frac{4k^{7}}{21}-\frac{8k^{6}}{15}-\frac{3029k^{5}}{10080}+\frac{6359k^{4}}{5040}\notag\\ &\quad+\frac{106861k^{3}}{60480}+\frac{559k^{2}}{3360}+\frac{29501k}{60480}+\frac{9031}{10080}.\label{eq:Phi20} \end{align} \end{lemma} \begin{proof} As in the proof of Lemma~\ref{lem:Bbound}, all arguments of $\alpha$ are nonnegative, and \eqref{eq:alpha5} gives $\pm\bigl(\alpha(x)-\alpha(y)\bigr)\ge\pm\bigl(P_4(x)-P_4(y)\bigr)-E$ for $x,y\ge0$. Hence \[ C(n,k,m_0)\ge\sum_{m=k+2}^{m_0-1}\bigl((-1)^{m}f_2(m)-E\,T_m\bigr),\] and\[ f_2(m):=T_m\bigl(P_4(n-a_m)-P_4(n-b_m)\bigr). \] Here $f_2$ is a polynomial of degree $9$ in $m$ (and of degree $3$ in $n$, the terms in $n^{4}$ cancelling), and one verifies that the polynomial \[ g_2(m):=-\frac{(m^{3}-m)\,W(m,n)}{20160} \] satisfies $g_2(m)+g_2(m+1)=f_2(m)$. By Lemma~\ref{lem:altsum} and \eqref{eq:sumT}, \begin{align*} C(n,k,m_0)&\ge g_2(k+2)+(-1)^{m_0-1}g_2(m_0)-E\Bigl(\binom{m_0+1}{3}-\binom{k+3}{3}\Bigr)\\ &=\Phi_{2,0}(n,k)+(-1)^{m_0}\frac{(m_0^{3}-m_0)W(m_0,n)}{20160}-\frac{1067}{7560}(m_0^{3}-m_0), \end{align*} where $\Phi_{2,0}(n,k)=g_2(k+2)+E\binom{k+3}{3}$ collects the terms free of $m_0$; expanding gives \eqref{eq:Phi20}. \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:N2}] If $n