(15C) Fibonacci Numbers
|
08-06-2023, 11:06 AM
(This post was last modified: 08-06-2023 11:56 AM by Thomas Klemm.)
Post: #3
|
|||
|
|||
RE: (15C) Fibonacci Numbers
Computation by rounding
We can use rounding to the nearest integer: \( F_{n}=\left\lfloor {\frac {\varphi ^{n}}{\sqrt {5}}}\right\rceil ,\ n\geq 0. \) However we experience errors when \(n \gt 40\). Splitting the Index But since the biggest value for \(n\) is only \(49\) we can use the following formulas to reduce the index: \( \begin{aligned} F_{2n-1}&={F_{n}}^{2}+{F_{n-1}}^{2}\\ F_{2n}&=(2F_{n-1}+F_{n})F_{n}\\ \end{aligned} \) Now even in the worst case of \(F_{49}\) we can use rounding to calculate \(F_{24}\) and \(F_{25}\). Examples \( \begin{aligned} F_{44}&=&(2F_{21}+F_{22})F_{22} &=& (2 \cdot 10,946 + 17,711) \cdot 17,711 &=& 701,408,733 \\ F_{49}&=&{F_{25}}^{2}+{F_{24}}^{2} &=& 75,025^2 + 46,386^2 &=& 7,778,742,049 \\ \end{aligned} \) Program for the HP-15C Code: 001 { 42 21 11 } f LBL A Timing For \(F_{49}\) it takes about 5 seconds while Joe's program takes about 30 seconds. This was measured using the Nonpareil emulator on a MacBook. But I assume that the timing will be similar on the real calculator. References |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(15C) Fibonacci Numbers - Eddie W. Shore - 03-23-2017, 03:22 AM
RE: (15C) Fibonacci Numbers (bug with 15C LE?) - Eddie W. Shore - 03-23-2017, 01:32 PM
RE: (15C) Fibonacci Numbers - Albert Chan - 08-07-2023, 10:09 PM
RE: (15C) Fibonacci Numbers - Werner - 08-08-2023, 11:05 AM
RE: (15C) Fibonacci Numbers - Albert Chan - 08-08-2023, 11:44 AM
RE: (15C) Fibonacci Numbers - Thomas Klemm - 08-06-2023 11:06 AM
RE: (15C) Fibonacci Numbers - Joe Horn - 08-06-2023, 04:49 PM
RE: (15C) Fibonacci Numbers - Thomas Klemm - 08-06-2023, 03:16 PM
RE: (15C) Fibonacci Numbers - Thomas Klemm - 08-07-2023, 10:49 PM
RE: (15C) Fibonacci Numbers - Werner - 08-08-2023, 12:06 PM
|
User(s) browsing this thread: 7 Guest(s)