Let $n$ be positive integer. Consider its integer partitions denoting as $(m_1,\cdots,m_k)$, where $m_1+\cdots+m_k=n$ and the order does not matter.
I am interested in the following two quantity
(1) $$\sum_{i=1}^k m_k^2$$
(2) $$\binom{m_1}{2}+\cdots+\binom{m_k}{2}$$
My question is, what property of partition $m_1+\cdots+m_k=n$ makes the two quantities large or small? What is the tight upper bound of each of them, in the sense that it reflects difference on different partitions? If it is not possible to derive non-asymptotic bound, it is good enough to have asymptotic bound (for large $n$) in my case.
For the quantity (1), initially I naively thought the larger the length $k$ of partition, the smaller $\sum_{i=1}^k m_k^2$. It is true when $n=2,3,4,5,6$. But when $n=7$ we can quickly spot a counter example: $4+3=7$, $5+1+1=7$.
P.s. If this problem is hard to solve, could we somehow simplify the problem?
It's hard to state a criterion for two general partitions. But the maximum sum of squares is given by the trivial partition $(n)$ with one element, since for any partition $(m_1,\dots,m_k)$, $$ \sum_{i=1}^k m_i^2 \le \biggl( \sum_{i=1}^k m_i \biggr)^2 = n^2. $$