Take the story of little Carl Friedrich Gauss and how his mathematics teacher thought he could get a lesson off by telling all hist students to add the numbers from $1$ to $100$.
Gauss noted that if you don't do it in order, but rather add the first to the last, the second to the second-to-last, and so on, you get something which is much easier to work with: you get a bunch of $101$'s. How many of them? Exactly half as many as the length of the list he started out with: $\frac{100}2$. Thus the sum of all these $101$'s, and therefore the sum of all the numbers from $1$ to $100$ is
$$
101\cdot \frac{100}{2}
$$
If we want to apply this to your question, take the $\frac{}2$ and move to be below $101$ instead, so that we get
$$
\frac{101}{2}\cdot 100
$$
We can see that the first term here is the middle of the list, $50.5$ (when there are an even number of elements in the list, the middle itself is not in the list), while the last term is the number of elements in the list.
This trick works whenever all the pairs of elements in the list (first and last, second and second-to-last, and so on) add up to the same number. This specifically happens when the difference between any two consecutive numbers on the list is the same all along the list (although there are other cases where it works as well, those aren't as common).