a2-a1=a3-a2
-(x+1)^2+4(x+1)-2 = (x-1)^2-4(x-1)+2
2x^2+2-8x+4=0
x^2-4x+3=0
x=1 or 3
if x=1
a1=f(2)=4-8+2=-2
a3=f(0) =2
an = -2+(n-1)2
= 2n-4
Sn = n(a1+an)/2 = n(n-3)
if x=3
a1=f(4)=16-16+2=2
a3=f(2)=4-8+2=-2
an =2-2(n-1)
=4-2n
Sn= (3-n)n
a2-a1=a3-a2
-(x+1)^2+4(x+1)-2 = (x-1)^2-4(x-1)+2
2x^2+2-8x+4=0
x^2-4x+3=0
x=1 or 3
if x=1
a1=f(2)=4-8+2=-2
a3=f(0) =2
an = -2+(n-1)2
= 2n-4
Sn = n(a1+an)/2 = n(n-3)
if x=3
a1=f(4)=16-16+2=2
a3=f(2)=4-8+2=-2
an =2-2(n-1)
=4-2n
Sn= (3-n)n