How many 4 digit numbers in the octal number system exist such that they are formed using exactly three distinct digits

combinationscombinatoricssolution-verification

My approach :

I divided it into 2 cases firstly :Case 1) the numbers having no 0s and Case 2)the numbers having a 0 in them

so Case 1 :

choosing 3 digits out of 7 in 7c3 ways = 35 ways

now arranging the 4 digits in 4!/(2!) ways

therefore number of ways = 35 * 12 = 420

Now Case 2 :

Here we have selected one 0 , now remaining 2 digits can be chosen in 7c2 ways =21 ways

now arranging the 4 numbers we get ( 4!/2!) – 3! = 6 ways

giving total of 126 numbers

therefore my answer is coming out to be 420 + 126 = 546 numbers

But the answer is given as 1764 numbers, Can someone guide me on where am I going wrong , and how to correct

Best Answer

A neat way of solving without cases, using probability, is to first compute including leading $0's$ and multiply by $\frac78$ to exclude them.

Thus $\binom42\cdot 8\cdot7\cdot6\times\frac78 = 1764$