check if sum of five consecutive integer is equal to n .
if ( i + i + 1 + i + 2 + i + 3 + i + 4 == n ) { document . write ( ( i ) + " " + ( i + 1 ) + " " + ( i + 2 ) + " " + ( i + 3 ) + " " + ( i + 4 ) ) ; return ; } } document . write ( " " ) ; }