At the age of seven, Carl Friedrich Gauss started elementary school, and his potential was noticed almost immediately. His teacher, Büttner, and his assistant, Martin Bartels, were amazed when Gauss summed the integers from 1 to 100 instantly by spotting that the sum was 50 pairs of numbers each pair summing to 101.


- From the biography of
Johann Carl Friedrich Gauss

How had Gauss done it?

The same pattern occurs in the sum from  1  to any integer  n :

The pattern can also be seen geometrically: