若q=1
Sn=nA1
Un=(A1+nA1)×n/2=(n+1)nA1/2
若q≠1
Sn=A1×(1-q^n)/(1-q)=A1/(1-q)-A1/(1-q)×q^n
Un=nA1/(1-q)-A1/(1-q)×(1-q^n)/(1-q)