n=1时,a1=S1=1+2=3
n≥2时,
Sn=n²+2n S(n-1)=(n-1)²+2(n-1)
an=Sn-S(n-1)=n²+2n-(n-1)²-2(n-1)=2n+1
n=1时,a1=2+1=3,同样满足.
数列{an}的通项公式为an=2n+1.
n=1时,a1=S1=1+2=3
n≥2时,
Sn=n²+2n S(n-1)=(n-1)²+2(n-1)
an=Sn-S(n-1)=n²+2n-(n-1)²-2(n-1)=2n+1
n=1时,a1=2+1=3,同样满足.
数列{an}的通项公式为an=2n+1.