2个回答
展开全部
用错位相减法。
记 S = (1/n)[1·2^0 + 2·2^1 + 3·2^2 + ...... + (h-1)·2^(h-2) + h·2^(h-1)],
两边同乘以 2,得
2S = (1/n)[ 1·2^1 + 2·2^2 + ...... + (h-2)·2^(h-2) + (h-1)·2^(h-1) + h·2^h],
下式减去上式, 注意 2 的同幂次相减,得
S = (1/n)[-1 - 2^1 - 2^2 - ...... - 2^(h-2) - 2^(h-1) + h·2^h ],
除两头项外, 中间所有项成等比数列, 公比为 2, 则得
S = (1/n){h·2^h -1 - 2·[2^(h-1)-1]/(2-1)}
= (1/n)[h·2^h -1 - 2^h + 2] = (1/n)[1+(h-1)·2^h]
记 S = (1/n)[1·2^0 + 2·2^1 + 3·2^2 + ...... + (h-1)·2^(h-2) + h·2^(h-1)],
两边同乘以 2,得
2S = (1/n)[ 1·2^1 + 2·2^2 + ...... + (h-2)·2^(h-2) + (h-1)·2^(h-1) + h·2^h],
下式减去上式, 注意 2 的同幂次相减,得
S = (1/n)[-1 - 2^1 - 2^2 - ...... - 2^(h-2) - 2^(h-1) + h·2^h ],
除两头项外, 中间所有项成等比数列, 公比为 2, 则得
S = (1/n){h·2^h -1 - 2·[2^(h-1)-1]/(2-1)}
= (1/n)[h·2^h -1 - 2^h + 2] = (1/n)[1+(h-1)·2^h]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询