a1+an=a1+a1q^(n-1)=66
a1q^(n-1)=66-a1
a2*a(n-1)=a1q*a1*q^(n-2)=a1*a1*q^(n-1)=128
a1(66-a1)=128
a1^2-66a1+128=0
(a1-64)(a1-2)=0
a1=64 a1=2
an=66-a1=2 an=66-a1=64
因为a1最小
所以a1=2
an=a1q^(n-1)=2q^(n-1)=64
q^(n-1)=32
q^n/q=32
q^n=32q
Sn=a1(q^n-1)/q-1
=2(q^n-1)/(q-1)=126
q^n-1=63*(q-1)
32q-1=63q-63
31q=62
q=2
2^n=32*2=2^6
n=6