%I #16 Feb 01 2015 23:06:16
%S 0,0,0,0,0,0,1,1,1,0,1,2,1,1,2,2,1,3,3,2,1,3,4,3,3,2,1,1,5,4,4,3,2,1,
%T 4,6,4,4,3,2,1,7,6,7,6,5,4,4,3,2,1,8,8,8,8,6,5,4,4,3,2,1,11,8,9,8,6,5,
%U 4,4,3,2,1,5,12,10,8,9,9,8,5,6,5,4,4,3,2,1,11,13,14,12,11,8,9,9,8,5,6,5,4,4,3,2,1,15,16,15,12,11,8,9,9,8,5,6,5,4,4,3,2,1,18,16,17,12,15,12,12,11,9,8,9,9,5,8,5,6,5,4,4,3,2,1,22,16,19,17,16,13,15,12,12,11,9,8,9,9,5,8,5,6,5,4,4,3,2,1,19,23,16,20,17,16,13,15,12,12,11,9,8,9,9,5,8,5,6,5,4,4,3,2,1
%N Multiset choose 4: number of ways to choose four elements from the multiset representative corresponding to the k-th multiset repetition class defining partition of n in canonical Abramowitz-Stegun order.
%C The array a(n,k), called "Multiset choose 4", is also denoted by MS(4;n,k). It is the fourth member of an l-family of arrays for multiset choose l, called MS(l;n,k).
%C The row length of this array is A007294=[1, 1, 1, 2, 2, 2, 4, 4, 4, 6, 7, 7,...].
%C MS(4;n,k) gives for every multiset of the multiset repetition class encoded by the k-th multiset defining partition of n the number of ways to choose four elements from it. The Abramowitz-Stegun (A-St) order for partitions is used (see A036036).
%C For the characteristic array of multiset defining partitions of n in A-St order see A176723. See also the W. Lang links there and in A187447.
%C Note that multiset choose l should not be confused with N multichoose l (see, e.g., Wolfram's Mathworld). Here one picks from a multiset l=4 of its elements.
%C Ordinary sets appear exactly for n=T(N), with the triangular numbers T(N):=A000217(N). They are defined by the partition (1,2,...,N) for N>=1, and the empty partition for n=N=0. a(T(N),1)= binomial(N,4).
%C This investigation was stimulated by the Griffiths and Mező paper cited under A176725.
%F a(n,k) gives the number of ways to choose four elements from the multiset representative defined by the k-th multiset repetition class defining partition of n, with k=1,...,A007294(n).
%F a(n,k) = binomial(M(n,k)+3,4) - (m(n,k)[3] + M(n,k)*m(n,k)[2] + binomial(M(n,k)+1,2)*m(n,k)[1] ) + binomial(m(n,k)[1],2), where M(n,k) = MS(1;n,k) := A176725(n,k), and m(n,k)[j] is the j-th member of the multiplicity list m(n,k) of the exponents of the k-th multiset repetition class defining partition of n in A-St order.
%e n=0..10:
%e 0;
%e 0;
%e 0;
%e 0, 0;
%e 0, 1;
%e 1, 1;
%e 0, 1, 2, 1;
%e 1, 2, 2, 1;
%e 3, 3, 2, 1;
%e 3, 4, 3, 3, 2, 1;
%e 1, 5, 4, 4, 3, 2, 1;
%e ...
%e a(7,2)=MS(4;7,2)=2 because the second multiset repetition class defining partition of n=7 in A-St order is [1^3,2^2] (from the characteristic array A176723) encoding the 5-multiset {1,1,1,2,2}, and there are 2 possibilities to choose 4 elements from this set, namely 1,1,1,2 and 1,1,2,2.
%e a(T(4),1)=a(10,1)=MS(4;10,1) = 1 from the ordinary set {1,2,3,4} (defined by the multiset repetition class defining partition 1,2,3,4). This coincides with binomial(4,4)=1.
%e a(7,3)=MS(4;7,3)=2 from {1,1,1,1,1,2} choose 4 which is 2, namely 1,1,1,1 and 1,1,1,2. The corresponding multiset defining partition has exponent list [5,1] and this is the 16th in the A-St ordered list of such partitions (starting with the empty partition).
%e a(8,3) = 2 = binomial(3+2,4)-(0+0+binomial(2+1,2))+0, because the relevant partition has exponents [6,1] (corresponding to the 7-multiset representative {1,1,1,1,1,1,2}) with MS(1;8,3) = 2, and the multiplicity list of the exponents is m(8,3)=[1,0,0,0,0,1]. Hence m(8,3)[3]=0=m(8,2)[2] and
%e m(8,2)[1]=1. The two choices are 1,1,1,1 and 1,1,1,2.
%e a(10,3)= 4 = binomial(3+3,4) - (0+0+binomial(3+1,2)*2)+ binomial(2,2) = 15-6*2 +1, corresponding to the 7-multiset {1,1,1,1,1,2,3} with MS(1;10,3)= 3, exponents [5,1,1] with multiplicity list m(10,3)=[2,0,0,0,1]. Hence m(10,3)[3]=0=m(10,3)[2] and m(10,3)[1]=2. The four choices are 1,1,1,1; 1,1,1,2; 1,1,1,3 and 1,1,2,3.
%Y Cf. A176725: MS(1;n,k), A187445: MS(2;n,k), A187449: MS(3;n,k).
%Y Cf. A187447 (all multiset choices; here column l=4).
%K nonn,easy,tabf
%O 0,12
%A _Wolfdieter Lang_, Apr 04 2011