Post Reply 
HP 25 Fibonacci sequence in one program step
10-13-2021, 02:30 PM
Post: #6
RE: HP 25 Fibonacci sequence in one program step
(10-13-2021 01:03 PM)Dave Britten Wrote:  I've been reading "Mathematical Recreations for the Programmable Calculator", and they have a somewhat humorous puzzle regarding the shortest possible program to produce the Fibonacci sequence.

The HP 25 program they concocted is only a single step, plus the typical GTO 00 to halt and reset the program. This short program does require the user to preload the stack and/or memory prior to running, but then subsequent presses of R/S produce the Fibonacci sequence on the display.

I'm curious if anybody can figure out the silly trick that they used in this book. Smile

The one and only step is [x], multiplication.

Of course you must specify FIX 0 and load the stack in an appropriate way, but that's left as an exercise to the reader.


All My Articles & other Materials here:  Valentin Albillo's HP Collection
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: HP 25 Fibonacci sequence in one program step - Valentin Albillo - 10-13-2021 02:30 PM

User(s) browsing this thread: