I know that the Stirling approximation states that
$$\ln(x!) \approx x\ln x - x$$
However, in some derivations, this is also applied to what looks like a sum of factorial terms. For example, here, which is similar to the derivation in other places, one states that for $W=\frac{N !}{\sum_{i}^{r} n_{i} !}$, we have
$$\ln W=N \ln N-N-\sum_{i}^{r} n_{i} \ln n_{i}-n_{i}$$
How does one show the Stirling approximation for the denominator term of $W$?
The formula is wrong.
If the denominator had product instead of sum, the formula would be correct.
It doesn't, so it isn't.