Denote by $f(n)$ the maximal number of distinct divisors of $k$ integer numbers $1\leq a\_1<a\_2<\ldots<a\_k\leq n$, where $k$ is not fixed and $a\_1+\ldots+a\_k\leq n$. I'm interested in the asymptotics of $f(n)$.


For example, $f(4)=3$ since 4 has 3 divisors, $f(10)=5$ since 10=6+4 and 1,2,3,4,6 divide 4 or 6.


Notice that if we take numbers $1,2,3,\ldots,t$ such that $1+\ldots+t=t(t+1)/2\leq n$ (so $t\sim\sqrt{2n}$), then we have exactly $t$ divisors, so $f(n)>\sqrt{n}$.


Question: is it possible to obtain a better asymptotics?



Maximal number of divisors of numbers whose sum does not exceed $n$
No, if you do not care on multiplicative factor: namely, $f(n)\leqslant 2\sqrt{n}$. Use the following


**Lemma.** For any real $x>0$ and any positive integer $a$, $a$ has at most $a/x$ divisors which are not less than $x$.


**Proof.** Let $d\_1>d\_2>\ldots>d\_m\geqslant x$ be these divisors. Then $a/d\_1<a/d\_2<\ldots<a/d\_m$, and these are integers, thus $a/d\_m\geqslant m$ and $a\geqslant md\_m\geqslant mx$, so $m\leqslant a/x$ as needed.


Thus $a\_i$'s have at most $(a\_1+\ldots+a\_k)/x\leqslant n/x$ divisors which are at least $x$, and also at most $x$ divisors which are less than $x$, totally at most $x+n/x$ divisors. It remains to put $x=\sqrt{n}$ to get $f(n)\leqslant 2\sqrt{n}$.


