Find the Nth term of the series 9 , 45 , 243 , 1377 | C # implementation of the approach ; Function to return the nth term of the given series ; nth term ; Driver code
using System ; public class GFG { static int nthTerm ( int n ) { int An = ( ( int ) Math . Pow ( 1 , n ) + ( int ) Math . Pow ( 2 , n ) ) * ( int ) Math . Pow ( 3 , n ) ; return An ; } public static void Main ( ) { int n = 3 ; Console . WriteLine ( nthTerm ( n ) ) ; } }