数列题第一道1/2,0,1/4,1/8,第二道1,3,6,12,41 求算法
问题描述:
数列题第一道1/2,0,1/4,1/8,第二道1,3,6,12,41 求算法
答
第一道题通式为:an = an-1 + (-1)^(n-1) / (2^(n-1)),(a1=1/2,n>=2)
可得 a2 = 1/2 + (-1)^1 / (2^1) = 1/2 - 1/2 = 0;
a3 = 0 + (-1)^2 / (2^2) = 0 + 1/4 = 1/4;
a4 = 1/4 + (-1)^3 / (2^3) = 1/4 - 1/8 = 1/8;
a5 = 1/8 + (-1)^4 / (2^4) = 1/8 + 1/16 = 3/16;
因此第一道题的答案就是:3/16
第二道题通式为:an = an-1 + 2 + (n-2)^2,(a1=1,n>=2)
可得 a2 = 1 + 2 + (2-2)^2 = 1 + 2 + 0 = 3;
a3 = 3 + 2 + (3-2)^2 = 3 + 2 + 1 = 6;
a4 = 6 + 2 + (4-2)^2 = 6 + 2 + 4 = 12;
a5 = 12 + 2 + (5-2)^2 = 12 + 2 + 9 = 23;
a6 = 23 + 2 + (6-2)^2 = 23 + 2 + 16 = 41;
因此第二道题的答案就是:23
都两点钟了,终于解决了