The sum 1^2 + 2^2 + 3^2 + ... + n^2 = n(n + 1)(2n + 1)/6.
What is the value of 21^2 + 22^2 + 23^2 + ... + 40^2 + 41^2 + 42^2?
sumfor(n, 21, 42, n^2)==22,715