Question

I came up with this nice thing, which I am calling 'partition function for symmetric groups'

Z[0]:1;

Z[n]:=expand(sum((n-1)!/i!*z[n-i]*Z[i], i, 0, n-1));

Z[4];

6*z[4]+8*z[1]*z[3]+3*z[2]^2+6*z[1]^2*z[2]+z[1]^4

The sum of the coefficients for Z[4] is 6+8+3+6+1 = 24 = 4!

which I am hoping corresponds to the fact that the group S4 has 6 elements like (abcd), 8 like (a)(bcd), 3 like (ab)(cd), 6 like (a)(b)(cd), and 1 like (a)(b)(c)(d)

So I thought to myself, the sum of the coefficients of Z[20] should be 20!

But life being somewhat on the short side, and fingers giving trouble, I was hoping to confirm this automatically. Can anyone help?

This sort of thing points a way:

Z[20],z[1]=1,z[2]=1,z[3]=1,z[4]=1,z[5]=1,z[6]=1,z[7]=1,z[8]=1;

But really...

Was it helpful?

Solution

I don't know a straightforward way to do that; coeff seems to handle only a single variable at a time. But here's a way to get the list you want. The basic idea is to extract the terms of Z[20] as a list, and then evaluate each term with z[1] = 1, z[2] = 1, ..., z[20] = 1.

(%i1) display2d : false $
(%i2) Z[0] : 1 $
(%i3) Z[n] := expand (sum ((n - 1)!/i!*z[n - i]*Z[i], i, 0, n-1)) $
(%i4) z1 : makelist (z[i] = 1, i, 1, 20);
(%o4) [z[1] = 1,z[2] = 1,z[3] = 1,z[4] = 1,z[5] = 1,z[6] = 1,z[7] = 1, ...]
(%i5) a : args (Z[20]);
(%o5) [121645100408832000*z[20],128047474114560000*z[1]*z[19],
       67580611338240000*z[2]*z[18],67580611338240000*z[1]^2*z[18],
       47703960944640000*z[3]*z[17],71555941416960000*z[1]*z[2]*z[17], ...]
(%i6) a1 : ev (a, z1);
(%o6) [121645100408832000,128047474114560000,67580611338240000, ...]
(%i7) apply ("+", a1);
(%o7) 2432902008176640000
(%i8) 20!;
(%o8) 2432902008176640000
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top