Fibonacci Numbers - Algorithms for Competitive Programming
This can be proved by induction. A one-line proof by Knuth comes from taking the determinant of the 2x2 matrix form below. From this we can prove by induction that for any positive integer 𝑘 <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>k</mi></math> $k$ , 𝐹 𝑛 𝑘 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>F</mi><mrow data-mjx-texclass="ORD"><mi>n</mi><mi>k</mi></mrow></msub></math> $F_{nk}$ is multiple of 𝐹 𝑛 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>F</mi><mi>n</mi></msub></math> $F_n$ . The inverse is also true: if 𝐹 𝑚 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>F</mi><mi>m</mi></msub></math> $F_m$ is multiple of 𝐹 𝑛 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>F</mi><mi>n</mi></msub></math> $F_n$ , then 𝑚 <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>m</mi></math> $m$ is multiple of 𝑛 <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi></math> $n$ . GCD identi
Last update: April 22, 2025   Translated From: e-maxx.ru Fibonacci Numbers ¶ The Fibonacci sequence is defined as follows: $$F_0 = 0, F_1 = 1, F_n = F_{n-1} + F_{n-2}$$ The first elements of the sequence ( OEIS A000045 ) are: $$0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...$$ Properties ¶ Fibonacci numbers possess a lot of interesting properties. Here are a few of them: Cassini's identity: $$F_{n-1} F_{n+1} - F_n^2 = (-1)^n$$ This can be proved by induction. A one-line proof by Knuth comes from taking the determinant of the 2x2 matrix form below. The "addition" rule: $$F_{n+k} = F
Explore this link on the map →saved by
related reading
- Binary Exponentiation - Algorithms for Competitive Programmingcp-algorithms.com
- Euclidean algorithm for computing the greatest common divisor - Algorithms for Competitive Programmingcp-algorithms.com
- Extended Euclidean Algorithm - Algorithms for Competitive Programmingcp-algorithms.com
- Introduction to Dynamic Programming - Algorithms for Competitive Programmingcp-algorithms.com
- The Fibonacci Matrixianthehenry.com
- Structure and Interpretation of Computer Programsmitp-content-server.mit.edu
- Structure and Interpretation of Computer Programs, 2e: 1.2sarabander.github.io
- Math & Engineeringxn--2-umb.com
- Competitive Programmer's Handbookcses.fi
- Napkin.pdfvenhance.github.io
- What's new | Updates on my research and expository papers, discussion of open problems, and other maths-related topics. By Terence Taoterrytao.wordpress.com
- Binius: highly efficient proofs over binary fieldsvitalik.eth.limo