已知数列{an}满足a1=1/2,a(n+1)=an+1/n^2+n,求an.