1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sum of digits

  1. Feb 12, 2007 #1
    1. The problem statement, all variables and given/known data

    Find the sum of all the digits in the integers from 1 to 1 000 000 000.
    Ex: 2378:2+3+7+8=20


    2. Relevant equations

    We're not supposed to use equations for the sum of a series.

    3. The attempt at a solution

    I really don't have much of a clue as to how to start, so any help pointing me in the right direction would be great.
     
  2. jcsd
  3. Feb 12, 2007 #2
    Start by trying it for a smaller set, try 1 to 10.
     
  4. Feb 13, 2007 #3
    I tried it out by adding the digits of the integers on opposing sides of 1 and a billion and got a final answer of 412 999 999 921. I'm not sure if this is anywhere near the right answer though.
     
  5. Feb 13, 2007 #4

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    There is a trick you can use.......Think about it some more......

    Hint: it involves the first digit and the last digit.
     
  6. Feb 15, 2007 #5
    Hello Qwark,

    could you elaborate how you got to the answer of 412 999 999 921?


    My calculations yielded:

    4,05*10^{10}+1= 40 500 000 001

    I first calculated the sum of the digits of the numbers from:
    1 to 9 then
    10 to 99 then
    100 to 999 then
    1.000 to 9.999 then
    10.000 to 99.999 then
    100.000 to 999.999 then
    1.000.000 to 9.999.999 then
    10.000.000 to 99.999.999 then
    100.000.000 to 999.999.999 then
    1.000.000.000

    1 to 9 yields 45
    10 to 99 yields 855 and so on.

    Then I added the sums and got
    40 500 000 001

    Please check if you get the same result.

    I don't know how Dr. Transport's trick looks like but my solution
    contains an iteration.
     
    Last edited: Feb 15, 2007
  7. Feb 15, 2007 #6
    I can tell that I made a false asumption when I got the answer 412 999 999 921, I was trying to find a pattern by adding the digits of opposing numbers, and made a false assumption based on the first few answers and jumped to conclusions. I'm curious as to how you got the 4.05 in your calculation.
     
  8. Feb 18, 2007 #7
    Try calculating the sum of the digits of the numbers from 1 to 9. What do you get?

    After that, calculate the same for the numbers from 10 to 99. What do you get?

    Do it also for the numbers from 100 to 999. What do you get?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Sum of digits
  1. Digits probability (Replies: 3)

Loading...