Need help for math contest!

Sort:
Chessplayer04

Hi, I am preparing for the Gauss math competition at my school, and I am have problems with one problem. Here it is:

The sum of all the digits of the integers from 98to 101 is

9+8+9+9+1+0+0+1+0+1=38

What is the sum of all the digits of the integers from 1 to 2008?

Does anyone know of a quick and easy way to caculate this?

Thanks for all of your help.

Elroch

I think the idea is that the finding of a way to calculate it is good mental exercise. Break up the numbers into groups that are different in some way, then look at the individual digits in each group. I hope that's vague enough not to ruin it for you.

strangequark

My suggestion would be to 1)break each number up into its digits,2) then pair these digits with sequential ones from other numbers. 3)Then, use easy mathematical induction on each of these subterms. 4)Lastly, add back up all of your subterms.

FT-physicist

1       2     3      4     5     6      7     8      9   = 45

1+0  1+1  1+2  1+3  1+4  1+5  1+6  1+7   1 +8 = 45

1+9 2+0 .............. So you have to group in 9 parts let's say packets .So you have to divide 2008 /9 and the integer part multiple with 45 plus the rest residue. Here is the right answer :  2008/9=223.11...       223*9=2007  (the integer part)  Make the difference 2008-2007=1   so...  223*45+1 =10036 

balifid

Consider the sum of the digits of all numbers from 0 to 999.

The digit 5 occurs in the tens place one out of every ten times, that is, 100 times.

The same is true for every digit, and for each of three decimal places, so that the sum is (0+...+9)*3*100 = 13500.

So the sum of the digits in 0...1999 is 2*13500+1000, and the rest you can add manually.

FT-physicist

It is not true because 5 occurs in 5-th position in every packet with 9 digits (numbers integer ) !

Thijs

balifid's method makes more sense to me than JWFT's. Just count how often you see each digit. Say we count the sum of 1 to 2000. You see the 3 in 1s in 1 out of 10 cases, that is 200 times. Same for all others. Also, same for all 10s and 100s; every digit occurs 1 in 10 times. Then for thousands you see the 1 1000 times and the 2 one time. So that's 3*200*(1+2+...+9) + 1000*1 + 2 = 28002. Add the last 8 terms to get 28002 + 8*2 + (1+2+..+8) = 28055.

By the way JWFT, your packet system is obviously flawed. Your "induction" is based on only two groups while with the third group it already goes wrong when you say 1+9 = 1.

FT-physicist

Oops i missed something ! I confuse with known mathematical problem wich is very similar . Send apologise to all ,sorry . O.K. !!  Embarassed

strangequark

For those interested in mathematical induction one extremely well-known consequence is:

0 + 1 + 2 + \cdots + n = \frac{n(n + 1)}{2},

as well as many basic calculus rules

ColdCoffee
Elroch wrote:

I think the idea is that the finding of a way to calculate it is good mental exercise. Break up the numbers into groups that are different in some way, then look at the individual digits in each group. I hope that's vague enough not to ruin it for you.


I agree with Elroch here. Knowing how to do this calculation will likely not help you on the exam. I would be very surprised if you used this specific result. Instead, ask yourself what problem solving strategies could lead you to an answer. IE: what do you already know.

Personally, I like geometry. This problem is very easy to solve using basic geometry. Consider the case: 1+2+3+4+5

How could we model this sum in a geometric way to where you could use the power of geometry?

How about considering unit area squares stacked on top of each other. What shapes can you form easily? What identities could you use?

I wont ruin the fun for you. If I give you the answer, then you were simply told how to do it, the solution belongs to me. If you figure it out, you get to claim the solution for yourself.

Happy crunching!

Let us know if you need more ideas!

Wakarimasen

You can quickly calculate by cutting the list into two and summing pairs

1+2008 = 2009
2+2007 = 2009
...
1004+1005 + 2009

Now just 1 multiplication 1004*2009= 2 017 036

slowtarget

@ Wakarimasen : Yes, nice elegant answer - but totally wrong.

He needs to find the sum of the digits...

Wakarimasen

Whoops, that's what I get for reading the problem too quickly.

Try #2,

Breaking the problem into 2 parts, we can compute the digit sum from 1 to 1999 and the digit sum from 2000 to 2008.

For the first sum, we can treat all the numbers as 4 digits with leading zeros as appropriate.

The first digit for any number in the sequence has an equal probability of being 0 or 1 and the remaining digits have an equal probability of being any value between 0 and 9.

So the sum of the leading digit is 2000*(0/2 + 1/2) = 1000

The sum of each remaining digit is 2000*(0/10 + 1/10 + ... + 9/10) = 9000

The digit sum from 1 to 1999 is 1000 + 3*9000 = 28000

Now for the second digit sum: 

The leading digit is always 2 and the trailing digit varies from 0 to 8.  So the digit sum is

9*2 + 1 + 2 + 3 + ... + 8 = 54

digit sum from 1 to 2008 = 28000 + 54 = 28054

Verifying in Maple...

DigitSum := proc(n) 
  local t1, t2;
  t1 := n; t2 := 0; 
  while t1 <> 0 do 
    t2 := t2 + (t1 mod 10); 
    t1 := floor(t1/10); 
  end do: 
  t2; 
end:

 

SequenceSum:=proc(n) 
  local sum, i;
  sum := 0;
  for i from 1 to n do
    sum := sum + DigitSum( i );
  end do:
  sum;
end:

SequenceSum(2008);

                             28054

Chessplayer04

Thank you for all of your clues and help. I now understand what I did not before.