# Finding bounds of code with sums?

So I'm studying for a final, and one of the study questions asks for the lower bound of this code:

$\text{function }f_1(n)$

$s←0;$

$\text{for } i ← 4\text{ to }n^2\text{ do}$

$\text{for } j←5\text{ to }(3i\cdot\lfloor log2 i\rfloor)$

$\text{do } s← s +i − j ;$

$\text{return } s;$

The solution gives this as the run time:

$c\sum_4^{n^2} 3i\lfloor log_2i\rfloor - 4$

The upper bound is given as $6c n^4 log_2 n$.

Both these I understand and can replicate.

However, on the lower bound, the first two steps of the given solution are:

$T(n) >= c\sum_4^{n^2} 3i\lfloor log_2 i\rfloor -4$

$T(n) >= c\sum_{\lceil n^2 /2\rceil}^{n^2} 3\lceil n^2 /2\rceil\lfloor(log_2 \lceil(n^2 /2)\rceil)\rfloor -4$

I'm confused as to how (and why) the bounds of the sums are changed- more precisely, why to do so. How does the $4$ change to celing($\frac{n^2}{2}$)?

Any help? (Now with Mathjax coding so it's readable!)

-