Best calculator for recurrence relations
02-25-2020, 04:14 PM
Post: #12
 Dave Britten Senior Member Posts: 1,960 Joined: Dec 2013
RE: Best calculator for recurrence relations
(02-25-2020 03:08 PM)Csaba Tizedes Wrote:  I don't know how it is works on HPs, but on TI-83 you can do something like this:

first decide the max. index of your list: N
then generate the list, let's say Z: seq(1,X,1,N,1)->LZ
finally generate the sequence: augment({1,1},seq(LZ(LZ(X-2))+LZ(X-LZ(X-2)),X,3,N,1))->LZ
and press ENTER until the result list is not change.

Just an idea, must to check, but I'm sure it is works.

Should work, though it'll be fairly slow for large lists, since you'll have to run it about as many times as you have list elements.

Here's a little 84 Plus CE program that prompts for all the inputs. This uses toString() to show the subscript when prompting for constants; this would have to be changed for an 83 (probably Disp X followed by an Input). Also, some of the prompt messages would need to be wrapped to fit the monochrome LCD models.

Code:
Input "NUMBER OF CONSTANTS? ",C C→dim(L₁) For(X,1,C "L₁("+toString(X)+")="→Str1 Input Str1,V V→L₁(X) End Disp "EXPRESSION?" Disp "USE L₁(N-X) TO REFER" Disp "TO PRIOR TERMS." Disp "N=CURRENT TERM SUBSCRIPT Input Str1 StringEqu(Str1,Y₁) Input "MAX N? ",M For(N,C+1,M Y₁→L₁(N) End L₁

The terms are calculated one at a time in increasing subscript order, and the list dimension increases by one with each term appended. Forward references will fail with a dimension error, i.e. you can only refer to prior (already calculated) list elements.

You can rcl Y1 at the expression entry prompt if you want to run the program again with the same recursive formula, but different constants or max N.

I tested it with the example - L1(1)=L1(2)=1, L1(N)=L1(L1(N-2))+L1(N-L1(N-2)) - and got the same first 20 terms.
 « Next Oldest | Next Newest »

 Messages In This Thread Best calculator for recurrence relations - carey - 02-18-2020, 03:50 AM RE: Best calculator for sequences (recurrence relations) - Gerald H - 02-18-2020, 05:21 AM RE: Best calculator for sequences (recurrence relations) - John Keith - 02-18-2020, 02:05 PM RE: Best calculator for sequences (recurrence relations) - Dave Britten - 02-18-2020, 01:07 PM RE: Best calculator for sequences (recurrence relations) - Gerald H - 02-18-2020, 08:29 PM RE: Best calculator for sequences (recurrence relations) - David Hayden - 02-18-2020, 09:30 PM RE: Best calculator for sequences (recurrence relations) - Dave Britten - 02-18-2020, 10:08 PM RE: Best calculator for sequences (recurrence relations) - John Keith - 02-19-2020, 06:12 PM RE: Best calculator for recurrence relations - Gerald H - 02-23-2020, 10:54 AM RE: Best calculator for recurrence relations - John Keith - 02-23-2020, 07:09 PM RE: Best calculator for recurrence relations - Csaba Tizedes - 02-25-2020, 03:08 PM RE: Best calculator for recurrence relations - Dave Britten - 02-25-2020 04:14 PM RE: Best calculator for recurrence relations - DavidM - 02-25-2020, 07:15 PM RE: Best calculator for recurrence relations - John Keith - 02-25-2020, 08:01 PM RE: Best calculator for recurrence relations - DavidM - 02-26-2020, 03:28 PM RE: Best calculator for recurrence relations - John Keith - 02-26-2020, 07:56 PM

User(s) browsing this thread: 1 Guest(s)