TITLE: Splitting the integers from $1$ to $2n$ into two sets with products as close as possible
QUESTION [25 upvotes]: For each positive integer $n$, split the integers $1$ to $2n$ into two sets of $n$ elements each, and such that the products of the elements in each of these sets are as close as possible, say they differ by $a(n)$.
It can be checked that $a(1)=1$, $a(2)=2$, $a(3)=6$, $a(4)=18$, and $a(5)=30$.
Is this sequence strictly increasing?
What about if it is not required that the two sets contain the same number of elements?

REPLY [9 votes]: $\newcommand{\sub}[1]{_{\substack{m\in[1,2n] \\ #1}}}$
$\newcommand{\td}{{\widetilde d}}$
$\renewcommand{\cP}{{\mathcal P}}$
For the growth rate, we have the upper bound $a_n\le 2^nn!$ and,
conditionally to the abc conjecture, the nearly-matching lower bound
$a_n>ce^{-2(1+\varepsilon)n}\sqrt{(2n)!}$, for any fixed $\varepsilon>0$,
with a constant $c$ depending on $\varepsilon$. Unconditional lower bounds
seem to be much subtler; in this direction, I will show that
$a_n>e^{(1+o(1))(\ln n\ln\ln n)^c}$ with an absolute constant $c>0$ (one can
take $c=1/5$).
The upper bound $a_n\le 2^nn!$ can be obtained as follows. Let $X_1:=1$,
$Y_1:=2$, and
$$ X_n:=\min\{(2n-1)Y_{n-1},2nX_{n-1}\},
                 \ Y_n:=\max\{(2n-1)Y_{n-1},2nX_{n-1}\}, \quad n\ge 2. $$
Clearly, one can partition $[1,2n]$ into two equal-sized subsets so that the
product of all elements of the first subset is $X_n$, while for the second
subset, the product is $Y_n$.
We notice that $X_n\le 2^nn!$ by a straightforward induction. Moreover,
arguing inductively, we obtain $Y_n-X_n\le 2^nn!$:
\begin{align*}
 Y_n-X_n &= |(2n-1)Y_{n-1}-2nX_{n-1}| \\
         &\le (2n-1)(Y_{n-1}-X_{n-1})+X_{n-1} \\
         &\le (2n-1)2^{n-1}(n-1)! + 2^{n-1}(n-1)! \\
         &= 2^nn!.
\end{align*}
Therefore, $a_n\le Y_n-X_n\le 2^nn!$.
For a lower bound conditional to the abc conjecture, consider a decomposition
$(2n)!=P_1P_2$ with $P_2>P_1$, and let $D:=\gcd(P_1,P_2)$ and $P_i':=P_i/D$.
From $P_1'+(P_2'-P_1')=P_2'$, assuming the abc conjecture, for any fixed
$\varepsilon>0$ we have $P_2'\le Cr^{1+\varepsilon}$, where $r$ is the
radical of the product $P_1'P_2'(P_2'-P_1')$, and $C$ is a constant depending
on $\varepsilon$. The radical does not exceed the product of all primes up to
$2n$, which is $e^{(2+o(1))n}$ by the prime number theorem. Furthermore, from
$P_1'<P_2'$ and $P_1'P_2'=(2n)!/D^2$ we conclude that $P_2'>\sqrt{(2n)!}/D$.
This yields
$$ \sqrt{(2n)!}/D < P_2' < Ce^{(2+o(1))(1+\varepsilon)n}
        < Ce^{2(1+\varepsilon)n} $$
resulting in $D>C^{-1}e^{-2(1+\varepsilon)n}\sqrt{(2n)!}$. It remains to
notice that $P_2-P_1\ge D$ since both $P_2$ and $P_1$ are divisible by $D$.
For an unconditional bound, given a partition $[1,2n]=\cP_1\cup\cP_2$, let
$P_i:=\prod_{m\in\cP_i}m$; thus, $P_1P_2=(2n)!$. For $i,j\in\{1,2\}$ with
$i\ne j$, let $Q_i$ be the product of all primes dividing $P_i$ but not
dividing $P_j$. Furthermore, let $Q_0$ be the product of all primes in
$[1,2n]$ dividing both $P_1$ and $P_2$; thus, $Q_0Q_1Q_2$ is the product of
all primes in $[1,2n]$.
The idea behind our argument is quite simple. Since both $P_1$ and $P_2$ are
divisible by $Q_0$, we have $|P_1-P_2|\ge Q_0$; thus, it suffices to show
that $Q_0$ is large. Assuming for a contradiction that $Q_0$ is small, at
least one of $Q_1$ and $Q_2$, say the former, is large. This means, there are
many primes dividing $P_1$ but not dividing $P_2$. For any such prime $p$,
the set $P_1$ contains all multiples of $p$ in the range $[1,2n]$. But this would
make $P_1$ significantly larger than $\sqrt{(2n)!}$, and hence make $P_2$
significantly smaller than $\sqrt{(2n)!}$, resulting in $|P_1-P_2|$ large.
We now work out the details.
For integer $d\in[1,2n]$ let $\td$ denote the product of all multiples of $d$
in the range $[1,2n]$; therefore writing $L:=\lfloor\frac{2n}{d}\rfloor$, we
have $\td=d^L\cdot L!$ and then, from Stirling's formula,
$$ \ln\td = \left(\frac 1d+\frac{\theta}{2n}\right)
                              \,\ln((2n)!),\quad |\theta|<1. \tag{$*$} $$
The key observation is that $\cP_1$ contains only those $m\in[1,2n]$ with
$\gcd(m,Q_2)=1$. Therefore,
$$ P_1 \le \prod\sub{\gcd(m,Q_2)=1} m \le \prod\sub{\gcd(m,D)=1} m $$
for any divisor $D\mid Q_2$. Using the approximation ($*$), we get
\begin{align*}
  \ln P_1
     &\le \sum\sub{} \ln m \sum_{d\mid\gcd(m,D)} \mu(d) \\
     &=   \sum_{d\mid D} \mu(d) \ln \td \\
     &\le \left( \sum_{d\mid D}
             \frac{\mu(d)}d + \frac{1}{2n}(2^k-1) \right) \ln((2n)!) \\
     &=   \left( \prod_{p\mid D}\left(1-\frac1p\right)
                         + \frac{2^{k-1}}{n} - \frac1{2n}\right) \ln((2n)!)
\end{align*}
where $\mu$ is the Möbius function, and $k$ is the number of prime divisors
of $D$. Assuming that $\ln P_1\ge\frac12\left(1-\frac1{n}\right)\,\ln((2n)!)$
(as we certainly can), we conclude that
$$ \prod_{p\mid D}\left(1-\frac1p\right)
                          > \frac12 - \frac{2^{k-1}}{n} \ge \frac14 $$
provided $k\le \log_2 n-1$.
To summarize, for any $D\mid Q_2$ with at most $K:=\lfloor \log_2n\rfloor-1$
prime divisors we have $\prod_{p\mid D}\left(1-p^{-1}\right)>1/4$. By
symmetry, this is also true with $Q_2$ replaced with $Q_1$. Consequently, for
any $D\mid(Q_1Q_2)$ with at most $K$ prime divisors we have $\prod_{p\mid
D}\left(1-p^{-1}\right)>1/16$; as a result, $\sum_{p\mid D}p^{-1}<3$.
We notice that if $Q_1Q_2$ has fewer than $K$ prime divisors, then
$Q_1Q_2<(2n)^K=e^{o(n)}$ whence $|P_1-P_2|\ge Q_0\ge e^{(1+o(1))n}$. Suppose
therefore that $Q_1Q_2$ has at least $K$ prime divisors. We choose $D$ to be
the product of the $K$ smallest prime divisors of $Q_1Q_2$, and we denote by
$M$ the largest of these $K$ smallest divisors; notice that
$M>(1+o(1))|K|\ln(|K|)>\ln n\ln\ln n$ by the prime number theorem. Let
$m:=M^c$ with $c\in(0,1)$. If $c$ is sufficiently small, then by Mertens'
second theorem, and recalling that $\sum_{p\mid D}p^{-1}<3$, we obtain
$$ \sum_{\substack{m\le p\le M \\ p\nmid D}} \frac1p
       > \sum_{m\le p\le M} \frac1p - 3
                              > \ln\frac{\ln M}{\ln m} - 3 + o(1) > 1. $$
Denoting by $T$ the number of primes $p\nmid D$ in the range $[m,M]$, we thus
have $T>m=M^c>(\ln n\ln\ln n)^c$. The product of these $T$ primes is at least
as large as the product of the first $T$ primes, which is
$$ e^{(1+o(1))T} = e^{(1+o(1))(\ln n\ln\ln n)^c}. $$
The assertion follows in view of $|P_1-P_2|\ge Q_0$ and since any prime in
$[1,M]$ not dividing $D$ is a divisor of $Q_0$.