HP Prime Sequence App (336 Views)
Reply
Frequent Advisor
davetheguru
Posts: 81
Registered: ‎11-20-2013
Message 1 of 5 (336 Views)

HP Prime Sequence App

The Sequence App allows one to specify the first two in a series then an expression for the rest, and probably OK for most situations (expecially textbook ones).  I wouldn't be surprised if there is at least one situation where having more than two initial ones would be handy (is there someone saying "ah, if I only had one more I could get this life's work done" <grin>.

Maybe if one could specify a list for either of the initial fields (n=1 or 2), the app could use its elements for extra terms and leave it up to the user to use as many as they want.

(just a suggestion)

 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,847
Registered: ‎03-06-2006
Message 2 of 5 (295 Views)

Re: HP Prime Sequence App

Fibonacci sequence needs the first two number.  It's based on the sum of the previous two numbers.

Please use plain text.
Trusted Contributor
Joseph Horn
Posts: 87
Registered: ‎09-25-2006
Message 3 of 5 (255 Views)

Re: HP Prime Sequence App

I like your idea of allowing N initial values instead of just 1 or 2!  Doing so would not fit the current user interface at all, but those guys at HP are creative; I'll bet they can come up with something that's clear and user-friendly... e.g. have a new field that specifies how many initial values there are, then show that many value fields on the screen.

 

Meanwhile, please note that Prime CAN handle sequences based on more than two initial values... if you teach it how.  ;-)  Doing so is fun and easy.  For example, to build a Generalized Fibonacci engine (where each element is the sum of the previous N elements), just press Shift Define and type in this:

 

Generalized Fibonacci

 

Then, in Home, use your new FIBN function on any list, but keep in mind that the input and the output is a list N+1 items long, where the last item is already the sum of all the previous items.  For example, to see the sequence starting with {0,1,2} and in which every element is the sum of the previous three elements, you'd type in FIBN({0,1,2,3}), where the final 3 is the sum of the first three items.  This allows each output to be used directly as the next input.  Therefore, after the first FIBN({whatever}), you can type FIBN(Ans) and then press ENTER repeatedly to advance through the sequence, like this:

 

FIBN on {1,2,3}

 

Here of course is how to use it for the ordinary Fibonacci sequence:

 

FIBN generating the standerd Fibonacci Sequence

 

The FIBN function shown above is of course a trivial function. Creating more interesting ones is left as an exercise for the student. ;-)

 

-Joe-

-Joe-
Please use plain text.
Frequent Advisor
davetheguru
Posts: 81
Registered: ‎11-20-2013
Message 4 of 5 (248 Views)

Re: HP Prime Sequence App

That's a neat solution for that case, Thanks Joe.  

Good use of list functions.  I'm sure those clever HP engineers can change the sequence app to be more general purpose.  'course, if they see your Fibonacci N function above, they may say we should be smart enough to program in our own specific cases ourselves (and then they don't have to do it)!  <grin>

Please use plain text.
Trusted Contributor
cyrille
Posts: 74
Registered: ‎11-18-2004
Message 5 of 5 (219 Views)

Re: HP Prime Sequence App

Hello,

 

Users wating and able to work with sequences with more than 2 initial values most likely are smart enough to program that specific case; so we do not have to do it. <grin>

 

:D

 

Cyrille, HP engineer (whose cleverness is up for discussion!)

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation