Pairing 1 with n, 2 with n-1, and so on yields n/2 pairs each summing to n+1, hence 1 + ... + n = n(n+1)/2 and 5050 for n = 100, one multiplication in place of ninety-nine additions.
solvedeasy1 min
What is the sum of the integers from 1 to 100? More generally, what is the sum of the integers
from 1 to n?
Write the sum forwards, then backwards beneath it, and add column by column. Each of the n
columns totals n+1,
SS=1+2+⋯+(n−1)+n,=n+(n−1)+⋯+2+1.(1)
Adding the two rows gives 2S=n(n+1), so
S=k=1∑nk=2n(n+1).(2)Stack the rows 1 through n into a staircase, then add a mirror-image staircase on top. The two together fill a rectangle of width n plus 1 and height n, so each staircase is half its area. For n equal to 100 that is 100 times 101 over 2, which is 5050.
This is the pairing Gauss reportedly found as a schoolboy, grouping 1+100, 2+99, and so
on into fifty pairs of 101. The closed form turns a hundred additions into one multiplication.