The sum 1^2 + 2^2 + 3^2 + 4^2 + ... + n^2 = n(n+1)(2n+1) / 6. What is the value of $21^2 + 22^2 + ... + 40^2?
[40*(40+1)*(2*40+1)] / 6 - [20*(20+1)*(2*20+1)] / 6 = 22,140 - 2,870 =19,270