Page 4 - Matematica_Mathematics - Suma lui Gauss_Gauss sum
P. 4

3. Gauss sum



               Karl Friedrich Gauss lived from 1777 to 1855
         and  was  a  great  German  mathematician,  physicist
         and astronomer. He is considered one of the greatest
         German scientists.
               It is said that in primary classes he was punished
         by his teacher to calculate the sum of the first 100
         natural numbers.  He noticed that he could use a
         calculation technique that allowed him to solve the
         exercise in seconds, to his teacher’s surprise. Therefore,
         Gauss’s method comes to help us and not to make our
         work difficult.
               But let’s see how he thought about solving this
         task!
               He wrote twice this sum, placing the numbers in
         the string first ascending, then descending and noted
         the sum by S because he did not know its value.



                 1 +    2 +    3 +     4 +    5 + ......... + 98 +  99 + 100 = S

              100 +  99 +  98 +   97 +  96 + ......... +   3 +    2 +     1 = S


              101 + 101+ 101+ 101 + 101+...........+101+ 101+ 101 = S + S (i.e. 2 × S)


               He then noticed that by adding the numbers written one below the other in the two strings, he obtained
         every time 101. Adding 100 times to 101, he got the double of the sum of the numbers from 1 to 100.
               From here things became very simple.


               101 × 100 = 2 × S

               10100 = 2 × S,       and to find out the sum, he divided the product by 2.


               Therefore,   1 + 2 + 3 + 4 + 5 + ......... + 98 + 99 + 100 = 100 × 101 : 2




                                                                       So, to find out the sum of the numbers
                                                                 from 1 to 100 we multiply the last number (100)
                                                                 by its successor (101) then divide by 2.
                                                                       The good part is that we can apply this
                                                                 formula to find out the sum of the numbers
                                                                 in a string, no matter how many they are.
                                                                 The condition is that the string must be built
                                                                 according to a certain rule.
   1   2   3   4   5   6