<s>[INST] 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.
 [/INST] $\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..
</s>