递推公式
1、一阶线性递推式: f n = a f n − 1 + b f_{n}=a f_{n-1}+b fn=afn−1+b ,且已知 f 1 f_1 f1的值
(1)当 a = 0 时, f n = b f_n=b fn=b
(2)当 a = 1 时, f n = f n − 1 + b = ( n − 1 ) b + f 1 f_{n}=f_{n-1}+b =(n-1)b + f_1 fn=fn−1+b=(n−1)b+f1, 为等差数列
(3)当 a ≠ 0 , a ≠ 1 a\neq 0,a\neq 1 a=0,a=1 时,令特征方程 f ( x ) = a x + b f(x)=ax+b f(x)=ax+b 等于 x x x,即求解 a x + b = x ax+b=x ax+b=x,
解得 x = x 0 x=x_0 x=x0, f n − x 0 = a ( f n − 1 − x 0 ) f_n-x_0=a(f_{n-1}-x_0) fn−x0=a(fn−1−x0) ,得到 f n = a n − 1 ( f 1 − x 0 ) + x 0 f_n= a^{n-1}(f_1-x_0)+x_0 fn=an−1(f1−x0)+x0
2、二阶线性递推: f n = p f n − 1 + q f n − 2 f_{n}=pf_{n-1}+qf_{n-2} fn=pfn−1+qfn−2,已知 f 1 f_1 f1 、 f 2 f_2 f2 的值
特征方程为: x 2 − p x − q = 0 x^2-px-q=0 x2−px−q=0,设两个特征根为 x 1 x_1 x1 和 x 2 x_2 x2
因此, f n = c 1 x 1 n + c 2 x 2 n f_n=c_1 x_1^n+c_2x_2^n fn=c1x1n+c2x2n,将 f 1 f_1 f1 与 f 2 f_2 f2 代入方程求解出 c 1 c_1 c1 和 c 2 c_2 c2 的值
f 0 = c 1 + c 2 f_0=c_1 + c_2 f0=c1+c2
f 1 = c 1 x 1 + c 2 x 2 f_1=c_1 x_1 + c_2 x_2 f1=c1x1+c2x2
当 x 1 ≠ x 2 x_1\neq x_2 x1=x2时, f n = c 1 x 1 n + c 2 x 2 n f_n=c_1 x_1^{n}+c_2x_2^{n} fn=c1x1n+c2x2n
当 x 1 = x 2 x_1=x_2 x1=x2时, f n = ( c 1 + c 2 n ) x 1 n f_n=(c_1+c_2n)x_1^{n} fn=(c1+c2n)x1n
3、分式递推式: f n = a f n − 1 + b c f n − 1 + d f_{n}=\frac {af_{n-1}+b}{cf_{n-1}+d} fn=cfn−1+dafn−1+b, c ≠ 0 , a d ≠ b c , a 1 ≠ − d c c\neq 0,ad\neq bc,a_1\neq -\frac dc c=0,ad=bc,a1=−cd,已知 a 1 a_1 a1的值
特征方程: x = a x + b c x + d x=\frac {ax+b}{cx+d} x=cx+dax+b,设 x 1 , x 2 x_1,x_2 x1,x2是两个特征根,
(1)当 x 1 ≠ x 2 x_1\neq x_2 x1=x2时, f n − x 1 f n − x 2 = a − x 1 c a − x 2 c × f n − 1 − x 1 f n − 1 − x 2 \frac {f_n-x_1}{f_n-x_2}=\frac {a-x_1c}{a-x_2c}\times \frac{f_{n-1}-x_1}{f_{n-1}-x_2} fn−x2fn−x1=a−x2ca−x1c×fn−1−x2fn−1−x1
设 b n = f n − x 1 f n − x 2 , q = a − x 1 c a − x 2 c , b n − 1 = f n − 1 − x 1 f n − 1 − x 2 b_n= \frac {f_n-x_1}{f_n-x_2} ,q=\frac {a-x_1c}{a-x_2c},b_{n-1}= \frac{f_{n-1}-x_1}{f_{n-1}-x_2} bn=fn−x2fn−x1,q=a−x2ca−x1c,bn−1=fn−1−x2fn−1−x1,即 b n = q × b n − 1 = q n − 1 b 1 b_n=q\times b_{n-1} =q^{n-1}b_1 bn=q×bn−1=qn−1b1
由 b n = f n − x 1 f n − x 2 b_n= \frac {f_n-x_1}{f_n-x_2} bn=fn−x2fn−x1 可得 f n = x 2 + x 1 − x 2 1 − b n f_n=x_2+\frac {x_1-x_2}{1-b_n} fn=x2+1−bnx1−x2,替换 b n b_n bn,可得通项公式
f n = x 2 + x 1 − x 2 1 − ( a − x 1 c a − x 2 c ) n − 1 × ( f 1 − x 1 f 1 − x 2 ) f_n=x_2+\frac {x_1-x_2}{1- (\frac {a-x_1c}{a-x_2c})^{n-1}\times (\frac{f_1-x_1}{f_1-x_2})} fn=x2+1−(a−x2ca−x1c)n−1×(f1−x2f1−x1)x1−x2
(2)当 x 1 = x 2 x_1= x_2 x1=x2时, 1 f n − x 1 = 1 f n − 1 − x 1 + 2 c a + d \frac 1{f_n-x_1}=\frac 1{f_{n-1}-x_1}+\frac {2c}{a+d} fn−x11=fn−1−x11+a+d2c
f n = 1 ( n − 1 ) × 2 c a + d + 1 f 1 − x 1 + x 1 f_n=\frac {1}{(n-1)\times \frac{2c}{a+d}+\frac 1{f_1-x_1}}+x_1 fn=(n−1)×a+d2c+f1−x111+x1