已知等差数列{an}满足a(n+1)=an+3n+2,且a1=2,求an.