an+1=an+2n
推出
an=an-1+2(n-1)
.
a2=a1 + 2
累加得
an = a1 + 2(2+3+4+...n-1)
an = 2 + n(n-1)
an = n^2 - n+2 (n>=1)