According to mathematical legend, when Gauss was a young student, he had a math teacher who liked to keep his students quiet by giving them busy work. One day, he told the class to sum all of the numbers from 1 to 100. (This is the same as finding the 100th triangular number.) Instead of immediately writing, Gauss stared off into space thinking and quickly arrived at the correct answer.
How did he do this? Instead of trying to add the numbers up in order, he paired them up.
1 2 3 4 5 6 ... 50
100 99 98 97 96 95 ... 51
Each of these column pairs, he reasoned, added up to 101. And there were 50 pairs. So the sum of the first 100 numbers must be 101*50, or 5050.
In other words, he re-derived the formula for triangular numbers: T(n)=(n)(n+1)/2. From there it was a hop, skip, and a jump to T(100)=(100)(101)/2=5050.