以下用^b表示b次方.
x(n) = (x(n-1) + x(n-2)) /2,两边减x(n-1)得
x(n) - x(n-1) = (x(n-1) - x(n-2)) * (-1/2)
所以{ x(n) - x(n-1) }是以x(2)-x(1)为首项,以-1/2为公比的等比数列
所以x(n) - x(n-1) = (x(2)-x(1)) * (-1/2) = (-3/2) (-1/2)^(n-2) = 3 *(-1/2)^(n-1) ,(当n≥3).
x(n) = x(2) + 3/4 *[ 1 - (-1/2)^(n-2) ] / ( 1 + 1/2)
=3/2 + 1/2 * [1 - (-1/2)^(n-2)]
=2 + (-1/2)^(n-1)
易验证n=1,2时也成立,
所以通项公式为x(n) = 2 + (-1/2)^(n-1)