1024+212+256+…+2+1+1,2+1,4+1,8…+1,512,1+1024,1用简便算法计算 1,2是二分之一(1,4 1,8 1,512 1,1024一样理解)急用!今天就要,
问题描述:
1024+212+256+…+2+1+1,2+1,4+1,8…+1,512,1+1024,1
用简便算法计算 1,2是二分之一(1,4 1,8 1,512 1,1024一样理解)
急用!今天就要,
答
1024+512+256+128+……+2+1+1/2+1/4+1/8+……+1/1024
这是两个等比数列的求和Sn=A1(1-q^n)/(1-q)
=(1+2+4+……+256+512+1024)+(1/1024+1/512+……+1/2)
=(1-2^11)/(1-2)+1/1024(1-2^10)/(1-2)
=2047+1023/1024
=2047又1023/1024
答
令S=1024+512+……+2+12S=2048+1024+……+4+2所以S=2S-S=2048-1=2047令T=1/2+1/4+……+1/512+1/10242T=1+1/2+……+1/256+1/512T=2T-T=1-1/1024=1023/1024所以1024+512+……+2+1+1/2+……+1/1024=2047+1023/1024=2047...