How many $6$ digit numbers are there that doesn't have number $2$ in them and have two $1$? Is this the right way to calculate it?

*

*If the first number is $1$, then there are $5$ ways to choose another $1$ and $4$ digits left that can be equal to $8$ different numbers
So in total $5\cdot8^4=20480$


*If the first number isn't $1$, then it can have $7$ different values. We can choose two $1$ in $5\cdot4$ ways and there are left $3$ digits that can be equal to $8$ different values.
In total $7\cdot5\cdot4\cdot8^3=71680$.
Adding all of this I get $92160$ different numbers.
 A: Here is another method to solve this.
Case 1: The digit '0' does not appear
This means that we have to choose numbers for $4$ vacant positions ($2$ out of $6$ will be filled by the digit $1$), and for each of these we can choose from $\{x: x \in [3,9], x\in \mathbb{N}\}$. Hence there are $7$ choices for each digit.
Also, we can choose the positions for the two $1's$ in $\binom 62$ ways. Hence, total numbers are:
$$N_1=\binom 62 7^4$$
Case 2: The digit '0' necessarily appears
Firstly let us not consider the constraint that the first digit can't be $0$. Then, the total number of such six digit strings must be:
$$N_2=\binom 62 8^4-\binom 62 7^4$$
Here the first term represents the total numbers in which the digit $0$ may appear, and from this we subtract the number in which $0$ doesn't appear, hence $N_2$ is the number of such strings where $0$ appears atleast once. Finally we apply the constraint that $0$ must not be the first digit. There would be $\binom 52 8^3$ such digits ($0$ is fixed as first digit, we select $2$ positions out of $5$ for the $1's$, and have $8$ choices each for the rest of the $3$ positions left).
Thus, we have finally:
$$N_3=N_2-\binom 52 8^3$$ digits for this case.
Thus, the total is $N_1+N_3=56320$, which disagrees with your calculations(your error has been pointed out by other commenters, hence this answer doesn't deal with that) but agrees with @Bulbasaur's answer.
A: $\mathbf{\text{Alternative Approach:}}$
By using exponential generating functions:
İf there are two $1's$ then the exponential generating function of it : $$\bigg(\frac{x^2}{2!} \bigg)$$
If there is not any two and do not have any restriction over the others then the exponential generating function of others : $$\bigg(1 + x +\frac{x^2}{2!}+\frac{x^3}{3!} +\frac{x^4}{4!}  \bigg)^8$$ , because of there are two $1's$ , we have maximum $4$ times same number.Moreover , because of any two and ones will not be used again , the exponential is $8$
Now find the coefficient of $x^6$ in the expansion of $$\bigg(1 + x +\frac{x^2}{2!}+\frac{x^3}{3!} +\frac{x^4}{4!}  \bigg)^8 \times \bigg(\frac{x^2}{2!} \bigg)$$ and multiply it by $6!$. (you can also find the coefficient of $\frac{x^6}{6!}$)
However , realize that this calculation counts the strings that start with zero , so we must subtract them from the result. Now, lets assume that it start with zero and have two $1's$.To do that , find the expansion of $$\bigg(1 + x +\frac{x^2}{2!}+\frac{x^3}{3!} +\frac{x^4}{4!}  \bigg)^8 \times \bigg(\frac{x^2}{2!} \bigg)$$
, after that find the coefficient of $x^5$ and multiply it by $5!$.(you can also find the coefficient of $\frac{x^5}{5!}$)
Now , it is the time for subtracting them..
Calculation by wolfram
$$6! \times \frac{256}{3} - 5! \times \frac{128}{3}=61440-5120=56320$$
Unfortunately, your answer is wrong..
A: Here is a shorter version:
Start with two ones, no twos, then the number of all possible combinations of
six digit numbers (except that I am not taking into account a leading '0'digit for now)
is
$$ \frac{6!}{4!2!}\times 8^4=15\times 8^4=61440.$$
Now subtract all such numbers with a leading zero.
That will include all 5, 4, 3 and 2 digit numbers.
This number of combinations is
$$ \frac{5!}{3!2!}\times 8^3=5120.$$
Hence, the desired number is
$$ \frac{6!}{4!2!}-\frac{5!}{3!2!}=56320$$
in agreement with the other proposed solutions by @Bulbasaur and @Ritam_Dasgupta.
A: Digit 1 will not be the first digit $\binom52/\binom62=\frac23$ of the time
and 0 will be the first digit $\frac23\frac18 = \frac1{12}$ of the time
Thus total valid numbers = $\frac{11}{12}\binom62 8^4 = 56320$
