So my friend gave me the f(n), but I don't understand how he got there. Would like some info on how. We are essentially learning how to write algorithms with big O notation. The problem is just counting work assignments within the code and nested loops are each N intervals. I just don't understand where the division comes from in this case.

```java
public static String[] sum4(int N)
{
    //DO NOT COUNT IN opCount
    long opCount = 0;
    String fn = "f(N) = 5N+5(N(N-1)/2)+4";
    String On = "O(N) = n^2";
    //BEGIN opCounts
    long sum = 0;
    opCount++;// assignment of sum
    opCount++;//assignment of i
    opCount++;//comparison of I < N
    for(int i = 0; i < N; i++)
    {

        opCount++;//assignment of j
        opCount++;//comparison of j < i
        for(int j = 0; j < i; j++)//5N
        {
            sum++;
            opCount+=2;// sum addition and assignment
            opCount+=2;// J++ addition and assignment
            opCount++;// Comparison of J < I and the multiplier
        }
        opCount++;// I < N comparison
        opCount+=2;// I++
    }
    opCount++;//return
    return new String[] {fn, On, opCount+""};
}

```