Therefore 1 + 2 + 3 + 4+…+ n < n 2
Let f(n) = 1 + 2 + 3 + 4+…+ n and g(n) = n 2 .
Then there is a constant c = 1 and n0 where f(n) < c * g(n) for n > n0
Thus f(n) = O(g(n))