the following triangle(method uses this column-based technique to find triangular number it sums all the columnsfrom height of to height of int triangle(int nint total while( total total --nreturn total/until is /add (column heightto total /decrement column height the method cycles around the loop timesadding to total the first timen- the second timeand so on down to quitting the loop when becomes finding the nth term using recursion the loop approach may seem straightforwardbut there' another way to look at this problem the value of the nth term can be thought of as the sum of only two thingsinstead of whole series they are the first (tallestcolumnwhich has the value the sum of all the remaining columns this is shown in figure in the remaining columns in the first column total figure triangular number as column plus triangle