Hard way or the smart way?

Find the sum of all 5 digited numbers formed using the digits,
2 , 4 , 0 , 3 , 0 2,4,0,3,0 Note :
Each digit must be used as many times as it's provided.
You may use a calculator for the last part.

Bonus :
Find a generalised solution to the problem.


The answer is 1139994.

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.

1 solution

Let us first define some terms,
Sum of given n digits = S n S_{n}
R n = 111 1 n times R_{n} =\underbrace{111\ldots1}_\text{n times}
Case 1 : Given digits do not include 0.
Suppose we are given n digits, not necessarily unique. Let the number of times a particular digit is repeated be a,b,c,d... and so on.
The total numbers formed using the digits = n ! a ! b ! c ! d ! = \dfrac{n!}{a!b!c!d!\ldots}
Out of the n given digits, each digit occurs ( n ) ! a ! b ! c ! d ! 1 n = ( n 1 ) ! a ! b ! c ! d ! \dfrac{(n)!}{a!b!c!d!\ldots} \dfrac{1}{n} = \dfrac{(n-1)!}{a!b!c!d!\ldots} in the units place, tens place, hundreds place and so on.
The contribution of the one particular digit = ( 1 0 n 1 + 1 0 n 2 100 + 10 + 1 ) × ( n 1 ) ! a ! b ! c ! d ! × \left(10^{n-1} + 10^{n-2} \ldots 100 + 10 + 1\right) \times \dfrac{(n-1)!}{a!b!c!d!\ldots} \times (Value of the digit) = R n ( n 1 ) ! a ! b ! c ! d ! × R_{n}\dfrac{(n-1)!}{a!b!c!d!\ldots}\times (Value of the digit )


Therefore sum of all the numbers formed = ( Sum of all digits ) × R n ( n 1 ) ! a ! b ! c ! d ! = S n × R n ( n 1 ) ! a ! b ! c ! d ! \times R_{n}\dfrac{(n-1)!}{a!b!c!d!\ldots} = S_{n} \times R_{n}\dfrac{(n-1)!}{a!b!c!d!\ldots}

Case 2 : Out of n digits, m of them are 0.
Sum of all numbers including those with 0 s 0s at front = S n × R n ( n 1 ) ! m ! a ! b ! c ! d ! ( 1 ) S_{n} \times R_{n} \dfrac{(n-1)!}{m!a!b!c!d!\ldots} \ldots (1)

Sum of numbers all numbers formed with 0 0 at front = S n × R n 1 ( n 2 ) ! ( m 1 ) ! a ! b ! c ! d ! ( 2 ) S_{n} \times R_{n-1} \dfrac{(n-2)!}{(m-1)!a!b!c!d!\ldots} \ldots (2)
Required sum = ( 1 ) ( 2 ) (1) - (2)
\therefore Required sum = S n a ! b ! c ! d ! × ( R n ( n 1 ) ! m ! R n 1 ( n 2 ) ! ( m 1 ) ! ) \dfrac{S_{n}}{a!b!c!d!\ldots} \times \left(\dfrac{R_{n}(n-1)!}{m!} - \dfrac{R_{n-1}(n-2)!}{(m-1)!}\right)

For the given question
n = 5 , m = 2 n = 5, m = 2 S n = 9 S_{n} = 9
\therefore Sum of all numbers formed = 9 × ( R 5 4 ! 2 ! R 4 3 ! 1 ! ) = 9 × ( 11111 12 1111 6 ) = 9 × 126666 = 1139994 9 \times \left(\dfrac{R_{5}\cdot4!}{2!} - \dfrac{R_{4}\cdot3!}{1!}\right) = 9 \times \left(11111\cdot12 - 1111\cdot6\right) = 9 \times 126666 = 1139994

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...