Series summation if T ( n ) is given and n is very large | C # implementation of the approach ; Function to return the sum of the given series ; Driver code
using System ; class GFG { const int MOD = 1000000007 ; static int sumOfSeries ( int n ) { int ans = ( int ) Math . Pow ( n % MOD , 2 ) ; return ( ans % MOD ) ; } public static void Main ( ) { int n = 10 ; Console . Write ( sumOfSeries ( n ) ) ; } }