Post Reply 
Recursive sequences in CAS on prime.
06-19-2015, 09:01 AM
Post: #2
RE: Recursive sequences in CAS on prime.
Here is a solution:
Code:
#cas
mf(n):=
BEGIN
IF n==1 THEN
RETURN(3/2);
ELSE
IF n==2 THEN
RETURN(5/3);
END;
RETURN(2003-6002/mf(n-1)+4000/(mf(n-1)*mf(n-2)));
END;


END;
#end
which seems to work in your desired way. It provides exact values at least until n=10, now I am trying 25 and this runs now the fifth minute on the emulator which is due to the 3 recursive calls in the code, so I cancelled it.
Arno
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Recursive sequences in CAS on prime. - Arno K - 06-19-2015 09:01 AM



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