So I was given this question. How many $10-$digit decimal sequences (using $0, 1, 2, . . . , 9$) are there in which digits $3, 4, 5, 6$ all appear?
My solution below (not sure if correct)
Let $A_i$ = set of sequences of $n$ digits where $i$ does not appear. The number of $n$ digit decimal sequences = the total number of decimal sequences minus those that do not have either $3, 4, 5,$ or $6$. That is we wish to calculate $10^n - |A_1 \cup A_2 \cup A_3 \cup A_4| = 10^n - |A_1| − |A_2| − |A_3| - |A_4| + |A_1 \cap A_2| + |A_1 \cap A_3| + |A_2 \cap A_3| + |A_1 \cap A_4| + |A_2 \cap A_4| + |A_3 \cap A_4| − |A_1 \cap A_2 \cap A_3 \cap A_4|$ where $10^n$ represents the number of sequences of n digits and $|A_1 \cup A_2 \cup A_3 \cup A_4|$ represents the number of n digit sequences that either do not have a $3$ or a $4$ or a $5$ or a $6$. $|A_i| = 9^n, |A_i \cap A_j | = 8^n$ and $|A_1 \cap A_2 \cap A_3 \cap A_4| = 7^n$. The answer is then $10^n − 4 \cdot 9^n + 4 · 8^n − 7^n$
Is this correct?