Comes from exploring roots of polynomials and using the recurrence relationship of $S_n = \sum \alpha^n$ notation. Like this: $$ S_2 = \left( \sum \alpha \right)^2 - 2 \sum \alpha \beta $$ where $\alpha,\beta,\gamma, \delta$ are the roots of the polynomials where necessary. We can even get with a few lines of algebra.
Now for higher orders, I get the following:
Using the code to double check:
mysum[n_, m_ : 6] := Times @@@ Subsets[Take[Alphabet[], m], {n}]
Block[
{m, t0, t1, t2, t3, t4, t5},
m = 18;
t0 = (mysum[1, m] // Total)^4;
t1 = mysum[1, m]^4 // Total;
t2 = 4*Total[mysum[2, m]]*Total[mysum[1, m]^2];
t3 = 6*Total[mysum[2, m]^2];
t4 = 8*Total[mysum[3, m]]*Total[mysum[1, m]];
t5 = 8*Total[mysum[4, m]];
t0 - (t1 + t2 + t3 + t4 - t5) // Expand
]
for order 4 and
Block[
{m, t0, t1, t2, t3, t4, t5, t6, t7},
m = 6;
t0 = Total[mysum[1, m]]^5;
t1 = 1*mysum[1, m]^5 // Total;
t2 = 5*Total[mysum[2, m]]*Total[mysum[1, m]^3];
t3 = 10*Total[mysum[2, m]^2]*Total[mysum[1, m]];
t4 = 15*Flatten[
{
(#1^3*#2*#3) & @@@ mysum[3, m],
(#1*#2^3*#3) & @@@ mysum[3, m],
(#1*#2*#3^3) & @@@ mysum[3, m]
}
] // Total;
t5 = 20*Flatten[
{
(#1^2*#2^2*#3^1) & @@@ mysum[3, m],
(#1^2*#2^1*#3^2) & @@@ mysum[3, m],
(#1^1*#2^2*#3^2) & @@@ mysum[3, m]
}
] // Total;
t6 = 60*Flatten[
{
(#1^2*#2*#3*#4) & @@@ mysum[4, m],
(#1*#2^2*#3*#4) & @@@ mysum[4, m],
(#1*#2*#3^2*#4) & @@@ mysum[4, m],
(#1*#2*#3*#4^2) & @@@ mysum[4, m]
}
] // Total;
t7 = 120*Total[mysum[5, m]];
t0 - (t1 + t2 + t3 + t4 + t5 + t6 + t7) // Expand
]
for order 5. I check by by changing m
in the code and look at the result to see if it is 0.
To my surprise, I was looking for something with the coefficient to be binomial expansion ? Is there an easier pattern to this? How could I improve the code to desmonstrate with higher powers like 6,7,8,ect...
Any specific name for this mathematics?
PS: I know in computation, we really just use recurrence formula in $S_n$ instead of using the $\sum$, but I want to just explore this...