I heard Gauss's primary school teacher gave some busy-work to his class: to add all the numbers between 1 and 100 up. Gauss immediately wrote 5050. His teacher was shocked, so she told him to add up all the numbers to 1000. And just as quickly he wrote 500500.
Did Gauss derive the $1+2+3+\cdots+(n-2)+(n-1)+n=\frac{n(n+1)}{2}$ formula in elementary school? If so, what biography of Gauss discusses it?
His proof:
\begin{align} & 1+2+3+\cdots+(n-2)+(n-1)+n \\ & + \\ & n+(n-1)=(n-2)+\cdots+3+2+1 \\ & = \\ & \underbrace{(n+1)+(n+1)+(n+1)+\cdots+(n+1)+(n+1)+(n+1)}_{n}=n(n+1) \end{align}
And he divided by $2$ because of double-counting to get:
$$\frac{n(n+1)}{2}$$
Carl Friedrich Gauss did not claim to have found the formula for the sum of the first $n$ positive integers.
According to G. Waldo Dunnington's biography Gauss: Titan of Science, Gauss (30 April 1777 - 23 February 1855) entered St. Katharine's Volksschule in 1784. During the first two years of elementary school, Gauss did not take an arithmetic course. He first took arithmetic in the 1786 - 1787 school year. During that year, his instructor, J. G. Buettner, asked the class to add the numbers from $1$ to $100$. Gauss immediately wrote down the answer. All his classmates obtained incorrect answers. When Buettner saw that Gauss had obtained the correct answer, he asked Gauss how he had solved the problem. Gauss replied (in German), "$100 + 1 = 101$; $99 + 2 = 101$; $98 + 3 = 101$, etc., and so we have as many `pairs' as there are in $100$. Thus the answer is $50 \times 101$ or $5050$."
You will notice that Gauss did not claim to have derived a formula. He simply recognized a shortcut that we now express as
$$1 + 2 + \cdots + n = \frac{n(n + 1)}{2}$$
Buettner, recognizing that Gauss was extraordinary, ordered a more advanced arithmetic book for him. Either Buettner or Johann Christian Martin Bartels (1769 - 1836) convinced Gauss' father that Gauss should be tutored in mathematics. Bartels, who later became a mathematician himself, did the tutoring. As Dunnington relates, Gauss made rapid progress, catching the attention of prominent academics and, subsequently, the Duke of Brunswick, who gave Gauss a stipend so that he could continue his studies. Those studies, as you know, led to numerous important discoveries in mathematics, physics, and astronomy.