OEIS A228297: Need Help to Find Algorithm
|
09-16-2017, 11:24 PM
(This post was last modified: 09-16-2017 11:25 PM by Thomas Okken.)
Post: #6
|
|||
|
|||
RE: OEIS A228297: Need Help to Find Algorithm
(09-16-2017 06:46 PM)Gilles59 Wrote: I'm not familiar with the backquote notation you're using in the default case of your CASE statement (but I don't know RPL very well so that's probably just me). I replaced the backquotes with straight single quotes, and added EVAL to force the expression to be evaluated, and I changed the first case to 'n<=s' THEN 0 END Then the program works, although, like Gerald's program, it becomes too slow very quickly because of the exponentially increasing run time. You really need to memoize the calculation to keep its run time fast enough, but because of my lack of familiarity with RPL, adapting my C code is left as an exercise to the reader. :-) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)