等比数列an中,a1=2,an=64,sn=126,求n与公比q

解:

a1≠an,公比q≠1

Sn=a1(q?-1)/(q-1)

=(a1q?-a1)/(q-1)

=(an·q-a1)/(q-1)

a1=2,an=64,Sn=126代入,得

(64q-2)/(q-1)=126

整理,得

62q=124

q=2

an=a1q^(n-1)

2×2^(n-1)=64

2?=2^6

n=6

n是6,公比q是2