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

**URL:** <https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004>\
**Category:** Factual Questions\
**Created:** [April 24, 2006, 4:51pm UTC](https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004 "2006-04-24T16:51:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uncommon\_Sense](https://avatars.discourse-cdn.com/v4/letter/u/f9ae1b/32.png) [@Uncommon\_Sense](https://boards.straightdope.com/u/Uncommon_Sense)\
**Post date:** [April 24, 2006, 4:51pm UTC](https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004/1 "2006-04-24T16:51:49Z")

</div>

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 9_9_9_9_9\*9=531441, but that would include repeats of numbers. Now solve for the third criteria.

---

<div class="post-metadata">

**Author:** ![SpaceDog](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/spacedog/32/9932_2.png) [@SpaceDog](https://boards.straightdope.com/u/SpaceDog)\
**Post date:** [April 24, 2006, 4:57pm UTC](https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004/2 "2006-04-24T16:57:18Z")

</div>

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

SD

---

<div class="post-metadata">

**Author:** ![scr4](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@scr4](https://boards.straightdope.com/u/scr4)\
**Post date:** [April 24, 2006, 5:00pm UTC](https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004/3 "2006-04-24T17:00:27Z")

</div>

> [@](#):
>
> 1. You can’t have the same two numbers show up in the six digit string together.

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 9_8_8_8_8\*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 9_8_7_6_5\*4.

---

<div class="post-metadata">

**Author:** ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)\
**Post date:** [April 24, 2006, 5:01pm UTC](https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004/4 "2006-04-24T17:01:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Scarlett67](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/scarlett67/32/7387_2.png) [@Scarlett67](https://boards.straightdope.com/u/Scarlett67)\
**Post date:** [April 24, 2006, 5:04pm UTC](https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004/5 "2006-04-24T17:04:37Z")

</div>

> [@Uncommon Sense](#):
>
> I get the first two. It would be 9_9_9_9_9\*9=531441, but that would include repeats of numbers. Now solve for the third criteria.

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).

---

<div class="post-metadata">

**Author:** ![Uncommon\_Sense](https://avatars.discourse-cdn.com/v4/letter/u/f9ae1b/32.png) [@Uncommon\_Sense](https://boards.straightdope.com/u/Uncommon_Sense)\
**Post date:** [April 24, 2006, 5:37pm UTC](https://boards.straightdope.com/t/number-of-combinations-of-a-six-digit-number-with-a-twist/354004/6 "2006-04-24T17:37:48Z")

</div>

> [@Scarlett67](#):
>
> 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.
