<s>[INST] Probability all number will appear when rolling k n-sided dice If k balanced n-sided dice are rolled, what is the probability that each of the n different numbers will appear at least once?
A case of this was discussed here, but I’m not sure how to extend this. Specifically, I’m not sure how the to calculate the numbers that can repeat term in the accepted answer.
 [/INST] (Please allow me to use $n$ in place of your $k$, and $m$ in place of your $n$)
So we have $n$ fair $m$-face dice.
If you consider the dies to be distinct, by color or by launching them in sequence,  then
the space of events is given by $m^n$ equiprobable words (strings , m-tuples) of length $n$
formed out of the alphabet $\{1, 2, \ldots, m \}$.
Let's consider the development of
$$
\begin{array}{l}
 \left( {x_{\,1}  + x_{\,2}  +  \cdots  + x_{\,m} } \right)^n  =  \\ 
  =  \cdots  + x_{\,j_{\,1} } x_{\,j_{\,2} }  \cdots x_{\,j_{\,n} }  +
  \cdots \quad \left| {\;j_i  \in \left\{ {1, \ldots ,m} \right\}} \right.\quad  =  \\ 
  = \sum\limits_{\left\{ {\begin{array}{*{20}c}
   {0\, \le \,k_{\,j} \,\left( { \le \,n} \right)}  \\
   {k_{\,1}  + k_{\,2}  + \, \cdots  + k_{\,m} \, = \,n}  \\
\end{array}} \right.\;} {\left( \begin{array}{c}
 n \\  k_{\,1} ,\,k_{\,2} ,\, \cdots ,\,k_{\,m}  \\ 
 \end{array} \right)x_{\,1} ^{k_{\,1} } x_{\,2} ^{k_{\,2} }  \cdots x_{\,m} ^{k_{\,m} } }  \\ 
 \end{array}
$$
where
$$x_{\,j} ^{k_{\,j} } $$
accounts for the $j$th face (character) repeated $k_j$ times, and where putting the $x$'s at 1 we get
$$
\begin{array}{l}
 \left( {\underbrace {1 + 1 +  \cdots  + 1}_m} \right)^n  = m^n  =  \\ 
  = \sum\limits_{\left\{ {\begin{array}{*{20}c}
   {0\, \le \,k_{\,j} \,\left( { \le \,n} \right)}  \\
   {k_{\,1}  + k_{\,2}  + \, \cdots  + k_{\,m} \, = \,n}  \\
\end{array}} \right.\;} {\left( \begin{array}{c}
 n \\  k_{\,1} ,\,k_{\,2} ,\, \cdots ,\,k_{\,m}  \\ 
 \end{array} \right)1^{k_{\,1} } 1^{k_{\,2} }  \cdots 1^{k_{\,m} } }  =  \\ 
  = \sum\limits_{\left\{ {\begin{array}{*{20}c}
   {0\, \le \,k_{\,j} \,\left( { \le \,n} \right)}  \\
   {k_{\,1}  + k_{\,2}  + \, \cdots  + k_{\,m} \, = \,n}  \\
\end{array}} \right.\;} {\left( \begin{array}{c}
 n \\  k_{\,1} ,\,k_{\,2} ,\, \cdots ,\,k_{\,m}  \\ 
 \end{array} \right)}  \\ 
 \end{array}
$$
Out of these we want to number the cases in which $k_1, k_2 , \ldots, k_m$ are at least one, i.e.
$$
N\left( {n,m} \right) = \sum\limits_{\left\{ {\begin{array}{*{20}c}
   {1\, \le \,k_{\,j} \,\left( { \le \,n} \right)}  \\
   {k_{\,1}  + k_{\,2}  + \, \cdots  + k_{\,m} \, = \,n}  \\
\end{array}} \right.\;} {\left( \begin{array}{c}
 n \\  k_{\,1} ,\,k_{\,2} ,\, \cdots ,\,k_{\,m}  \\ 
 \end{array} \right)} 
$$
There are $\binom{m}{m-l} = \binom{m}{l}$ ways to choose $m-l$ characters not appearing and leaving $l$ to appear at least once
so it shall be
$$
\begin{array}{l}
 m^n  = \sum\limits_{\left\{ {\begin{array}{*{20}c}
   {0\, \le \,k_{\,j} \,\left( { \le \,n} \right)}  \\
   {k_{\,1}  + k_{\,2}  + \, \cdots  + k_{\,m} \, = \,n}  \\
\end{array}} \right.\;} {\left( \begin{array}{c}
 n \\  k_{\,1} ,\,k_{\,2} ,\, \cdots ,\,k_{\,m}  \\ 
 \end{array} \right)}  =  \\ 
  = \sum\limits_{\left( {0\, \le } \right)\,l\,\left( { \le \,m} \right)} {\left( \begin{array}{c}
 m \\  l \\ 
 \end{array} \right)\sum\limits_{\left\{ {\begin{array}{*{20}c}
   {1\, \le \,c_{\,j} \,\left( { \le \,n} \right)}  \\
   {c_{\,1}  + \,c_{\,2}  +  \cdots \, + c_{\,l} \, = \,n}  \\
\end{array}} \right.} {\;\left( \begin{array}{c}
 n \\  c_{\,1} ,\,c_{\,2} , \cdots \,,c_{\,l} \, \\ 
 \end{array} \right)} }  \\ 
 \end{array}
$$
But also it is, from the definition of the Stirling N. of 2nd kind
$$
\;m^{\,n}  = \sum\limits_{\left( {0\, \le } \right)\,k\,\left( { \le \,n} \right)} {\left\{ \begin{array}{c}
 n \\  k \\  \end{array} \right\}\,m^{\,\underline {\,k\,} } }
  = \sum\limits_{\left( {0\, \le } \right)\,k\,\left( { \le \,n} \right)} {k!\left\{ \begin{array}{c}
 n \\  k \\  \end{array} \right\}\,\left( \begin{array}{c} m \\  k \\  \end{array} \right)} 
$$
and therefore
$$
N\left( {n,m} \right) = \sum\limits_{\left\{ {\begin{array}{*{20}c}
   {1\, \le \,k_{\,j} \,\left( { \le \,n} \right)}  \\
   {k_{\,1}  + k_{\,2}  + \, \cdots  + k_{\,m} \, = \,n}  \\
\end{array}} \right.\;} {\left( \begin{array}{c}
 n \\  k_{\,1} ,\,k_{\,2} ,\, \cdots ,\,k_{\,m}  \\ 
 \end{array} \right)}  = m!\left\{ \begin{array}{c}
 n \\  m \\ 
 \end{array} \right\}
$$
</s>