in the book "Introduction to algorithms"(CLRS) page 49 it says:

"The number of anonymous functions in an expression is understood to be equal to the number of times the asymptotic notation appears. For example, in the expression:

$\sum_{i=1}^n O(i)$

there is only a single anonymous function (a function of i). This expression is thus not the same as $O(1) + O(2) + O(3) + ... + O(n)$, which doesn’t really have a clean interpretation."

what is the difference between these 2 equitions and how should interpret each one??

  • 3
    $\begingroup$ This is a really unfortunate case of the widespread abuse of notation causing unnecessary confusion. I hope the links above help you; if not, please edit to clarify what remains unclear and we can reopen. $\endgroup$
    – Raphael
    Feb 15 '18 at 13:07