Suppose you want to find the sum of the squares of all integers from 1 up to 200. Doing it manually would be boring a take a lot of time. Instead you can use the formula below:
S = 1/6 * n * (n + 1) * (2n + 1)
So in our case the answer would be 2,686,700
I am not sure how to derive this formula, cause I found it on a book that didn’t explain where it comes from, but once I find it I’ll update this post.