一.Fibonacci数的定义.
Fibonacci数:Fibonacci数 f n f_n fn定义为初值为 f 0 = 0 , f 1 = 1 f_0=0,f_1=1 f0=0,f1=1且在 n > 1 n>1 n>1时递推公式为 f n = f n − 1 + f n − 2 f_n=f_{n-1}+f_{n-2} fn=fn−1+fn−2的数列.
这个数的组合意义可以理解为一个
1
∗
(
n
−
1
)
1*(n-1)
1∗(n−1)的空间用
1
∗
1
1*1
1∗1和
1
∗
2
1*2
1∗2的砖块填满的方案数.
二.Fibonacci数通项公式.
可以直接用特征方程来求解Fibonacci数列的通项公式,这里仅给出其公式:
f
n
=
1
5
(
1
+
5
2
)
n
−
1
5
(
1
−
5
2
)
n
f_{n}=\frac{1}{\sqrt{5}}\left(\frac{1+\sqrt{5}}{2}\right)^{n}-\frac{1}{\sqrt{5}}\left(\frac{1-\sqrt{5}}{2}\right)^{n}
fn=51(21+5)n−51(21−5)n
三.Fibonacci数的若干性质.
性质1: ∑ i = 0 n f i = f n + 2 − 1 \sum_{i=0}^{n}f_i=f_{n+2}-1 ∑i=0nfi=fn+2−1.
证明:
考虑数学归纳法:
1.
n
=
0
n=0
n=0时性质显然成立.
2.当满足
n
>
0
n>0
n>0时,假设
k
<
n
k<n
k<n时均满足性质,则
k
=
n
k=n
k=n时:
∑
i
=
0
k
f
i
=
f
k
+
∑
i
=
0
k
−
1
f
i
=
f
k
+
f
k
+
1
−
1
=
f
k
+
2
−
1
\sum_{i=0}^{k}f_i=f_k+\sum_{i=0}^{k-1}f_i\\ =f_k+f_{k+1}-1\\ =f_{k+2}-1
i=0∑kfi=fk+i=0∑k−1fi=fk+fk+1−1=fk+2−1
证毕.
性质2:当且仅当 3 ∣ n 3|n 3∣n为 f n f_n fn为偶数.
证明:
显然
n
≤
2
n\leq 2
n≤2时性质成立.
那么对于
n
>
2
n>2
n>2,有三种情况:
1.
f
3
k
=
f
3
k
−
2
+
f
3
k
−
1
f_{3k}=f_{3k-2}+f_{3k-1}
f3k=f3k−2+f3k−1,奇
+
+
+奇
=
=
=偶.
2.
f
3
k
+
1
=
f
3
k
−
1
+
f
3
k
f_{3k+1}=f_{3k-1}+f_{3k}
f3k+1=f3k−1+f3k,奇
+
+
+偶
=
=
=奇.
2.
f
3
k
+
2
=
f
3
k
+
f
3
k
+
1
f_{3k+2}=f_{3k}+f_{3k+1}
f3k+2=f3k+f3k+1,偶
+
+
+奇
=
=
=奇.
证毕.
性质3: ∑ i = 1 n f 2 i − 1 = f 2 n \sum_{i=1}^{n}f_{2i-1}=f_{2n} ∑i=1nf2i−1=f2n.
性质4: ∑ i = 1 n f 2 i = f 2 n + 1 − 1 \sum_{i=1}^{n}f_{2i}=f_{2n+1}-1 ∑i=1nf2i=f2n+1−1.
性质3,4均可类比性质1用数学归纳法证明.
根据性质3,4还可以求出 ∑ i = 1 n ( − 1 ) i f i \sum_{i=1}^{n}(-1)^{i}f_{i} ∑i=1n(−1)ifi.
性质5: ∑ i = 0 n f i 2 = f n f n + 1 \sum_{i=0}^{n}f_i^2=f_{n}f_{n+1} ∑i=0nfi2=fnfn+1.
证明:
考虑数学归纳法:
1.
n
=
0
n=0
n=0时性质显然成立.
2.当
n
>
0
n>0
n>0时,若
k
<
n
k<n
k<n时性质成立,则
k
=
n
k=n
k=n时有:
∑
i
=
0
n
f
i
2
=
f
n
2
+
∑
i
=
0
n
−
1
f
i
2
=
f
n
2
+
f
n
f
n
−
1
=
f
n
(
f
n
+
f
n
−
1
)
=
f
n
f
n
+
1
\sum_{i=0}^{n}f_i^2=f_n^2+\sum_{i=0}^{n-1}f_i^2\\ =f_n^2+f_{n}f_{n-1}\\ =f_n(f_{n}+f_{n-1})\\ =f_nf_{n+1}
i=0∑nfi2=fn2+i=0∑n−1fi2=fn2+fnfn−1=fn(fn+fn−1)=fnfn+1
证毕.
性质6: m ∣ n ⇒ f m ∣ f n m|n\Rightarrow f_m|f_n m∣n⇒fm∣fn.
证明:
为了证明这个性质,我们先给出一个引理.
引理1:
f
n
+
m
=
f
n
−
1
f
m
+
f
n
f
m
+
1
f_{n+m}=f_{n-1}f_{m}+f_{n}f_{m+1}
fn+m=fn−1fm+fnfm+1.
证明:
考虑数学归纳法:
1.
n
=
0
,
1
,
2
n=0,1,2
n=0,1,2时引理显然成立.
2.当
n
>
1
n>1
n>1时,若
k
<
n
k<n
k<n时引理成立,则
k
=
n
k=n
k=n时有:
f
m
+
k
=
f
m
+
k
−
2
+
f
m
+
k
−
1
=
f
k
−
3
f
m
+
f
k
−
2
f
m
+
1
+
f
k
−
2
f
m
+
f
k
−
1
f
m
+
1
=
(
f
k
−
3
+
f
k
−
2
)
f
m
+
(
f
k
−
2
+
f
k
−
1
)
f
m
+
1
=
f
k
−
1
f
m
+
f
k
f
m
+
1
f_{m+k}=f_{m+k-2}+f_{m+k-1}\\ =f_{k-3}f_{m}+f_{k-2}f_{m+1}+f_{k-2}f_{m}+f_{k-1}f_{m+1}\\ =(f_{k-3}+f_{k-2})f_{m}+(f_{k-2}+f_{k-1})f_{m+1}\\ =f_{k-1}f_m+f_{k}f_{m+1}
fm+k=fm+k−2+fm+k−1=fk−3fm+fk−2fm+1+fk−2fm+fk−1fm+1=(fk−3+fk−2)fm+(fk−2+fk−1)fm+1=fk−1fm+fkfm+1
证毕.
设
n
=
k
m
n=km
n=km,考虑数学归纳法:
1.显然
k
=
0
,
1
k=0,1
k=0,1时性质成立.
2.当
k
>
1
k>1
k>1时,若
t
<
k
t<k
t<k时性质成立,则
t
=
k
t=k
t=k时用引理1拆开
f
t
m
f_{tm}
ftm:
f
t
m
=
f
m
+
(
t
−
1
)
m
=
f
m
−
1
f
(
t
−
1
)
m
+
f
m
f
(
t
−
1
)
m
+
1
f_{tm}=f_{m+(t-1)m}=f_{m-1}f_{(t-1)m}+f_{m}f_{(t-1)m+1}
ftm=fm+(t−1)m=fm−1f(t−1)m+fmf(t−1)m+1
然后开始推导:
∵
f
m
∣
f
m
\because f_{m}|f_{m}
∵fm∣fm且
f
m
∣
f
(
t
−
1
)
m
f_{m}|f_{(t-1)m}
fm∣f(t−1)m
∴
f
m
∣
f
m
−
1
f
(
t
−
1
)
m
,
f
m
∣
f
m
f
(
t
−
1
)
m
+
1
\therefore f_{m}|f_{m-1}f_{(t-1)m},f{m}|f_{m}f_{(t-1)m+1}
∴fm∣fm−1f(t−1)m,fm∣fmf(t−1)m+1
∴
f
m
∣
f
m
−
1
f
(
t
−
1
)
m
+
f
m
∣
f
m
f
(
t
−
1
)
m
+
1
\therefore f_{m}|f_{m-1}f_{(t-1)m}+f{m}|f_{m}f_{(t-1)m+1}
∴fm∣fm−1f(t−1)m+fm∣fmf(t−1)m+1
∴
f
m
∣
f
t
m
\therefore f_{m}|f_{tm}
∴fm∣ftm
证毕.
性质7: g c d ( f n , f m ) = f g c d ( n , m ) gcd(f_n,f_m)=f_{gcd(n,m)} gcd(fn,fm)=fgcd(n,m).
证明:
假设
n
<
m
n<m
n<m,根据引理1拆开
f
m
f_m
fm:
f
m
=
f
n
+
m
−
n
=
f
n
−
1
f
m
−
n
+
f
n
f
m
−
n
+
1
f_m=f_{n+m-n}=f_{n-1}f_{m-n}+f_{n}f_{m-n+1}
fm=fn+m−n=fn−1fm−n+fnfm−n+1
由于
f
n
∣
f
n
f
m
−
n
+
1
f_n|f_{n}f_{m-n+1}
fn∣fnfm−n+1,所以我们有:
g
c
d
(
f
n
,
f
m
)
=
g
c
d
(
f
n
,
f
n
−
1
f
m
−
n
)
gcd(f_n,f_m)=gcd(f_n,f_{n-1}f_{m-n})
gcd(fn,fm)=gcd(fn,fn−1fm−n)
接下来我们给出一个引理.
引理2:
g
c
d
(
f
n
,
f
n
−
1
)
=
1
gcd(f_n,f_{n-1})=1
gcd(fn,fn−1)=1.
证明:
g
c
d
(
f
n
,
f
n
−
1
)
=
g
c
d
(
f
n
−
f
n
−
1
,
f
n
−
1
)
=
g
c
d
(
f
n
−
1
,
f
n
−
2
)
=
g
c
d
(
f
n
−
1
−
f
n
−
2
,
f
n
−
2
)
=
g
c
d
(
f
n
−
2
,
f
n
−
3
)
⋯
=
g
c
d
(
f
1
,
f
0
)
=
g
c
d
(
1
,
0
)
=
1
gcd(f_n,f_{n-1})=gcd(f_n-f_{n-1},f_{n-1})\\ =gcd(f_{n-1},f_{n-2})\\ =gcd(f_{n-1}-f_{n-2},f_{n-2})\\ =gcd(f_{n-2},f_{n-3})\\ \cdots\\ =gcd(f_{1},f_{0})\\ =gcd(1,0)\\ =1
gcd(fn,fn−1)=gcd(fn−fn−1,fn−1)=gcd(fn−1,fn−2)=gcd(fn−1−fn−2,fn−2)=gcd(fn−2,fn−3)⋯=gcd(f1,f0)=gcd(1,0)=1
证毕.
然后我们就有:
g
c
d
(
f
n
,
f
m
)
=
g
c
d
(
f
n
,
f
m
−
n
)
=
g
c
d
(
f
n
,
f
m
m
o
d
n
)
gcd(f_n,f_m)=gcd(f_n,f_{m-n})=gcd(f_n,f_{m\,\,mod\,\,n})
gcd(fn,fm)=gcd(fn,fm−n)=gcd(fn,fmmodn)
发现这个形式与辗转相除法十分类似,于是就有:
g
c
d
(
f
n
,
f
m
)
=
g
c
d
(
f
g
c
d
(
n
,
m
)
,
f
0
)
=
f
g
c
d
(
n
,
m
)
gcd(f_n,f_m)=gcd(f_{gcd(n,m)},f_0)=f_{gcd(n,m)}
gcd(fn,fm)=gcd(fgcd(n,m),f0)=fgcd(n,m)
证毕.
根据性质7,我们还可以推出性质6的逆定理,即
f
m
∣
f
n
⇒
m
∣
n
f_m|f_n\Rightarrow m|n
fm∣fn⇒m∣n.
四.Fibonacci数与组合数.
Fibonacci数列和组合数之间有一个神奇的关系式:
f
n
=
∑
i
=
0
n
−
1
(
n
−
i
−
1
i
)
f_n=\sum_{i=0}^{n-1}\binom{n-i-1}{i}
fn=i=0∑n−1(in−i−1)
证明:
令
g
n
=
∑
i
=
0
n
−
1
(
n
−
i
+
1
i
)
g_n=\sum_{i=0}^{n-1}\binom{n-i+1}{i}
gn=∑i=0n−1(in−i+1),考虑证明
g
i
=
f
i
g_i=f_i
gi=fi.
考虑数学归纳法:
1.
n
=
0
,
1
,
2
n=0,1,2
n=0,1,2时显然成立.
2.当
n
>
2
n>2
n>2时,若
k
<
n
k<n
k<n时成立,则
k
=
n
k=n
k=n时有:
g
k
−
1
+
g
k
−
2
=
∑
i
=
0
k
−
2
(
k
−
i
−
2
i
)
+
∑
i
=
0
k
−
3
(
k
−
i
−
3
i
)
=
(
k
−
2
0
)
+
∑
i
=
1
k
−
2
(
k
−
i
−
2
i
)
+
∑
i
=
1
k
−
2
(
k
−
i
−
2
i
−
1
)
=
(
k
−
2
0
)
+
∑
i
=
1
k
−
2
(
(
k
−
i
−
2
i
)
+
(
k
−
i
−
2
i
−
1
)
)
=
(
k
−
2
0
)
+
∑
i
=
1
k
−
2
(
k
−
i
−
1
i
)
=
(
k
−
1
0
)
+
(
0
k
−
1
)
+
∑
i
=
1
k
−
2
(
k
−
i
−
1
i
)
=
∑
i
=
0
k
−
1
(
k
−
i
−
1
i
)
=
g
k
g_{k-1}+g_{k-2}=\sum_{i=0}^{k-2}\binom{k-i-2}{i}+\sum_{i=0}^{k-3}\binom{k-i-3}{i}\\ =\binom{k-2}{0}+\sum_{i=1}^{k-2}\binom{k-i-2}{i}+\sum_{i=1}^{k-2}\binom{k-i-2}{i-1}\\ =\binom{k-2}{0}+\sum_{i=1}^{k-2}\left(\binom{k-i-2}{i}+\binom{k-i-2}{i-1}\right)\\ =\binom{k-2}{0}+\sum_{i=1}^{k-2}\binom{k-i-1}{i}\\ =\binom{k-1}{0}+\binom{0}{k-1}+\sum_{i=1}^{k-2}\binom{k-i-1}{i}\\ =\sum_{i=0}^{k-1}\binom{k-i-1}{i}\\ =g_k
gk−1+gk−2=i=0∑k−2(ik−i−2)+i=0∑k−3(ik−i−3)=(0k−2)+i=1∑k−2(ik−i−2)+i=1∑k−2(i−1k−i−2)=(0k−2)+i=1∑k−2((ik−i−2)+(i−1k−i−2))=(0k−2)+i=1∑k−2(ik−i−1)=(0k−1)+(k−10)+i=1∑k−2(ik−i−1)=i=0∑k−1(ik−i−1)=gk
证毕.
五.Fibonacci数与黄金分割比.
黄金分割点:定义一条长度为 1 1 1的线段的黄金分割点为一个距离 x x x满足 x 2 = x ( 1 − x ) x^2=x(1-x) x2=x(1−x).
显然这个 x = 5 − 1 2 x=\frac{\sqrt{5}-1}{2} x=25−1.
黄金分割比:定义黄金分割比为上述 x x x比 1 1 1的比值,即为 x ≈ 0.618 x\approx 0.618 x≈0.618.
然后我们将Fibonacci数的第 n n n项与第 n + 1 n+1 n+1项比一下,发现这个东西越来越接近黄金分割比了.
也就是说会有这样一个式子:
lim
n
→
+
∞
f
n
f
n
+
1
=
5
−
1
2
\lim_{n\rightarrow +\infty}\frac{f_n}{f_{n+1}}=\frac{\sqrt{5}-1}{2}
n→+∞limfn+1fn=25−1