by Sam Howison | theguardian.com link to article
"As a child Maryam Mirzakhani was told a story by her elder brother about the mathematician Carl Friedrich Gauss, and how he, as a schoolboy, solved a mathematical problem, adding all the numbers from 1 to 100, in seconds. She couldn’t master the solution but when it was explained, was dazzled by its elegance, sparking the love affair that brought her the Fields medal.
So how did he solve it?
The answer is fiendishly simple once you know how. Gauss discovered that on adding the consequential numbers of the highest and lowest values in the sequence you would get 101. So for example, the first pair takes the lowest value, 1, and the highest value, 100, and, when added, give 101. Similarly, for the second pair, the second lowest and highest numbers, 2 and 99, summed give 101, and so forth. In total there are 50 pairs each amounting to 101, so using simple multiplication (50 x 101) the answer is given in seconds, 5050. Or as Mirzakhani puts it, “a beautiful solution”."