4

I need to add up all the digits in the numbers $1$ to $10000$. How would I do that without using a calculator?

I don't get it one bit. We are doing something in our math class about this.

k170
  • 9,045

4 Answers4

4

As I understand it we are not told to sum up all the numbers from $1$ to $10\,000$ but the decimal digits of these numbers. Taking the numbers from $0000$ to $9999$ instead we have $10\,000$ numbers having four digits with an average value of $4.5$. The sum of all appearing digits therefore is $10\,000\cdot4\cdot 4.5=180\,000$. Add $1$ to this for the single number $10\,000$, and obtain $180\,001$ as final result.

  • Numberphile did a video on this and it looks like they used a similar method to what you outlined. https://youtu.be/Dd81F6-Ar_0 – AlgorithmsX Dec 31 '16 at 19:35
2

First note that the sum of $0$ through $9$ is $45$. Also note that from $0000$ to $9999$, each digit appears exactly $1000$ times, for each of the $4$ positions. Therefore, the sum of all digits in the numbers $1$ through $10000$ is $$45\cdot 4\cdot 1000 + 1=180001$$ I hope this helps you intuitively understand.

k170
  • 9,045
1

How many times does a 1 appear in the last digit? How many times does a 2 appear in the last digit? Etc.

How many times does a 1 appear in the 10's position? How many times does a 2 appear in the 10's position? Etc.

How many times does a 1 appear in the 100's position? How many times does a 2 appear in the 100's position? Etc.

How many times does a 1 appear in the 1,000's position? How many times does a 2 appear in the 1,000's position? Etc.

How many times does a 1 appear in the 10,000's position? (Answer: Exactly once.) How many times does a 2 appear int 10,000's position? (Answer: never.)

Answer those questions.

fleablood
  • 124,253
0

Hint Add first all digits up to $9999$.

Hint 2 Ignore the zeroes.

Hint 3 Each digit $1-9$ appears how many times in each of the four possible positions?

N. S.
  • 132,525