Number of ways of distributing indistinguishable balls into distinguishable boxes with extra givens What is the number of ways to distribute $m$ indistinguishable balls to $k$ distinguishable boxes given no box can be a unique number of balls?
for example: ($m=19$ and $k=5$)
$$x_1 + x_2 + \dots + x_5 = 19 $$
Some of the accepted ways are:
$2 , 2 , 5 , 5 , 5$
$3 , 3 , 3 , 5 , 5$
$8 , 1 , 1 , 1 , 8$
and some of the rejected ways are:
$6 , 6 , 1 , 1 , \mathbf{5}$
$4 , 5 , 7 , 2 , 1$
$1 , 1 , \mathbf{15} , 1 , 1$
Note that the number of zero balls in the boxes is acceptable but does not make a difference! This means that in the same case as before if we assume the number of boxes is 6, the following ways are still acceptable:
$2 , 2 , 5 , 5 , 5 , 0$
$3 , 3 , 0 , 3 , 5 , 5$
$0, 8 , 1 , 1 , 1 , 8$
 A: Let's first consider the unrestricted case, and let $f(m,k)$ denote the number of ways to distribute $m$ unlabeled balls into $k$ labeled boxes. Then we have the following generating function:
\begin{split}
\sum_{m,k\geq 0} f(m,k) x^m \frac{y^k}{k!} &= \prod_{i\geq 0} \sum_{j\geq 0} \frac{x^{ij} y^j}{j!} \\
& = \prod_{i\geq 0} \exp( x^i y ) \\
& = \exp(y(1-x)^{-1}),
\end{split}
where $i$ stands for a number of balls in a box and $j$ stands for the number of boxes (and so $ij$ stands for the number of balls in the boxes with $i$ balls each).
It is easy to verify that
$$f(m,k) = k!\cdot[x^my^k] \exp(y(1-x)^{-1}) = [x^m] (1-x)^{-k} = (-1)^m\binom{-k}{m} = \binom{m+k-1}{m}.$$

Now, if we restrict the number of boxes with $i>0$ balls to not being $1$, and denote the corresponding number of ways by $g(m,k)$, then along the same lines we have
\begin{split}
\sum_{m,k\geq 0} g(m,k) x^m \frac{y^k}{k!} &= \exp(y) \prod_{i\geq 1} \sum_{j\geq 0\atop j\ne 1} \frac{x^{ij} y^j}{j!} \\
& = \exp(y) \prod_{i\geq 1} \big(\exp( x^i y ) - x^iy\big).
\end{split}
I don't think there is a simple formula for the coefficients of this generating function, although it can be used for efficient computing of $g(m,k)$.
A: Max is surely correct that there is no simple formula, though a summation or double summation is plausible.  Anyway, computation via a recurrence is probably the best.  Define $A(m,k)$ to the number of (ordered) compositions $a_1+\cdots+a_k=m$ with no unique term. Note that 0 can't be unique either in this definition.
Note that if all the zeros are removed, we can subtract 1 from each value to get another solution.  That is (using $i$ for the number of 0s),
$$A(m,k) = A(m-k,k) + \sum_{i=2}^k \binom{k}{i} A(m-k+i,k-i).$$
The boundary conditions are just the obvious, such as $A(m,1)=0$ for all $m$, $A(0,k)=1$ if $k=0$ or $k\ge 2$, etc..
To apply the special rule for 0, just include the $i=1$ term at the first step:
$$\mathrm{answer}(m,k) = \sum_{i=0}^k \binom{k}{i} A(m-k+i,k-i).$$
