d=a2-a1=-3
s5=5a1 +5×4÷2 ×d
s8=8a1+8×7÷2×d
5a1-30=8a1-84
3a1=54
a1=18
所以
an=a1+(n-1)d
=18-3n+3
=21-3n