Program to find Nth term of series 0 , 9 , 22 , 39 , 60 , 85 , 114 , 147 , ... . . | Java program to find the N - th term of the series : 0 , 9 , 22 , 39 , 60 , 85 , 114 , 147. . ... ; calculate Nth term of series ; Driver code
public class GFG { static int nthTerm ( int n ) { return 2 * ( int ) Math . pow ( n , 2 ) + 3 * n - 5 ; } public static void main ( String args [ ] ) { int N = 4 ; System . out . println ( nthTerm ( N ) ) ; } }