Program to find the Nth number of the series 2 , 10 , 24 , 44 , 70. ... . | C # program to find N - th term of the series : ; function to return nth term of the series ; Driver Code ; Taking n as 4 ; Printing the nth term
using System ; class GFG { static long NthTerm ( long n ) { long x = ( 3 * n * n ) % 1000000009 ; return ( x - n + 1000000009 ) % 1000000009 ; } public static void Main ( ) { long N = 4 ; Console . Write ( NthTerm ( N ) ) ; } }