Let $$ f(k,n,p) = {n \choose k}p^k(1-p)^{n-k} $$ be the binomial probability mass function. I want to maximize a function of binomial pmf's with respect to $n$: \begin{align*} g(n) \equiv &\left(1-\sum_{T=0}^{L}\sum_{t=0}^T f(t,n,p_A) \cdot f(T-t,N-n,p_B) \right)\\ \cdot &\left( \sum_{T=0}^{U}\sum_{t=0}^T f(t,n,p_A) \cdot f(T-t,N-n,p_B) \right) \end{align*} for fixed $L,U,N,\in \mathbb{Z}^+,\ p_A,p_B \in [0,1]$. In the case of a single binomial pmf, $f(n,k,p)$ is unimodal with respect to $n$ so one can find $n^* \equiv \operatorname{argmax} f(k,n,p)$ by finding $n$ such that: $$ f(k,n,p) \geq f(k,n+1,p)\qquad \text{and}\qquad f(k,n,p)\geq f(k,n-1,p) $$ which yields $$ \frac{k}{p} \geq n\geq \frac{k}{p}-1; $$ i.e., $f(k,n,p)$ for fixed $k,p$ is maximized by $$ n^* = \text{floor}\left(\frac{k}{p}\right). $$ Having tested empirically, I think $g(n)$ is also unimodal with respect to $n$, but haven't been able to prove it. Additionally, I have not been able to solve the analogous inequalities: $$ g(n) \geq g(n+1)\qquad g(n)\geq g(n-1) $$ (neither by hand nor using Mathematica).
Any suggestions for how to maximize $g(n)?$ I'd prefer to avoid differentiating if possible: I think a solution which only deals with integer values is more likely to provide illuminating intuition for the problem I'm working on, and gamma functions are well-defined on values that aren't admitted by my problem. That being said, if it's the only way to do this, so be it.
Edit for clarification: I am primarily interested in the case $L < U \leq N$.