Median of Medians Recurrence Relation for 3-grouping
You can use the inequality $\log (1+x) &lt; x$ (valid for $x &gt; 0$, where $\log$ is the natural logarithm), which follows from a Taylor expansion, to reason as follows:
$$
\log \left(\frac{n'}{3} + 1\right) =
\log \left(\frac{n'}{3} \cdot \left(1 + \frac{3}{n'}\right)\right) = \log \frac{n'}{3} + \log \left(1 + \frac{3}{n'}\right) &lt; \log \frac{n'}{3} + \frac{3}{n'}.
$$
This shows (after some calculation) that you can remove the $+1$ and $+4$ in return for an additional constant additive term, that is, you can estimate your final line by
$$
c \left(\frac{n'}{3}+1\right) \lg \frac{n'}{3} + c\left(\frac{2n'}{3}+4\right) \lg \frac{2n'}{3} + M + c_1 n',
$$
where $M&gt;0$ is some constant.