# How many 10 digit phone numbers have at least one of each odd digit ($5 \binom 94 \cdot 4! \cdot 10^5 + 4\binom 95 \cdot 5! \cdot 10^4$ is wrong?)

How many 10 digit phone numbers have at least one of each odd digit?

Same question as in the link. I came up with the following answer:

$$5\cdot \binom 94 \cdot 4! \cdot 10^5 + 4\cdot \binom 95 \cdot 5! \cdot 10^4=2,116,800,000$$

My strategy was to set in stone the 5 odd numbers first then fill in the rest of the number. But because the first digit can't be $$0$$, I split up the 10-digit number into two cases.

The first case was if it was odd. Then I had $$5$$ choices for the first digit. Then I choose 4 spots out of the remaining 9 to hold the rest of the 4 odd numbers, and then order the 4 odds however I want in those spots. So that's $$\binom 94 4!$$. The remaining 5 spots I just fill with whatever I want, so that's $$10^5$$.

The second case was if the first digit was even. Then I have $$4$$ choices: $$\{2,4,6,8\}$$. Then out of the remaining 9, I choose 5 spots, and fill them however I want: $$\binom 95 5!$$. Finally, the last four spots are whatever, so that's $$10^4$$.

Putting everything together, I get my expression above. Unfortunately, that's not the same value the answer in the link had, so I'm wondering where I went wrong. I've looked over my reasoning again and again, but I can't think of anything. If you find the error, is it possible that this approach could work given further tweaking? Or is the error too fatal? Thanks for any help!

In the other solution, he counted "all" $$10^{10}$$ numbers with $$10$$ digits. However, this is not the main point:
You strategy is "fix the $$5$$ odd integers $$\{1,3,5,7,9\}$$ in some positions and, then, complete it to obtain a wanted $$10$$-digits numbers". The mistake is that, in this way, you are counting more than once numbers which contain repeated odd digits. For instance, you counted 5123450000 twice: once fixing the starting block "512345" and the other time fixing "12345". The number of "countaing the same numbers" is even greater if you consider integers as 1234555555. Indeed, you obtain a much bigger solution than the one it should be.
As @PaoloLeonetti said, you count some number more than once. But you can count it by PIE: $$\sum_{i=0}^{i=5} (-1)^i\binom{5}{i}(10-i)^{10}$$ That in fact count all, then exclude numbers with one specific odd missing, then plus two specific odd missing (because they exclude twice) and...
• Even in your case the result is different (your result is multiple of $10^5$, while it shouldn't be). Find the mistake :) – Paolo Leonetti Oct 1 '19 at 7:01