The first n terms of the sequence {an} and Sn = 2n & # 178; + n-1, then the general term formula of the sequence is? How is the process solved?

The first n terms of the sequence {an} and Sn = 2n & # 178; + n-1, then the general term formula of the sequence is? How is the process solved?

Sn=2n²+n-1 ①
S(n-1)=2(n-1)²+(n-1)-1=2n²-3n ②
① - 2
A (n) = s (n) -- S (n-1) n = 4N - 1, n ≥ 2
In addition, n = 1, a (1) = 2
So when n = 1, a (1) = 2
When n is greater than 1, a (n) = = 4N - 1