Combinatorial problem Consider the set 1,2,3,4,5,6,7,8 and the equation
$a+2b+3c+4d+5e+6f+7g+8h=S$
where $a,b,c,d,e,f,g,h$ are still the set $1,2,3,4,5,6,7,8$.
The $8!$ permutations of a,b,..h  determine  the variation of S
in the range [120,204].
Now, how many times S is equal, for instance, to 156  or,
better, how many permutations determine S to take the
value 156?
In short words, can we solve the equation above 
(and also determine the S distribution), without 
of course merely sum executing or computer using?
 A: Interesting question.
I think you can at least restrict your search space a bit if you're looking to compute the frequency for a single value of $S$.
Take $h=8$.  There are indeed some cases for which $h=8$ and $S = 156$.  The minimum value for $S$ with $h=8$ is
$$1(7) + 2(6) + 3(5) + 4(4) + 5(3) + 6(2) + 7(1) + 8(8) = 148.$$
The value os $S$ is most sensitive to the value of $h$, and second-most-sensitive to the value of $g$.  What if we set $h=8, g=2$?  Then the minimum value of $S$ is
$$1(7) + 2(6) + 3(5) + 4(4) + 5(3) + 6(1) + 7(2) + 8(8) = 149.$$
Taking it further, $g = 3$ has a minimum of $151$, and $g=4$ has a minimum of $154$.  But $g=5$ gives a minimum of $158$ which is greater than $156$.  So you don't have to worry about searching any values for $h=8, g=5,6,7$.  That's over two thousand cases (out of about forty thousand) you don't have to worry about.
Then, for each of $h=8, g=1,2,3,4$, increase the value of $f$ until your minimum exceeds $156$, and throw those cases out.
For $h=7, g=6$ the minimum is $156$.  That's the only case there.  You can throw away all cases for $h=7, g=8$.
For $h=6$ down, you have to check all values of $g$ based on this criterion.
Then start from the other end: $h=1$.  The maximum value for $S$ is $176$.  Decrease $g$ to see if you can get the maximum sum below $156$.  And you can: $h=1, g=2$.  Throw those out.
As you go along, you can also take advantage of the fact that $156$ is even.  You can throw away cases for which exactly one, or exactly three, of $a,c,e,g$ are odd, because the sum will be odd.
By being smart about what you calculate, you can get rid of a bunch of your cases and not cycle through all of them.
I don't see a way to get a full distribution without calculating all of them, though.  
