Printing the unique pairs
function print_pairs ( pairs ) { let i = 1 , mul ; for ( i = 1 ; i <= pairs ; i ++ ) { mul = i * ( i + 1 ) ; document . write ( " " + i + " " + ( mul * i ) + " " + mul * ( i + 1 ) + " " ) ; } }