an/2+1=√(2Sn)
Sn=an^2/8+an/2+1/2
S(n+1)=a(n+1)^2/8+a(n+1)/2+1/2
a(n+1)=S(n+1)-Sn=a(n+1)^2/8+a(n+1)/2-an^2/8-an/2
a(n+1)^2/8-a(n+1)/2-an^2/8-an/2=0
a(n+1)^2-4a(n+1)-an^2-4an=0
a(n+1)=an+4
an=-2+4n
an/2+1=√(2Sn)
Sn=an^2/8+an/2+1/2
S(n+1)=a(n+1)^2/8+a(n+1)/2+1/2
a(n+1)=S(n+1)-Sn=a(n+1)^2/8+a(n+1)/2-an^2/8-an/2
a(n+1)^2/8-a(n+1)/2-an^2/8-an/2=0
a(n+1)^2-4a(n+1)-an^2-4an=0
a(n+1)=an+4
an=-2+4n