Find the nth term of the given series | Java implementation of the approach ; Function to return the nth term of the given series ; Driver code
class GFG { static int oddTriangularNumber ( int N ) { return ( N * ( ( 2 * N ) - 1 ) ) ; } public static void main ( String [ ] args ) { int N = 3 ; System . out . println ( oddTriangularNumber ( N ) ) ; } }