3、,an=64或a1=64,an=2,显然q≠1.若a1=2,an=64,由=126,得2-64q=126-126q,q=2,由an=a1qn_1得2n_1=32,n=6.若a1=64,an=2,同理可求得q=,n6.综上,n=6,公比q=2或.【经典范例二】例3 求数列,,,...的前n项和.解 Sn =()+()+...+()=(1+2+3+...+n)+()=例4 设数列为,...,,求此数列前项的和.解 , ① , ②由①-②得,当时,,;当时,.例5 已知数列{an}中,an+1=an+2n,a1=3,求an.解