Find sum of N | C # program to find sum in Nth group ; calculate sum of Nth group ; Driver code
using System ; class gfg { public static double nth_group ( int n ) { return n * ( 2 * Math . Pow ( n , 2 ) + 1 ) ; } public static int Main ( ) { int N = 5 ; Console . WriteLine ( nth_group ( N ) ) ; return 0 ; } }