That's the only numbers I know

The number of seven digit integers, with the sum of digits equal to 10 and formed by using the digits 1,2 and 3 only is,

To try more such problems click here .


The answer is 77.

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.

7 solutions

Benjamin Wong
May 29, 2014

Combinations are 1 111 123---a, and 1 111 222---b only. So number of permutations are a: 7!/5!, and b: 7!/3!4!=42+35=77

i was wondering if ans could have been 154=77*2 as he said integer (including negative number)

Ranjeet Neve - 7 years ago

Log in to reply

well you are right that if number of integers is given then negative numbers can be included but we just have to find the number of numbers formed by the digits 1,2 and 3 so there is no chance of having negative numbers.

Harshvardhan Mehta - 6 years, 10 months ago

if its negative integers ans will not be 154 it will be more than than

Pavan Thatha - 6 years, 11 months ago

it could also be 2131111

Rohan Aggrawal - 7 years ago

1231111 why it is wrong???? but it is true

Shubham Tomar - 6 years, 12 months ago

co-efficient of x^10 in the expansion of (x+x^2+x^3)^7

nice trick!!!

Abbasuddin Ahammed - 7 years ago

Log in to reply

It's called the 'generating functions' method in case you want to look up more about it. It's a very useful method in problems such as this.

Melissa Quail - 6 years, 3 months ago

Can you generalize this? @Swayambhu Nath Ray

Krishna Ar - 7 years ago

Log in to reply

We have 7 digits made up of 1, 2, 3. In algebraic multiplication the power of the variables get added. Hence we can represent each digit as (x+x^2+x^3) so that the powers(1, 2, 3) get added when multiplied by the algebraic form of the remaining digits which is actually the sum of the digits of the number possible. Here the sum of the digits is 10. Hence the number of times x^10 comes out of the expression (x+x^2+x^3) will give us the answer.

Swayambhu Nath Ray - 7 years ago

Log in to reply

Could you tell me more such tricks? :)

Krishna Ar - 7 years ago

Log in to reply

@Krishna Ar I am not good in maths.. ☺

Swayambhu Nath Ray - 7 years ago

Log in to reply

@Swayambhu Nath Ray But that was such a cool trick!!!!!!!!

Krishna Ar - 7 years ago

Log in to reply

@Krishna Ar that was just a trick. 😊😐

Swayambhu Nath Ray - 7 years ago

Wow! Great! Really nice to know this :D..Let me try ( let' see :P) to prove this using binomial theorem.

Krishna Ar - 7 years ago
Shabarish Ch
May 30, 2014

First, we make the choice of numbers. The only possible choices are 1 , 1 , 1 , 1 , 1 , 2 , 3 1, 1, 1, 1, 1, 2, 3 and 1 , 1 , 1 , 1 , 2 , 2 , 2 1, 1, 1, 1, 2, 2, 2 . Why these are the only two possible choices is a little hard to explain, but think about it logically and you will understand.

The number of numbers possible in the first case is 7 ! 5 ! = 42 \frac{7!}{5!} = 42 . Here, 7 ! 7! represents the number of ways to arrange 7 things and we divide it by 5 ! 5! because the 5 "ones" arranged in any way are the same. Similarly, the number of numbers possible in the second case are 7 ! 3 ! × 4 ! = 35 \frac{7!}{3! \times 4!} = 35 . Here, we are dividing by both 4 ! 4! and 3 ! 3! to account for the "ones" and the "twos".

So, the total no. of numbers possible is 42 + 35 = 77 42 + 35 = \boxed{77}

HEY! IN SECOND CASE ITS NOT 5! ITS 3!

Jayakumar Krishnan - 7 years ago

Log in to reply

Thanks for notifying. I have corrected the error.

Shabarish Ch - 7 years ago

Log in to reply

Welcome :)

Jayakumar Krishnan - 7 years ago
Laurent Shorts
Feb 17, 2017

That is the same as having 7 urns and 10 balls, and you want to put at least 1 ball, but no more than 3, in each urn.

As there's at least one ball, you put one in each urn and you're left with 3 balls to put wherever you want, but not all in the same urn.

There's ( ( 7 3 ) ) = ( 7 + 3 1 3 ) = 84 \Big(\!\!\Big(\begin{matrix}7\\3\end{matrix}\Big)\!\!\Big)={7+3-1\choose3}=84 ways to put the 3 balls, but we don't want the 7 ways where all are put in the same urn. That leaves 84 7 = 77 84-7=\boxed{77} .


( ( n p ) ) \Big(\!\!\Big(\begin{matrix}n\\p\end{matrix}\Big)\!\!\Big) is the multicombination: choosing p p times from n n elements without order where it is allowed to choose the same element multiple times.

Abhisek Panigrahi
Oct 24, 2017

As the sum of digits has to be 10 and each digit is out of {1, 2, 3}.

Let's think this in a different way. There are 7 children and we have 10 chocolates, we need to distribute all the chocolates to all the children. In how many ways we can do that ?

As each child must get at least 1 chocolate, we will distribute each child 1 chocolate. Now each 7 children has 1 chocolate in their hand. Now we have remaining 3 chocolates in our hand and we would like to distribute to the children.

  • Give 3 chocolates to 3 different child. That can be done in ( 7 3 ) {7 \choose 3} ways.
  • Give 2 chocolates to one child and 1 to another child. That can be done in 7 P 2 ^{7}P_2 ways.

\therefore The answer is ( 7 3 ) + 7 P 2 {7 \choose 3} + {^{7}P_2} = 77.

Kris Wright
Feb 15, 2021

The only 2 possible formats:

a) 5 1's, 1 2, and 1 3, e.g., 1111123, or 1121131

b) 4 1's, and 3 2's, e.g., 1111222, or 1212121

For a), there are ( 7 2 ) 7 \choose 2 * 2! = 21 * 2 = 42 ways.

For b), there are ( 7 3 ) 7 \choose 3 = 35 ways.

In total, there are 42 + 35 = 77 ways

Brock Brown
Feb 21, 2015

Python:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from itertools import product
def digit_sum(string):
    total = 0
    for digit in string:
        total += int(digit)
    return total
count = 0
for combo in product('123', repeat=7):
    test = ''.join(combo)
    if digit_sum(test) == 10:
        count += 1
print "Answer:", count

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...