Solution:
Answer: 117649
We first note that x7−7=(x−r1)(x−r2)⋯(x−r7), which implies, replacing x by −x and taking the negative of the equation, that (x+r1)(x+r2)⋯(x+r7)=x7+7. Also note that the product of the ri is just the constant term, so r1r2⋯r7=7.
Now, we have that
27⋅7⋅K2=(i=1∏72ri)K2=i=1∏72ri1≤i<j≤7∏(ri+rj)2=1≤i=j≤7∏(ri+rj)1≤i<j≤7∏(ri+rj)1≤j<i≤7∏(ri+rj)=1≤i,j≤7∏(ri+rj)=i=1∏7j=1∏7(ri+rj).
However, note that for any fixed i, ∏j=17(ri+rj) is just the result of substituting x=ri into (x+r1)(x+r2)⋯(x+r7). Hence,
j=1∏7(ri+rj)=ri7+7=(ri7−7)+14=14
Therefore, taking the product over all i gives 147, which yields K2=76=117649.