0
$\begingroup$

I feel the answer should be $nC3 \times 3! \times 10^{n-3}$.

$\endgroup$
  • $\begingroup$ You are missing a couple of subtle points. Can you have leading zeros on your n digit number? i.e. is 1 considered an n-digit number by writing it 00...0001? Also, when you choose where to put the 1, 2, and 3 (your "nC3 X 3!") what happens when you have more than one 1? or more than one 2? you seem to do doing some over counting. $\endgroup$ – TravisJ Sep 30 '15 at 15:38
  • $\begingroup$ @TravisJ It is an n-digit sequence not an n-digit number $\endgroup$ – pranavps Sep 30 '15 at 15:56
  • $\begingroup$ @TravisJ But I got the overcounting part $\endgroup$ – pranavps Sep 30 '15 at 15:56
  • $\begingroup$ Thanks. I overlooked the sequence/number distinction. $\endgroup$ – TravisJ Sep 30 '15 at 16:16
2
$\begingroup$

The number of $n$ digit sequences is $10^n$. The number missing $1$ is $9^n$, so we would subtract $3\cdot 9^n$ to remove the ones missing $1, 2, \text { or }3$, but now we have removed the ones missing $1$ and $2$ (or any other pair) twice so we have to add back in $3 \cdot 8^n$. Now the ones missing all of $1,2,3$ have been removed three times and added back three times, so we subtract them once more. Finally we have $10^n-3\cdot 9^n + 3 \cdot 8^n-7^n$. This is known as the inclusion-exclusion principle

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.