In reply to Tim.

Here's one way, using PROC OPTMODEL in SAS/OR:

proc optmodel;
set NSET = 1..10;
num s {n in NSET} = sum {i in 1..n-2} i*floor(n/i);
print s;
quit;