I want to calculate the runtime of the following function

T(n) = (1+2+3+4+5+...+n)/n

At first this doesnt seemed hard to me because it can be solved easily by transforming the formula

T(n) = (n(n-1)/2)/n = (n^2-n)/n = n-1 which leads into O(n).

By thinking about this function i struggled. I am not sure if I am allowed to curtail n, because I dont know the code behind that function.

For example it could be something like

```
method foo()
{
methodWhichTakesNCubeAmountOfTime(); //Build sum, O(n^2)
methodWhichTakesNAmountOfTimeAndCantBeSimplified(); //O(n)
}
```

For this method I would get n cubes as runtime.

O(n^2) + O(n) = O(n^2)

I know that these method doesnt cover the original term but i hope you get what i meant: **The divided by n could be a completly differnt function (which has accidently a complexity of n) and therefore i cannot curtail the other n's with it.**

So i am confused. Am i allowed to transform terms normally during calculation the Big O or do some math rules dont apply here?

Thanks.