\[\Large \text{The Proof of Fibonacci GCD}\]
\[\text{By Sangber}\]


\(\text{Fibonacci Sequence}\)

\(\quad \quad \text{If we record sequence}\ \{F_n\}\ \text{as Fibonacci Sequence, then }\{F_n\} \text{ will have these properties:}\)

\[F_i = \begin{cases}1, & i\leq 2 \\ F_{i-1} + F_{i-2}, & \mathrm{otherwise}\end{cases}\]

\(\quad \quad \text{So we can see that } \{F_n\} \text{ is like “1,1,2,3,5,8,13,21...”.}\)


\(\text{GCD}\)

\(\quad \quad \text{“GCD” is the abbreviation of “Greatest Common Divisor”.}\)
\(\quad \quad \text{And we often record } (a, b) \text{ as the GCD of } a \text{ and } b.\)
\(\quad \quad \text{For example, } (12, 15) = 3, (48, 36) = 12.\)


\(\text{Two Theorems about GCD}\)

\(\text{Euclidean theorem}\)

\[(a, b) = (b, a \bmod b), a, b \in N_{+}\]
\(\text{The proof: }\)

  • \(\text{If } a = b, (a, b) = a = b, \text{we can surely tell that the theorem is established.}\)
  • \(\text{If } a < b, (b, a \bmod b) = (b, a) = (a, b), \text{the theorem is established.}\)
  • \(\text{If } a > b, \text{we can assume that } a = k \times b + r, (k \in N_{+}, 0 \le r < b), \text{ so } a \bmod b = r. \\ \text{As for } \forall d, \text{meeting that } d|a \land d|b, d|(a - k \times b), \text{ actually it means } d | r. \\ \text{So we can tell that } (a, b) = (b, r), \text{ that is, } (a, b) = (b, a \bmod b).\)

