Gauss’ formula allows us to add the primes n natural numbers with a very simple calculation, that is, the half-product between n And n+1.
This means that a “heavy” sum such as that of the first 100 natural numbers may be, which from a computational (and time) point of view could seem particularly burdensome given that it requires the sum of 100 addends – i.e. 1+2+3+ 4+…+99+100 – can be solved quickly with simple calculation 100*101/2=5050.
But how is it possible that they add together n numbers is that simple? Where does the semi-product formula come from n For n+1? The answer, which apparently seems not very intuitive, becomes immediate if we arrange the numbers from 1 to n on one line. In this example, as above, we will use n=100 and, for convenience, we call S the sum we are calculating.
Now, in the line below, we write the numbers from again 1 to 100 – whose sum is always valid S – but this time in reverse. The sum of the two lines together is worth exactly 2S, but what we want to discover is precisely the value of S.
To do this, we add together the numbers that are paired vertically: we note that the sum always gives the result 101 – Meaning what n+1, given that in our example n is equal to 100.
This means that by adding together i 100 partial results of 100 columns, resulting in all 101the result of the sum of the two lines is exactly 100*101 (Meaning what n(n+1)).
Now, 100*101 it is the result of the sum of the two rows, which we know is equal to 2S, therefore returning to the result we were looking for, that is, the sum of the primes 100 natural numbers, we just need to divide by 2 the result we obtained, from which:
The example we just saw can be extended to any n natural. This means that even adding together a billion consecutive natural numbers can be achieved with just one simple calculation.
This formula is called Gauss by the famous mathematician who conjectured it: Carl Friedrich Gauss. Legend has it that Gauss discovered this formula at just 8 years old, but there are no certain sources that ensure the veracity of this story. Although Gauss was an absolute genius and was a fundamental figure in various fields of mathematics, we have no official evidence of his brilliant achievement at a young age.