Analysing a small recursive algorithm
Since $1+2+\cdots+n = \frac{n(n+1)}{2}$, your expression is equal to
$$
C_1 n + C_2 (nm+n^2) - C_2 \frac{n^2+n}{2} = C_2(nm+n^2/2) + (C_1-C_2/2)n.
$$
This shows that for constant $m$ and large enough $n$, your expression is at least $(1/2-\epsilon)C_2(nm+n^2)$ (for any $\epsilon &gt; 0$ and, if $C_1 \geq C_2/2$, even for $\epsilon = 0$), and at most $(1+\epsilon)C_2(nm+n^2)$ (for any $\epsilon &gt; 0$ and, if $C_1 \leq C_2/2$, even for $\epsilon = 0$).