MILLION DIGIT SUM

What is the sum of the digits of all numbers between 1 and a million?

NOTE: The numbers 1 and 1 million should be included.

27,000,002 72,000,001 72,000,002 27,000,001

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Abha Vishwakarma
Oct 10, 2018

Let's start simple.

Write the digits from 1 to a million as

1 , 2 , 3 , 4 , , 999996 , 999998 , 999999 , 1000000 1, 2, 3, 4, \dots \dots ,999996, 999998, 999999, 1000000

What I do is that I add a 0 0 before 1 1

Hence our sequence now looks like

0 , 1 , 2 , 3 , , 999996 , 999997 , 999998 , 999999 , 1000000 0, 1, 2, 3, \dots \dots, 999996, 999997, 999998, 999999, 1000000

Then I add the numbers in pairs in this way -

999999 + 0 = 999999 999998 + 1 = 999999 999997 + 2 = 999999 . . . \begin{aligned} 999999 + 0 &= 999999 \\ 999998 + 1 &= 999999 \\ 999997 + 2 &= 999999 \\ . . . \end{aligned}

In this way, we see that we get the same number 999999 999999 as the sum of the pairs. Note that this method does not change the sum of the digits of the numbers since we never add any two digits whose sum is greater than 9 9 .

Now the number 999999 999999 has been repeated half a million times so the sum of all of the digits of the numbers from 1 1 to 999999 999999 is 9 × 6 × 500000 = 27 , 000 , 000 9 \times 6 \times 500000 = 27,000,000 .

But the 1 1 in 1000000 1000000 hasn't been added. After adding it we get the sum as 27 , 000 , 001 27,000,001 .

Otto Bretscher
Oct 10, 2018

There are a million numbers between 000,000 and 999,999 (including) with a total of 6 million digits with an average value of 4.5, so that the sum of all digits is 6 , 000 , 000 × 4.5 = 27 , 000 , 000 6,000,000\times 4.5 =27,000,000 . We pick up an additional 1 from 1,000,000, for a grand total of 27 , 000 , 001 \boxed{27,000,001} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...