Question 1115661
The Sum S is equal to 6 Sum i^2 - n

6 Sum i^2 -n
= n(n+1)(2n+1) - n 
= n(2n^2 + 3n + 1) - n
= n(2n^2 + 3n)
= n^2(2n + 3)