Help on simplifying symbolic sum?

*To*: mathgroup at smc.vnet.net*Subject*: [mg66012] Help on simplifying symbolic sum?*From*: travellingfish at googlemail.com*Date*: Thu, 27 Apr 2006 02:25:53 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

Dear All, I want to syplify some symbolic sum, such like the following one: 2nSum[a[i]^2, {i,1,n}] - 2(Sum[a[i], {i,1,n}])^2 Is should be simplifyed to Sum[(a[i]-a[j])^2, {i,1,n}, {j,1,n}]. Could anybody give me some hints about how to do it? Thanks a lot! Best wishes! Martin.