loga (bcloga loga loga ( /cloga loga loga (br loga and the following are special cases of those ruleslog an log log ( /nlog for large we have the useful approximationlog nn log (na sums we often find it useful to abbreviate sum as followssn ai an = we can view this as an algorithm or programlet hold the sum at the endand double[ be an array holding the numbers we wish to addthat is [iai thendouble for < + [icomputes the sum the most common use of sums for our purposes is when investigating the time complexity of an algorithm or program for thatwe often have to count variant of nso it is helpful to know thatn = ( to illustrate thisconsider the program in which counts the instructionsfor +forj < + +/instruction +/instruction +/instruction