I am delving into Python development, particularly with Flask, to build backend applications. This program serves as a refresher on Python's core foundations, emphasizing terminal-controlled outputs.
This program calculates Fibonacci numbers up to 22 and Lucas numbers up to 20. It employs the Sieve of Eratosthenes to find prime numbers from 2 to the array limit, including all perfect numbers within that range. Additionally, it establishes a relationship to estimate the golden ratio. If identical values are set for both Fibonacci and Lucas calculations, it computes the golden ratio to the power of n, compares it to a combination of the Lucas and Fibonacci theorems, and provides a mathematical limit proof as values approach infinity.
- Fibonaccin = Fibonaccin - 1 + Fibonaccin - 2
- Lucasn = Lucasn - 1 + Lucasn - 2
- Golden Ratio (φ) = 1+√52
- Fn ⁄Fn - 1 ≅ φ
- Ln ⁄Ln - 1 ≅ φ
- φn ≅ (Ln+Fn * √5)/2
- L2n = 5(Fn)2 + 2(-1)n - 1
- lim(n→∞) Ln ⁄Fn = √5