N | function to evaluate Nth polite number ; Driver code
function polite ( n ) { n += 1 ; let base = 2 ; return n + ( Math . log ( ( n + ( Math . log ( n ) / Math . log ( base ) ) ) ) ) / Math . log ( base ) ; } n = 7 ; document . write ( parseInt ( polite ( n ) ) ) ;