If f=x+2x^2+3x^3+...+nx^n, then f/x=1+2x+3x^2+...+nx^(n-1)= (1+x+x^2+x^3+...+x^n)'= [(x^(n+1)-1)/(x-1)]', so we get f=x[nx^(n+1)-(n+1)x^n+1]/(x-1)².
Let's make some checks...
If n=1, then f=x[x²-2x+1]/(x-1)²=x.
If n=2, f=x[2x³-3x²+1]/(x-1)²=2x²+x.
Edited on December 14, 2004, 5:50 pm