The sum $1^2 + 2^2 + 3^2 + 4^2 + \cdots + n^2 = n(n+1)(2n+1) \div 6$. What is the value of $21^2 + 22^2 + \cdots + 40^2$?
sumfor(n, 21, 40, n^2)==19,270