This is a little computation heavy so I will outline the method.
First understand that you each term in the expansion is obtained by choosing one term from each of the brackets.
To form x^{\frac{n(n+1)}{2}-7} it means you are leaving out the variable terms in certain brackets and instead choosing the constants appearing in those brackets. So you have to add up the product of such constant terms. To illustrate:
You leave out x7 and so you get one of the terms as -7x^{\frac{n(n+1)}{2}-7}
Again, if you leave out x and x6, and get 6x^{\frac{n(n+1)}{2}-7}
Leaving out x2 and x5, we get 10x^{\frac{n(n+1)}{2}-7}
Like this with x3 and x4
Further x,x2 and x4...
In this way you add up and get the coeff