*Tuesday, June 4th, 2019*

If n distinct digits are used to make all the possible n-digit numbers, we get n! numbers. We now want to find out the sum of all these n! numbers are added together. Let us take an example and understand how it is to be done and then look it as a formula.

To find the sum of all the four digit numbers formed using the digits 2,3,4 and 5 without repetition:

We can form a total of 4! or 24 numbers. When we add all these numbers, let us look at the contribution of the digit 2 to the sum.

When 2 occurs in the thousands place in a particular number, its contribution to the total will be 2000. The number of numbers that can be formed with 2 in the thousands place is 3!, i.e., 6 numbers. Hence, when 2 in the thousands place its contribution to the sum is 3! x 2000.

Similarly, when 2 occurs in the hundreds place in a particular number, its contribution to the total will be 200 and since there are 3! Numbers with 2 in the hundreds place, the contribution 2 makes to the sum when it comes in the hundreds place is 3! x 200.

Again, when 2 occurs in the tens and units place respectively, its contribution to the sum is 3! x 20 and 3! x 2 respectively. Hence, the total contribution of 2 to the sum is 3! (2000+200+20+2) i.e. 3! x 2222. This takes care of the digit 2 completely.

In a similar manner, the contribution of the 3,4, and 5 to the sum will respectively be 3! x 3333, 3! x 4444, 3! x 5555, i.e.,

3! x (2+3+4+5) x 1111

We can now generalize the above as

â€œ*If all the possible n-digit numbers using n distinct digits are formed, the sum of all the numbers so formed is equal to (n-1)! x {sum of all the digits} x {111â€¦â€¦.} n times. *

**E.g:**

**Example 1:** What would be the sum of all the numbers which can be formed by using the digits 1, 3, 5, 7 all at a time and which have no digits repeated?

**Sol:** Sum of the numbers formed by taking all the given n digits is ( sum of all the n digits ) xÂ (n-1) ! x (111…..n times).

Here n = 4. and Sum of 4 digits = 16

The sum of all the numbers which can be formed by using the digits 1, 3, 5, 7 is

= ( 16 ) x ( 4 – 1)! x ( 1111)

= 16 x 3! x 1111.

**Example 2:Â **What would be the sum of all numbers formed by the digits 2, 3, 5, 7 and 9 excluding all those numbers which will start from 5.

**Sol:** Firstly, we will find the sum of all numbers which can be formed using the given digits by using the above formula i.e.

(n-1)! x {sum of all the digits} x {111â€¦â€¦.} n times

Here n= 5;

Sum of digits = 2+3++5+7+9 = 26

Hence, 4! x 26 x (11111) = 6933264

But this sum will include all those numbers which are having 5 as the first digit.

So, find the sum of all numbers which are having 5 as the first digit, using the above-mentioned concept we have:

4! x 50000= 1200000

On subtracting this from the original number we get 5733264 as an answer.

**Example 3:Â **Find the sum of all numbers that can be formed using the digits 7,9,5,6 and 2 excluding which will have 5 at first place and 6 at hundredâ€™s digit.

**Sol:** Again firstly we will find the total sum of all numbers which can be formed using all digits.

Here n=5, Sum of digits: 7+9+5+6+2 = 29

Hence, 4! x 29 x (11111) =Â 7733256

Now, the contribution to the sum by 5 at first place would be: 4! x 50000 = 1200000

And, contribution to the sum by 6 at hundredâ€™s digit: 4! xÂ 600 = 14400

Subtracting these numbers sum from the original sum will give the answer i.e.

7733256 â€“ (1200000 + 14400) = 6518856

**Example 4:Â **What would be the sum formed by using the digits 2,3,4,6,0, in which the position of 0 is fixed at the hundredâ€™s digit.

**Sol:** In this question, we have to find the sum of all numbers which can be formed using the above digits in which the position of 0 is fixed at hundredâ€™s digit i.e _ _ 0 _ _

We can simply see that fixing 0 at hundredâ€™s position will not do any contribution by hundredâ€™s digit i.e. to find the answer firstly we have to find the total sum and then subtract the contribution of all digits at hundredâ€™s digit from it.

Here n= 5,

Sum of digits = 15

Total Sum: 4! x 15 x 1111 1=3999960

Now the contribution at hundredâ€™s digit can be given by: (Sum of digits) x 111 x 24 (as there are 4 digits and 3 positions to fill which can be done by 24 ways) =Â 15 x111 x 24

Hence, the answer is : 3999960 â€“ 39960 = 39959640

*Note: Here 24 is 4! it’s just a coincidence, it doesnâ€™t imply that we have to multiply to 4! to find the contribution of hundredâ€™s digit.*

**Example 5:Â **Suppose there are 5 digits 2,7,0, 5, 3. Now we have to find the sum of all those numbers in which the evenâ€™s digit would be at even position.

**Sol:** In a 5 digit number there would be two even positions which would be tenâ€™s and thousandâ€™s place. The above-given digits have two even digits, which are: 2, and 0. These should be at even position.

Now, 0 digits canâ€™t contribute to the sum at both positions, i.e. if it would be at tenâ€™s position there would be no contribution in the sum by tenâ€™s digit.

Firstly, find the total sum.

Here, n= 5.

Sum of digits = 17.

Hence, sum = 4! x 17 x 11111 = 4533288

If 2 is fixed at thousandâ€™s and tenâ€™s position,Â it means there would be no contribution of otherâ€™s digit at these positions.

Therefore, contribution of other digits at thousandâ€™s place = (7+0+5+3) x 1111 x3! =99990

Contribution of other digits at tenâ€™s place = (7+0+5+3) x 11 x 3! = 990

Since there would be no contribution of 0 at thousandâ€™s and tenâ€™s digit so we will find the total contribution of the remaining digits at these positions:

Contribution at thousandâ€™s position: (2+3+5+7) x 1111 x 24 = 17 x 1111 x 24 = 453288

Contribution at tenâ€™s position: (2+3+5+7) x 11×24 = 4488

Now, to find the answer subtract all these contributions from the total sum, therefore:

4533288 â€“ (99990 + 990 + 453288+4488) = 3974532

*To solve these questions you should be good in calculations, although an on-screen calculator is given in CAT still solving these questions could be time-consuming so solve only when you have enough time left.*

Divisibility Rules for CAT Quantitative Aptitude Preparation

Baisc Idea of Remainders

Application of LCM (Lowest Common Multiple) in solving Quantitative Aptitude Problems

How to Find Number of Trailing Zeros in a Factorial or Product

Dealing With Factorials

All questions from CAT Exam Quantitative Aptitude – Number Systems

Quantitative Aptitude – Number Systems – Q1: If the product of three consecutive positive integers is 15600 then the sum of the squares of these integers is

Quantitative Aptitude – Number Systems – Q2: If a, b, c are three positive integers such that a and b are in the ratio 3 : 4 while b and c are in the ratio 2:1, then which one of the following is a possible value of (a + b + c)?

Quantitative Aptitude – Number Systems – Q3: The numbers 1, 2,â€¦,9 are arranged in a 3 X 3 square grid in such a way that each number occurs once and the entries along each column, each row, and each of the two diagonals add up to the same value.

**a)** 750+ Videos covering entire CAT syllabus**b)** 2 Live Classes (online) every week for doubt clarification**c)** Study Material & PDFs for practice and understanding**d)** 10 Mock Tests in the latest pattern**e)** Previous Year Questions solved on video

## Leave a Reply