Formula for finding the sum of first n squares
def sumOfSquares ( n ) : NEW_LINE INDENT n %= MOD NEW_LINE return ( ( ( n * ( n + 1 ) ) % MOD * ( 2 * n + 1 ) ) % MOD * inv6 ) % MOD NEW_LINE DEDENT def sums ( n ) : NEW_LINE