Increasing sequence with given GCD | Function to print the required sequence ; Driver Code
function generateSequence ( n , g ) { for ( var i = 1 ; i <= n ; i ++ ) { document . write ( i * g + " " ) ; } } var n = 6 , g = 5 ; generateSequence ( n , g ) ;