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 + 41^2 + ... + 100^2$?
The value of $21^2 + 22^2 + \cdots + 40^2 + 41^2 + \cdots + 100^2$ is 208450.
Let S(n)=n(n+1)(2n+1)6
Then you want S(100)−S(20)