已知等差数列{an}中,Sn=an^2+(a+1)n+a+2,an=