home |  avr microcontroller & DIY electronics |  toolbox |  science club  |  tuxtalk |  photos |  e-cards |  Online-Shop


no preservatives added blog | computer and graphics corner | herbal treasure chest | splash into math | stardust | periodic table

Calculate the sum of 1 +2+3 up to 100



Johann Carl Friedrich Gauss, a famous mathematician and physicist was given this task in school when the teacher just wanted to keep the kids busy. But the genius that he was it didn't take him long. Can you think of a way to get to the result faster than adding up all the numbers individually? Steven Strogatz talks about this problem in an article called "Rock groups".
He looks at the easier example of the sum of the numbers 1 to 10 first and imagines them as a triange of rocks like this:

o
oo
ooo
oooo
ooooo
oooooo
ooooooo
oooooooo
ooooooooo
oooooooooo

The triangle looks kind of half empty. If we copy and rotate it we can add it as the missing half, like so:

oxxxxxxxxxx
ooxxxxxxxxx
oooxxxxxxxx
ooooxxxxxxx
oooooxxxxxx
ooooooxxxxx
oooooooxxxx
ooooooooxxx
oooooooooxx
oooooooooox

Now we have a rectangle with 10 rows and 11 columns with a total of 10*11=110 rocks. The rectangle consists of 2 triangles. As the sum we want to calculate is only 1 triangle we have to divide our result by 2. 110:2 = 55.

Coming back to the original problem of summing up all numbers from 1 to 100 included we can also make a triangle, copy and rotate it and get the sum of 100*101 = 10100. (You can easily calculate this in your head, 100*100 = 10000 and 1*100=100, together gives 10100). If we divide it by 2 we get 5050. (Again this can be easily done in your head: divide 10000:2 = 5000, then divide 100:2=50, add the results together and you get 10100:2=5050);



Calculate the sum of the uneven numbers starting with 1

and compare it with the product of these numbers





references

Rock groups by Steven Strogatz



Copyright © 2004-2024 Katja Socher, tuxgraphics.org