How many 6-digit numbers contain exactly 4 different digits?
My approach is: For any 3 digis same and the remaining 3 different(aaabcd)
4*9*8*7*6
For any 2 duplicate digits(aabb) and the remaining 2 different (aabbcd)
9*8*7*6*3
But I don't know how to add cases where there can be 0's can be as any digit but not the initial ones.
Can someone please help me if there is any simpler approach?
Since the answers in the linked question, I still feel are lacking, here I hope to answer in a more colorful way which avoids "division by symmetry" arguments.
Begin as you have by breaking it into cases: either a single number appears three times and three other numbers appear once or two numbers appear twice each and two other numbers appear once each.
Throughout all of the following explanations, let us imagine six slots in which we will fill balls of various colors.
Case 1: Let us imagine we have three blue balls and three red balls. The locations occupied by the blue balls will be correspond to the number which appears three times. Each red ball space will be one of the single appearing numbers.
Hence there are $20\cdot 9\cdot 9\cdot 8\cdot 7$ arrangements in this case.
Case 2: Here, we have two light blue balls, two dark blue balls, and two red balls. The locations of the red balls will correspond to those digits which appear only once each. The blue balls will correspond to the digits which are repeated, however since we don't actually care which one of the "pairs" was first (dark blue or light blue) in order to avoid over-counting we will forcibly place a lightblue ball in the left-most not-red spot.
Hence there are $15\cdot 3\cdot 9\cdot 9\cdot 8\cdot 7$ arrangements.
This gives a total of $9\cdot 9\cdot 8\cdot 7\cdot (20+3\cdot 15)=294840$ arrangements.