Distributing two distinct objects to identical boxes Hiii,
I've been struck with a problem which deals with the distribution of two distinct objects such that p of one type and q of other type into three identical boxes.
As if it were only one object with q copies i'd have used integer partitioning, and if all objects were distinct then could use Stirling Number of second kind. But what about this mixed case...?
Thnx!
 A: Using Burnside's lemma I get $\frac16{p+2\choose2}{q+2\choose2}+\frac12\lfloor\frac{p+2}2\rfloor\lfloor\frac{q+2}2\rfloor+\frac13N$, where $N=1$ if $p$ and $q$ are both divisible by $3$, and $N=0$ otherwise.
A: For the sake of completeness I am posting an answer using the Polya Enumeration Theorem. As was pointed out, the group acting on the boxes is $S_3$ with cycle index
$$Z(S_3) = \frac{1}{6} a_1^3 + \frac{1}{2} a_1 a_2 + \frac{1}{3} a_3.$$
The pattern repertoire is given by
$$ \frac{1}{1-X}\frac{1}{1-Y}.$$
Substituting into the cycle index it now follows that the desired value is
$$ [X^p Y^q]  \left(
\frac{1}{6} \frac{1}{(1-X)^3}\frac{1}{(1-Y)^3} + 
\frac{1}{2} \frac{1}{1-X}\frac{1}{1-Y}  \frac{1}{1-X^2}\frac{1}{1-Y^2} +
 \frac{1}{3} \frac{1}{1-X^3}\frac{1}{1-Y^3} \right).$$
Now the first term (see the formula at the end) contributes
$$ \frac{1}{6} {p+2 \choose 2} {q+2 \choose 2}.$$
The second term combines the initial segment of the series for $1/(1-X^2)$ of degree at most $p$ with a term from $1/(1-X)$ and the initial segment of the series for $1/(1-Y^2)$ of degree at most $q$ with a term from $1/(1-Y)$ and hence contributes
$$ \frac{1}{2} 
\left(\sum_{m=0}^{\lfloor p/2\rfloor} 1 \right)
\left(\sum_{m=0}^{\lfloor q/2\rfloor} 1 \right) =
 \frac{1}{2} \lfloor (p+2)/2\rfloor \lfloor (q+2)/2\rfloor$$
and the third term contributes $1/3$ if $p$ and $q$ are both divisible by three because $1/(1-X^3)$ only contains terms of degree divisible by three and $1/(1-Y^3)$  also only contains terms of degree divisible by three.
This confirms the first answer that was posted, namely
$$\frac{1}{6} {p+2 \choose 2} {q+2 \choose 2}
+  \frac{1}{2} \lfloor (p+2)/2\rfloor \lfloor (q+2)/2\rfloor
+ \frac{1}{3} [[p\equiv 0 (3); q\equiv 0 (3)]].$$
Here we have made use several times of the fact that
$$[z^k] \frac{1}{(1-z)^m} = {k+m-1\choose m-1}.$$
