# Probability a 9-digit number has the digits 2,4, and 6 next to each other.

The integers $1,2,3,....,9$ are arraned (at random) in a row, resulting in a $9$-digit integer (without replacement). What is the probability that:

The result is even? $\frac49$ or $\frac{4(8!)}{9!}$

The result is divisible by $5$? The number must end in $0$ or $5$. Edit: As Andre pointed out we have no $0$. So, $\frac19$. or $\frac{(8!)}{9!}$

The digits $2, 4,$ and $6$ are next to each other (in any order)? The above two I have confidence in, it is this last one I'm a little confused on.

$9\choose 3$ ways to position $2,4,6$ in the 9-digit number and $3!$ ways they can be arranged. This doesn't appear to be right as after you divide by $9!$ you get $.13$% which seems unreasonably low. So, I thought to multiple by $6!$ to account for the number of ways the other $6$ numbers can be arranged. This gives you:

$9\choose 3$$3!6!/9!$

which equals $1$, and obviously isn't right. Any suggestions as to where I went wrong would be great.

-
You're right! Silly me. – Vincent Jun 16 '14 at 22:47

For $2,4,6$ next to each other, imagine choosing the $3$ spots that will be reserved for our three favoured guests. This can be done in $\binom{9}{3}$ equally likely ways.

The three spots can be in a row in $7$ ways, for the leftmost of the spots can be in any of the positions $1$ to $7$. Thus the required probability is $\frac{7}{\binom{9}{3}}$. This simplifies nicely.

We can imitate this argument with $9!$ in the denominator. The number of ways to arrange the people so that $2$, $4$, and $6$ are in a row is $(7)(3!)(6!)$.

Alternately, we can stuff $2$, $4$, and $6$ in a bag, and arrange the remaining numbers and the bag in $7!$ ways. Then $2,4,6$ come out of the bag and arrange themselves in $3!$ possible orders, for a total of $7!3!$.

-

Let $2,4,6 = a$. Now you have $1,3,5,7,8,9,a$. Clearly there are $7!$ permutations of them.

Now let $4,2,6 = b$. And with the same idea... You will get another $7!$ permutations.

The result easily follows.

-

In your work, you didn't factor in the fact that those 3 numbers have to be together such that $\binom{9}{3}$ is the wrong term to count this. This is because $\binom{9}{3}$ counts positions where those 3 numbers could be separately spaced from each other.

-