There is a famous anecdote about the precocious mathematician Carl Friedrich Gauss, who at the age of eight was tasked by his teacher J.G. Büttner to calculate the sum of the first n positive integers; that is, the sum S = 1 + 2 + 3 + ... + 100.
To the astonishment of his teacher and his assistant, Gauss provided the correct answer of 5,050 within seconds. Gauss' "trick" was presumably to realize that the terms in this sum could be written in reverse and recombined with the original sum in a nice way. Specifically, we have
S = 1 + 2 + 3 + ... + 100
and
S = 100 + 99 + 98 + ... + 1.
By looking at the terms above that line up vertically, we can see that
That is, each of the 100 pairs of terms that line up has a sum of 101. Thus, by adding these two sums together, we have that
2S = 101·100, or S = 5050.
Recently, I came across a very nice generalization of this idea for the sum of the first n squares; that is, 1² + 2² + 3² + ... + n². Apparently it's a quite obscure result that isn't really (IMO, anyway) suitable for being presented in a textbook, so I created an animated version of it. Enjoy:
(Do you recognize at any of the equations in the introduction?)
"Stephen Wolfram is the creator of Mathematica and is widely regarded as the most important innovator in scientific and technical computing today." - Stephen Wolfram