Generate an alternate odd | Function to print the required sequence ; Print ith odd number ; Driver Code
function findNumbers ( n ) { var i = 0 ; while ( i <= n ) { document . write ( 2 * i * i + 4 * i + 1 + i % 2 + " " ) ; i ++ ; } } var n = 6 ; findNumbers ( n ) ;