sn=(a1+an)*n/2,a1+a2+a3=20,an+a(n-1)+a(n-2)=160,二式相加,(a1+an)+(a2+a(n-1))+(a3+a(n-2))=3(a1+an)=180
a1+an=60,sn=30n=390,所以n=13