\(\text{Stein's Algorithm}\)

\[(a, b) = (a, b - a),b > a\]
\(\text{The proof:}\)
\(\text{Actually, the proof of it is similar to that of Euclidean theorem, you can finish it yourselves.}\)


\(\text{One Lemma}\)

\[(F_n,F_{n - 1})=1, n \in N_{+}\]
\(\text{The Proof}\):

  • \(\text{In the case of } n = 1 \text{ and } n = 2,\text{ the lemma is established obviously.}\)
  • \(\text{In the case of } n \ge 2 :\)
    \(\text{Obviously:}\)
    \[F_n > F_{n - 1} > F_{n - 2}, F_n = F_{n - 1} + F_{n - 2}\]
    \[\therefore F_n\ \bmod F_{n - 1} = F_{n - 2}\]
    \(\quad \ \text{According to Euclidean theorem and the lemma above:}\)
    \[(F_n,F_{n-1})=(F_{n-1},F_n\ \bmod\ F_{n-1})=(F_{n-1},F_{n-2})\]
    \[\therefore (F_n,F_{n-1})=(F_{n-1},F_{n-2})=(F_{n-2},F_{n-3})= \cdots =(F_1,F_2)=1\]

\(\text{Fibonacci GCD}\)

\(\quad \quad \text{Here is the expression of the Fibonacci GCD:}\)

\[\forall n,m \in \text{Z}^{+},(F_n, F_m) = F_{(n, m)}\]


\(\text{The Proof of Fibonacci GCD}\)

\(\text{We assume that } n<m.\)
\(\text{Then we use } F_n \text{ and }F_{n+1} \text{ to express } F_{n + 2},F_{n + 3},F_{n + 4},F_{n + 5}\cdots\)

\[
\begin{aligned}
& F_{n + 2} = 1 F_n + 1 F_{n + 1} \\
& F_{n + 3} = 1 F_n + 2 F_{n + 1} \\
& F_{n + 4} = 2 F_n + 3 F_{n + 1} \\
& F_{n + 5} = 3 F_n + 5 F_{n + 1}
\end{aligned} \\
\cdots \cdots
\]

\(\text{We can see that in the expressions above, the coefficients of } F_n \text{ and } F_{n + 1} \text{ meet the properties of the Fibonacci Sequence.}\)
\[\therefore F_m=F_{m - n - 1} \times F_n + F_{m - n} \times F_{n + 1}\]
\[\therefore (F_n, F_m) = (F_n, F_{m - n - 1} \times F_n + F_{m - n} \times F_{n + 1})\]
\(\text{And obviously we can see that :}\)
\[F_n|F_{m-n-1}\times F_n\]
\[\therefore (F_n,F_m)=(F_n,F_{m-n}\times F_{n+1})\]

\(\text{According to the lemma above:}\)
\[(F_n, F_{n + 1}) = 1\]
\[\therefore (F_n, F_m) = (F_n, F_{m - n})\]

\(\text{All in all:}\)
\[\text{If }n<m,(F_n,F_m)=(F_n,F_{m-n})\]

\(\text{We can see that }, \text{the change rule of } n \text{ and } m \text{ meet Stein's Algorithm,so we finally discovered that }\)
\[(F_n,F_m)=F_{(n,m)}\]


\[\Large \text{That's all, thanks!}\]
\[\Huge Q\omega Q\]

The Proof of Fibonacci GCD的更多相关文章

  1. 【前端】Util.js-ES6实现的常用100多个javaScript简短函数封装合集(持续更新中)

    Util.js (持续更新中...) 项目地址: https://github.com/dragonir/Util.js 项目描述 Util.js 是对常用函数的封装,方便在实际项目中使用,主要内容包 ...

  2. 收集有用的 Javascript 片段

    内容目录 数组 arrayMax arrayMin chunk compact countOccurrences deepFlatten difference distinctValuesOfArra ...

  3. 关于斐波拉契数列(Fibonacci)

    斐波那契数列指的是这样一个数列 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233,377,610,987,1597,2584,4181,6765,10 ...

  4. 使用并行的方法计算斐波那契数列 (Fibonacci)

    更新:我的同事Terry告诉我有一种矩阵运算的方式计算斐波那契数列,更适于并行.他还提供了利用TBB的parallel_reduce模板计算斐波那契数列的代码(在TBB示例代码的基础上修改得来,比原始 ...

  5. (转)Fibonacci Tilings

    Fibonacci numbers {Fn, n ≥ 0} satisfy the recurrence relation (1) Fn+2 = Fn+1 + Fn, along with the i ...

  6. fibonacci数列的性质和实现方法

    fibonacci数列的性质和实现方法 1.gcd(fib(n),fib(m))=fib(gcd(n,m)) 证明:可以通过反证法先证fibonacci数列的任意相邻两项一定互素,然后可证n>m ...

  7. BZOJ 2813: 奇妙的Fibonacci

    2813: 奇妙的Fibonacci Time Limit: 20 Sec  Memory Limit: 512 MBSubmit: 497  Solved: 134[Submit][Status][ ...

  8. Codeforces 902D/901B - GCD of Polynomials

    传送门:http://codeforces.com/contest/902/problem/D 本题是一个数学问题——多项式整除. 对于两个整数a.b,求最大公约数gcd(a,b)的辗转相除法的函数如 ...

  9. 【学习笔记】关于最大公约数(gcd)的定理

    手动博客搬家: 本文发表于20181004 00:21:28, 原地址https://blog.csdn.net/suncongbo/article/details/82935140 结论1 \[\g ...

随机推荐

  1. PTA的Python练习题(十三)

    第4章-8 求分数序列前N项和 a=eval(input()) b=2 c=1 d=0 count=0 for i in range(a): count+=b/c d=b b=b+c c=d prin ...

  2. Cisco AP-胖瘦AP的转换

    一.瘦AP到胖AP的转换:1.登录到LAP协商的WLC2.从LAP模式恢复到胖AP,输入下面命令:config ap tftp tftp_server_ip filename ap_name注意:需要 ...

  3. Golang介绍以及安装

    Go语言 Google开源 编译形语言 21世纪的C语言 Go语言的特点 简单易并发 开发效率高 执行性能好 Go语言应用的领域 服务端开发 日志处理 文件系统 监控服务 容器虚拟化 Docker k ...

  4. webstrom激活码

    转自https://www.cnblogs.com/mahmud/p/11847825.html 812LFWMRSH-eyJsaWNlbnNlSWQiOiI4MTJMRldNUlNIIiwibGlj ...

  5. C++打开文件夹

    https://bbs.csdn.net/topics/392055617?page=1   见2楼 system("start \"\" \"文件夹路径\&q ...

  6. Linux软Raid--mdadm命令

    mdadm:为软RAID提供管理界面,RAID设备可命名为/dev/md0./dev/md1./dev/md2./dev/md3等 命令的语法格式:mdadm[mode] <raiddevice ...

  7. [aac @ ...] Specified sample format s16 is invalid or not supported

    在使用FFmpeg打开编码器的时候出现以下错误: [aac @ 000001da19fd7200] Specified sample format s16 is invalid or not supp ...

  8. C语言调试器GDB和LLDB的使用方法

    调试器的使用 编译输出带调试信息的程序 调试信息包含:指令地址.对应源代码及行号 指令完成后,回调 LINUX使用GDB MAX使用LLDB 使用说明 // 开始调试testlib程序 lldb te ...

  9. Outlook 2013 您的组织策略阻止我们为您完成此操作... 解决方法

    问题:点击outlook超链接,弹出“您的组织策略阻止我们为您完成此操作”的提示,无法打开链接. 环境 OS: Win10 专业版x64bit Outlook: 2013 浏览器:搜狗浏览器 解决办法 ...

  10. centos7搭建svn服务器及客户端设置

    centos7搭建svn服务器及客户端设置 centos7貌似预装了svn服务(有待确认),因此我们直接启动该服务即可 一.svn服务端配置(服务器IP假设为192.168.100.1) 步骤1:创建 ...