Given that the sum of the first n terms of the sequence {an} is Sn = n & # 178; + N + 1, then the general term formula of {an} is?

Given that the sum of the first n terms of the sequence {an} is Sn = n & # 178; + N + 1, then the general term formula of {an} is?

analysis
General term formula an = SN-S (n-1)
therefore
an=n²+n+1-(n-1)²-(n-1)-1
=n²+n-(n²-2n+1)-n+1
=n²-n²+2n-1+1
=2n
When n = 1
a1=3
So the general formula of an {A1 = 3, n = 1
an=2n n≥2