Program to find the Nth term of the series 0 , 5 , 18 , 39 , 67 , 105 , 150 , 203 , ... | C # program to find the N - th term of the series : 0 , 5 , 18 , 39 , 67 , 105 , 150 , 203 , ; calculate Nth term of series ; Driver code
using System ; class GFG { static int nthTerm ( int n ) { return 4 * ( int ) Math . Pow ( n , 2 ) - 7 * n + 3 ; } static public void Main ( ) { int N = 4 ; Console . Write ( nthTerm ( N ) ) ; } }