Fibonacci numbers without programming - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Fibonacci numbers without programming (/thread-9125.html) |
Fibonacci numbers without programming - stored - 09-20-2017 03:13 PM Amazingly, most of simple non-scientific calculators allow to produce sequence of Fibonacci numbers with only 2 key press per number: AC 1 + = + = + = ... On HP 17b I found solutions with 6 keys per number: For init: 0 ENTER 1 ENTER Next number: SHIFT LAST + SHIFT LAST = How to do this on RPN calculators like HP 12C, HP 42S (without programming)? RE: Fibonacci numbers without programming - Didier Lachieze - 09-20-2017 03:51 PM With a RPN calculator you can do: Code: 1 ENTER 1 + LASTx x<>y + LASTx x<>y + ... RE: Fibonacci numbers without programming - stored - 09-20-2017 04:11 PM It worked. Good solution. Thanks you! RE: Fibonacci numbers without programming - Dieter - 09-20-2017 05:03 PM (09-20-2017 03:13 PM)stored Wrote: How to do this on RPN calculators like HP 12C, HP 42S (without programming)? On calculators with RCL-arithmetics and direct stack access (e.g. the 42s) you can do this: 1 ENTER + RCL+ ST L RCL+ ST L RCL+ ST L ... Depending on the model this may take the same four keys as the Lastx x<>y + method... or maybe less: on the WP31s and 34s it's simply [RCL] [+] [L]. Dieter RE: Fibonacci numbers without programming - John Keith - 09-20-2017 07:41 PM On the RPL series, if you enter two 1's on the stack, the sequence OVER OVER + will fill the stack with the Fibonacci series. Three key presses if you have the PROGRAM/STACK menu active. John RE: Fibonacci numbers without programming - Gerson W. Barbosa - 09-20-2017 08:34 PM (09-20-2017 07:41 PM)John Keith Wrote: On the RPL series, if you enter two 1's on the stack, the sequence OVER OVER + will fill the stack with the Fibonacci series. Three key presses if you have the PROGRAM/STACK menu active. Or two, if you do DUP2 + instead. Gerson. RE: Fibonacci numbers without programming - Csaba Tizedes - 09-20-2017 08:55 PM Any blind programmable CASIO: Code: [1][KIN][1] Code: [+][x↔K1][=] Csaba RE: Fibonacci numbers without programming - Jim Horn - 09-20-2017 09:54 PM If you have a matrix math capable calculator, fill the stack with: [[1 1] [1 0]] and press "X" (multiply) repeatedly. A one button solution! RE: Fibonacci numbers without programming - John Keith - 09-20-2017 10:05 PM (09-20-2017 08:34 PM)Gerson W. Barbosa Wrote:(09-20-2017 07:41 PM)John Keith Wrote: On the RPL series, if you enter two 1's on the stack, the sequence OVER OVER + will fill the stack with the Fibonacci series. Three key presses if you have the PROGRAM/STACK menu active. DOH! That's what I get for posting first, thinking later. :-) RE: Fibonacci numbers without programming - AlexFekken - 09-20-2017 10:38 PM (09-20-2017 09:54 PM)Jim Horn Wrote: If you have a matrix math capable calculator... A one button solution! What I really like about this solution is that it does not rely at all on the coeffificents in the recursion being 1 or on the order of the recursion being only 2. That's the difference between doing math and doing arithmetic :-) RE: Fibonacci numbers without programming - Gerson W. Barbosa - 09-20-2017 10:40 PM (09-20-2017 10:05 PM)John Keith Wrote:(09-20-2017 08:34 PM)Gerson W. Barbosa Wrote: Or two, if you do DUP2 + instead. I have many “OVER OVER” sequences permanently written in the files, like this one here (third code box in post #20). Yet DUP2 was available in my first RPL calculator, a 28S. Hopefully I’ll never forget :-) RE: Fibonacci numbers without programming - AlexFekken - 09-20-2017 11:18 PM (09-20-2017 09:54 PM)Jim Horn Wrote: If you have a matrix math capable calculator, .... A one button solution!I really like this one: so general. The difference between doing math and arithmetic :-) RE: Fibonacci numbers without programming - Gamo - 02-17-2018 03:17 PM On any HP RPN Calculator can do Fibonacci Sequence manually without the use of program. Key this in and repeat second line below. 1 ENTER 1 ENTER RollDown RollDown + ENTER ENTER RollDown RollDown + . . . . Gamo RE: Fibonacci numbers without programming - ttw - 02-17-2018 04:49 PM However, with a short program, one can get any Fibonacci number by entering the index. (Except for overflow). << 5 Sqrt 1 + 2 / SWAP ^ 5 Sqrt / 0 RND>> RE: Fibonacci numbers without programming - xerxes - 02-19-2018 06:29 PM (09-20-2017 08:55 PM)Csaba Tizedes Wrote: Any blind programmable CASIO: A shorter solution for the FX-180P line: Code: 1 + + Code: x↔y = RE: Fibonacci numbers without programming - Thomas Klemm - 02-28-2024 12:19 AM From Musings on the HP-70: Fibonacci Sequence Initialisation DSP 0 CLR STO M 1 Loop M+ x<>y Result 0. 1. 1. 2. 3. 5. 8. 13. 21. 34. References RE: Fibonacci numbers without programming - Joe Horn - 02-28-2024 12:53 AM After setup, press Enter once to generate each subsequent Fibonacci number. |