Sum of numbers and/or digits 1-100Date: 03/29/97 at 02:45:58 From: Adam Cooper Subject: Sum of digits 1-100? How would one go about adding up all the digits 1-100? Confused, Adam Date: 03/29/97 at 14:40:27 From: Doctor Steven Subject: Re: Sum of digits 1-100? There is a well known story about Karl Friedrich Gauss when he was in elementary school. His teacher got mad at the class and told them to add the numbers 1 to 100 and give him the answer by the end of the class. About 30 seconds later Gauss gave him the answer. The other kids were adding the numbers like this: 1 + 2 + 3 + . . . . + 99 + 100 = ? But Gauss rearranged the numbers to add them like this: (1 + 100) + (2 + 99) + (3 + 98) + . . . . + (50 + 51) = ? If you notice every pair of numbers adds up to 101. There are 50 pairs of numbers, so the answer is 50*101 = 5050. Of course Gauss came up with the answer about 20 times faster than the other kids. In general to find the sum of all the numbers from 1 to N: 1 + 2 + 3 + 4 + . . . . + N = (1 + N)*(N/2) That is "1 plus N quantity times N divided by 2." Hope this helps. -Doctor Steven, The Math Forum Check out our web site! http://mathforum.org/dr.math/ Date: 04/14/97 at 14:47:27 From: Doctor Chuck Subject: Re: Sum of digits 1-100? Hi Adam, Instead of the problem Dr. Steven talked about, could you have been asking a different question, like "what is the sum of the DIGITS of 1 + 2 + 3 +...+ 100?" If so, the last thing we want to do is look at every number between 1 and a hundred and add all their digits. There must be an easier way! A good way to approach such problems is to consider smaller problems and look for a patterm. Let's first ask, what is the sum of the digits 0-9? Clearly, this is 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9, which equals 45. Next question: What is the sum of the digits of the numbers 10-19? We know that these numbers all have a "1" in the tens place, and a number 0-9 in the units place. There are ten of these numbers, so there are ten 1's and the digits 0, 1, 2, 3, 4...9. So, the sum of these numbers must be 10x1 + (0 + 1 +...+ 9). What about the sum of the digits of the numbers 20-29? Again, we need to add ten 2's and the digits 0-9, which is 10x2 + (0 + 1 +...+ 9). Do you see the pattern? So, when we add up the digits of all numbers 0-99, the expression is: (0 + 1 +...+ 9) + The numbers 0-9 10x1 + (0 + 1 +...+ 9) + The numbers 10-19 10x2 + (0 + 1 +...+ 9) + The numbers 20-29 10x3 + (0 + 1 +...+ 9) + The numbers 30-39 10x4 + (0 + 1 +...+ 9) + The numbers 40-49 10x5 + (0 + 1 +...+ 9) + The numbers 50-59 10x6 + (0 + 1 +...+ 9) + The numbers 60-69 10x7 + (0 + 1 +...+ 9) + The numbers 70-79 10x8 + (0 + 1 +...+ 9) + The numbers 80-89 10x9 + (0 + 1 +...+ 9) And, finally, the numbers 90-99. Thank goodness we can simplify this! From the distributive law of multiplication, we know that (10x1 + 10x2 +...+ 10x9) = 10(1 + 2 ...9). We also know that there are ten additions of (0 + 1 +...+ 9), which is another way of saying that there are ten times (0 + 1 +...+ 9), 10(0 + 1 +...+ 9). So, the sum of digits of the numbers 1-99 is: 10(0 + 1 +...+ 9) + 10(0 + 1 +...+ 9) = 20(0 + 1 + 2...9) Since (0 + 1 +...+ 9) = 45, this equals: 20 x 45 = 900 We add the digit 1 from "100" because we want the sum of digits 1-100, and the final answer is 901. -Doctor Chuck, The Math Forum Check out our web site! http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/