A (probably apocryphal) story tells that, as a 10-year-old schoolboy, Carl Friedrich Gauss was asked to find the sum of the first 100 integers. The tyrannical schoolmaster, who had intended this task to occupy the boy for some time, was astonished when Gauss presented the correct answer, 5050, almost immediately.
How did Gauss find it?