Recursive sequences in CAS on prime.

06192015, 07:22 AM
Post: #1




Recursive sequences in CAS on prime.
Hello
I can't figure out how to define a recursive sequence in CAS on the HP prime. I want to define: u(1)=3/2 u(2)=5/3 u(n)=20036002/u(n1)+4000/(u(n1)u(n2)) Of course, I can define this sequence in the sequence app in HOME mode but it gives wrong answers (the sequence is made for that purpose ) so I want to have exact values in CAS. I made a CAS program with a FOR loop and it works fine but I'm looking for a more straightforward way to do this. In XCAS, I can type in Code: u(n):={si n==1 alors 3/2; sinon si n==2 alors 5/3; sinon 20036002/u(n1)+4000/(u(n1)*u(n2)); fsi; fsi;} I am looking for a similar syntax working on the prime too. thank you for your help. 

« Next Oldest  Next Newest »

Messages In This Thread 
Recursive sequences in CAS on prime.  wawa  06192015 07:22 AM
RE: Recursive sequences in CAS on prime.  Arno K  06192015, 09:01 AM
RE: Recursive sequences in CAS on prime.  wawa  06192015, 09:20 AM
RE: Recursive sequences in CAS on prime.  ww63  06192015, 10:33 AM
RE: Recursive sequences in CAS on prime.  Arno K  06192015, 02:12 PM
RE: Recursive sequences in CAS on prime.  wawa  06192015, 04:37 PM

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