Number of combinations of a six digit number (with a twist).

What is the formula for finding the total available combinations of a six digit number with the following criteria;

  1. You have to use all six digits.
  2. You can’t use any zeros.
  3. You can’t have the same two numbers show up in the six digit string together.

I get the first two. It would be 99999*9=531441, but that would include repeats of numbers. Now solve for the third criteria.

Your solution uses all nine numbers each time, but the amount of avaiable numbers goes down as you use 'em. So the answer is 98765*4=60480. I think.

SD

Not quite sure what that means. You can’t have the same number next to each other? So 121212 is OK but 121211 is not? If so, I think the answer is 98888*8. The first digit can be anything; each successive digit can be anything other than the preceding digit.

If you mean each number can be used only once, then it’s 98765*4.

9 X 8 X 7 X 6 X 5 X 4 = 60480

Er, I get 10[sup]6[/sup]=1,000,000 for (1), if by the criterion in (2) you are suggesting that all ten digits 0-9 are available for (1).

Or am I misunderstanding the problem?

And I believe that Spacedog is correct for (3).

No zeros, so you’d only have 9 numbers.