Adding all the numbers between two widely dispersed numbers sounds a little daunting especially between 1 and 100+. Friedrich Gaus a mathematician from the 1800s who is credited with numerous contributions in math and science solved this problem in short order.
The story goes when Gaus was ten years old a teacher gave the class the chore of adding 1 to 100 to keep them busy for a while. A minute later Gaus put up his hand to indicate he had finished. The teacher looked in disbelief when he saw the correct answer on Gaus’ tablet (small chalkboard in those days).
When asked to explain Gaus replied – “ I saw that if I added the first number and the last number: 1 + 100 = 101 and 2 + 99 = 101. I realized that there were 50 pairs all adding up to 101. Therefore; 50 x 101 = 5050. Gaus went on to “invent” many other mathematical shortcuts.
Btw this can be done with any two numbers. And pairing is frequently used in many statistical models.