One can really fit this into a more general framework, which incorporates a lot of combinatorial structures. A very general form is: given two finite sets S and T, and a group G which acts on both S and T, how many functions are there from S to T up to the equivalence induced by G? One can also ask for the number of one-to-one function or the number of onto functions. (Not both; if |S| = |T|, the one-to-one and onto functions are the same; if |S| < |T|, there are no onto functions; and if |S| > |T|, there are no one-to-one functions.) In many cases of interest, the group G can be represented as a product H x I, where H acts on S and I acts on T. For ordinary partitions, S and T are both sets with n elements, and H and I are both S_n. For set partitions, I is S_n, but H is the trivial (one-element) group. If we take H as a cyclic group C_n, we get A084423 (Set partitions up to rotations). The case described of a partition of a multiset has H as the product of various S_{k_i}'s, where each S_{k_i} acts on a separate subset of k_i elements. (This gives A096443.) There are numerous other possibilities. For all these partitions, we can take T to be a set with k elements, k <= n, I = S_k, and ask for onto functions; this gives us the number of partitions in k parts - including the two dimensional partition function (A008284) and the Stirling numbers of the second kind (A000392). If H and I are both the trivial group, with |S| = n and |T| = k, there are k^n functions, including k!/(n-k)! one-to-one functions - the latter are permutations. On the other hand, we can take S = T (so G acts identically on them), |S| = n, and we are talking about endofunctions. If G is trivial, these are labeled endofunctions: n^n; if G = S_n, it's unlabled endofunctions (A001372). Taking |T| = 2 and S = T^n, with various choices for G we get a number of Boolean function counting sequences. I could go on. All of these are approachable by use of the Cauchy-Frobenius lemma (http://mathworld.wolfram.com/Cauchy-FrobeniusLemma.html), also commonly known as Burnside's lemma. How useful this approach is depends mostly on how complex the group G is. Franklin T. Adams-Watters ________________________________________________________________________ Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.