N | Java program for finding N - th polite number ; Function to find N - th polite number ; Driver code
using System ; class GFG { static double polite ( double n ) { n += 1 ; double base1 = 2 ; return n + ( Math . Log ( ( n + ( Math . Log ( n ) / Math . Log ( base1 ) ) ) ) ) / Math . Log ( base1 ) ; } public static void Main ( String [ ] args ) { double n = 7 ; Console . Write ( ( int ) polite ( n ) ) ; } }