拆成两部分计算:
Sn=a1+a1(q+k)+a2(q+k)+a3(q+k)……+an(q+k)
=a1+(a1q+ka1)+(a2q+ka2)+a3q+ka3+……+(anq+kan)
=[(a1+a2+a3+……+a(n+1)]+k(a1+a2+a3+……+an)
=a1*[1-q^(n+1)]/(1-q)+ka1(1-q^n)/(1-q)
=a1*[1+k-q^n-q^(n+1)]/(1-q)
拆成两部分计算:
Sn=a1+a1(q+k)+a2(q+k)+a3(q+k)……+an(q+k)
=a1+(a1q+ka1)+(a2q+ka2)+a3q+ka3+……+(anq+kan)
=[(a1+a2+a3+……+a(n+1)]+k(a1+a2+a3+……+an)
=a1*[1-q^(n+1)]/(1-q)+ka1(1-q^n)/(1-q)
=a1*[1+k-q^n-q^(n+1)]/(1-q)