Carl Gauss: Child Prodigy
Apr 27, 2023
So Carl Gauss is considered to be one of the greatest mathematicians in all of history.
And people refer to him as the Prince of Mathematics.
So Gauss was known in his youth as a child prodigy.
And there's a great story that comes from his youth.
It's really more of a legend and we're not entirely sure whether or not it actually happened.
But the story is incredibly interesting.
So when Gauss was in primary school, he had a teacher who wanted to give the class a lot of busy work.
So she proposed the problem that all the students have to add up 1 plus 2 plus 3 plus 99 plus 100.
So essentially summing up the first 100 numbers.
And if you were to do this adding one number at a time, it would take a considerable amount of time to finish this.
And that was the idea behind why the teacher gave it to the kids.
So Gauss actually noticed a pattern.
He realized that 1 plus 100 gives you 101.
And 2 plus 99 also gives you 101.
And 3 plus 98 gives you 101.
So if you carried this idea all the way down to 50 plus 51, you still get 101.
So you can notice that you have the number 101 and you add it 50 times.
In other words, you multiply it by 50.
So in this case, our answer would be 5050.
And the legend says that when the teacher gave Gauss this problem, he was able to sum this up in about 30 seconds.
And like I said, we don't know whether or not this is true.
But considering Gauss's enormous reputation, it very likely could have happened.
So one thing we can do now is to generalize this.
Let's say I wanted to add up the first 1 million numbers.
So before we answer that question, let's first look at just a general sum of the first n numbers.
1 plus 2 plus 3 plus all the way up to plus n minus 1 and then plus n.
So we can use the same idea where we add the first and the last and the second and the second to last and so on.
So we have 1 plus n and then we'll add 2 plus n minus 1.
Then we add 3 plus n minus 2.
And we will carry this pattern on and on.
So notice, though, that all of these are just 1 plus n.
So now we just need to figure out how many times do we have to add this number.
So let's go back to our first example where we added to the first 100 numbers.
So we carried this pattern out and so we got to 50 plus 51.
So we had to add this number 101 50 times.
So we just need to notice that 50 is half of 100.
And we can apply this idea to our general problem here
and say that we have to multiply this 1 plus n by n divided by 2.
So now this sum is equal to this product here.
And if we want to add the first 1 million numbers.
So we have 1 plus 2 plus 3 plus all the way up to plus 999,999 plus 1 million.
So if we just use our formula here.
And I move over to give us some space.
Then our n value is 1 million.
So it would be 1 million and 1 multiplied by half of 1 million.
Which is 500,000.
So if we use a calculator, we can get that the sum of the first 1 million numbers
is equal to 500,500,000.
And obviously we can't just add all of these up term by term.
Because who knows how long that would take.
But you can check that this formula works for any numbers.
So the sum up to any number you want.
This formula right here will always hold.

