是x(n+1) = Ax(n) + B吗?
若是的话,
A=1时,x(n+1) = x(n) + B,
{x(n)}是首项为x(1), 公差为B的等差数列.
x(n) = x(1) + (n-1)B.
A不为1时,
x(n+1) = Ax(n) + B,
x(n+1) + B/(A-1) = Ax(n) + B + B/(A-1) = Ax(n) + AB/(A-1) = A[x(n) + B/(A-1)],
{x(n)+B/(A-1)}是首项为x(1)+B/(A-1),公比为A的等比数列.
x(n) + B/(A-1) = [x(1)+B/(A-1)]*A^(n-1),
x(n) = [x(1)+B/(A-1)]A^(n-1) - B/(A-1).