How many 7-digit even numbers less than 3000000 can be formed using all the digits 1,2,2,3,5,5,6?

I've somewhat got this question down but I'm only half way.

How many $7$-digit even numbers less than $3,000,000$ can be formed using all the digits $1,2,2,3,5,5,6$?

So I figured that there's about $4$ possible approaches

$1$ _ _ _ _ _ $6$
$1$ _ _ _ _ _ $2$
$2$ _ _ _ _ _ $6$
$2$ _ _ _ _ _ $2$

How do I fill in the middle? I tried $5!$ and dividing out the similar factorials but I didn't get the right answer .

It appears that both previous answers missed that the number was to be even. So the real count is 5!/2! + 5!/2!/2! + 5!/2! + 5!/2! = 210

• Nicely spotted! (I'm going to delete my answer) – Douglas S. Stones Sep 18 '10 at 1:19

We actually have only two cases: 1... and 2... .

In the first case, we have to fit the numbers 2,2,3,5,5,6 somehow. Imagine that we tag each of the repeated elements somehow, e.g. 2',2",3,5',5",6. If we care about the tags, then there are $6!$ possible ways to arrange the numbers. Now each untagged arrangement corresponds to $2!2!$ different tagged arrangements (consider the order in which the tags on the $2$s and $5$s appear). In total, this gives $6!/2!2!= 180$.

In the second case, we have only one repeated element $5$ so there are $6!/2! = 360$ possibilities, for a total of $540$.

In general, if we have $k$ unique elements repeated $t_1,\ldots,t_k$ times (respectively), then the answer is going to be $(t_1+\cdots+t_k)!/t_1!\cdots t_k!$, using the same reasoning. This is known as a multinomial coefficient since it appears in the multinomial theorem:

$$(x_1 + \cdots + x_k)^n = \sum_{t_1 + \cdots + t_k = n} n!/t_1!\cdots t_k! x_1^{t_1} \cdots x_k^{t_k}$$

where the sum is over all non-negative integers summing to $n$. The multinomial coefficient is sometimes denoted $\binom{n}{t_1\ldots t_k}$, although one of these numbers is really redundant. When $k=2$ we get the binomial coefficient, and we usually omit $t_2$.

• This can be checked computationally: In GAP, Size(Filtered(PermutationsList([1,2,2,3,5,5,6]),i->i<3)); which agrees with the result in this answer. – Douglas S. Stones Sep 17 '10 at 3:42
• Note that the question asks for even numbers, which is why OP made four different cases. This answer counts all the numbers. – Dominik Dec 19 '16 at 23:19

Try the multinomial coefficient.

Everything you have done is right on the money. Your computation method (if I understand it correctly) should work. The answer to your last question (regarding what should be "in-between") is:
For $1.....6$: $5! / 2! / 2! = 120 / 4 = 30$
For $1.....2$: $5! / 2! = 120 / 2 = 60$
For $2.....6$: $5! / 2! = 120 / 2 = 60$
For $2.....2$: $5! / 2! = 120 / 2 = 60$
$60 + 60 + 60 + 30 = 210$
Therefore, the answer to the first question, regarding the right number, is 210. You can easily check for yourself that this is the right answer, with a small computer program that looks something like this:

Iterate through numbers $1000000$ to $3000000$, with increments of $2$.
For each iteration:

• Go through all digits in the number and count the number of times each digit is appearing.
• If digits 1, 2, 3, 5 and 6 appear the required number of times, increment the result variable with one.
• Repeat.
Once the iteration is complete, the result variable should contain the number 210.

Lets think that first digit is fixed due to which we get x __ __ __ __ __ __

Now these 6 places can be filled with 6 digits therefore total number of possibilities for the other 6 digits can be given as 6!

but here X has 2 possibilities so total no of possibilities = $$2*6! = 1440$$

At last we have two 2's and two 5's so we get $$\frac{1440}{2!*2!} = 360$$

• This is incorrect in two ways. First of all, the question asks how many ways there are to get an even number. Secondly, you can't just divide by $4$, since you count all the numbers where the first digit is a $2$ only twice, not four times. – Dominik Dec 19 '16 at 23:16