nested loops and the quadratic function the quadratic function can also arise in the context of nested loops where the first iteration of loop uses one operationthe second uses two operationsthe third uses three operationsand so on that isthe number of operations is ( ( in other wordsthis is the total number of operations that will be performed by the nested loop if the number of operations performed inside the loop increases by one with each iteration of the outer loop this quantity also has an interesting history in german schoolteacher decided to keep his and -year-old pupils occupied by adding up the integers from to but almost immediately one of the children claimed to have the answerthe teacher was suspiciousfor the student had only the answer on his slate but the answer was correct and the studentcarl gaussgrew up to be one of the greatest mathematicians of his time we presume that young gauss used the following identity proposition for any integer > we have ( ( ( we give two "visualjustifications of proposition in figure + / ( (bfigure visual justifications of proposition both illustrations visualize the identity in terms of the total area covered by unit-width rectangles with heights in ( )the rectangles are shown to cover big triangle of area / (base and height nplus small triangles of area / each (base and height in ( )which applies only when is eventhe rectangles are shown to cover big rectangle of base / and height