How find formula to determine the number of strings containing $k$ unique symbols on a specific set How can I find the formula $NU(n,k)$ to determine the number of elements with $k$ unique symbols in a set $F$. Set $F$ is defined as follows given number of symbols $n$, then $F$ contains all possible strings of size $n$. $F$ contains $n^n$ elements (strings).
For instance $NU(3,2)$ should give me $18$. If $n=3$, then there are $3^3$ strings in the entire set.
AAA,BBB,CCC (strings with $k=1$) $= 3$
AAB,AAC,ABA,ACA,BAA,CAA,CCB,CCA,CBC,CAC,BCC,ACC,BBA,BBC,BAB,BCB,ABB,CBB (strings with $k=2$) $= 18$
ABC,ACB,CAB,CBA,BAC,BCA (strings with $k=3$) $= 6$
I can see that $NU(n,k)$ when  $k=n \implies NU(n,n)$ is always $n!$
And $NU(n,k)$ when $k=1 \implies NU(n,1)$ is always $n$.
But how do I put it all together to find the formula.

The formula is $$NU(n,k) = \frac{n!}{(n-k)!}\left\{n \atop k\right\}$$ where $\left\{n \atop k\right\}$ denotes the Stirling partition numbers
Can you see why?
