已知数列{an},Sn是数列{an}的前n项和,且Sn=n2+n+1,则an=______.
当n=1时,a1=s1=3
当n≥2时,an=sn-sn-1=n2+n+1-(n-1)2-(n-1)-1=2n
当n=1时,2n=2≠a1,
∴an=3,n=1 2n,n≥2
故答案:an=
.3,n=1 2n,n≥2
已知数列{an},Sn是数列{an}的前n项和,且Sn=n2+n+1,则an=______.
当n=1时,a1=s1=3
当n≥2时,an=sn-sn-1=n2+n+1-(n-1)2-(n-1)-1=2n
当n=1时,2n=2≠a1,
∴an=3,n=1 2n,n≥2
故答案:an=
.3,n=1 2n,n≥2