Program to find Nth term of series 0 , 11 , 28 , 51 , 79 , 115 , 156 , 203 , ... . | Java program to find the N - th term of the series : 0 , 11 , 28 , 51 , 79 , 115 , 156 , 203. . ... ; calculate Nth term of series ; Driver code
import java . io . * ; class GFG { static int nthTerm ( int n ) { return 3 * ( int ) Math . pow ( n , 2 ) + 2 * n - 5 ; } public static void main ( String [ ] args ) { int N = 4 ; System . out . println ( nthTerm ( N ) ) ; } }