But it quickly runs into problems trying to get as high as Problem 78 requires. Not sure how to get it to perform better. Save the results in an array ⍺⍺ maybe?
(Not so much the performance as WS FULL errors in the IDE)
Or maybe I should instead keep a list of just the previous partition numbers and use the recurrence relation p(n) = p(n-1) + p(n-2) - p(n-5) - p(n-7) etc
@Sherlock9 you're calling the function with the same args a lot. memo can help, but of course optimizing for the specific case should often be much better
a better memo that doesn't involve lookups + an algorithm that prefers that (though still not suitable for actually finding a 0 as i'm too lazy currently to think about algorithms): https://tio.run/##VVBNS8NAFLzvr9hbG9LgbvEU6Q@QELz1Ih6KNSLts4KXlNqLSiExWwQpngQpPfTgzZZCL0L7T94fiW9fEj/CQh4z82Zmt3PT97rDTn9wmecQS5w8y0OlhEDzJnE6Ox/WutH1ba0AIJDQJgmaDzoFdAEDQkZotpZI5xKfHuUVzw8QoPnE9N6SZl0yyQKTOQQ@jaRoM1qHoMErpdSR1gnav6Bkwv7WYyEgJKLexOxLuxA7aFZK/DSZzo5PaFDsrDB55zbsi9kGQkpmCsJTQo8IPisE/zPs7SJ@kJFqUeWejSTa0w5OXuzFspSU@03T12SnFX932nUP6rZ9ZH08mpzdsjfmh6pelZy0jHZLMoFYiDLFpicL7euieIvWy7nyts5cgHfJ3Gz3r6rxp…
@dzaima @J.Sallé That's not a real NONCE ERROR, it is just pco throwing a DOMAIN ERROR but for some reason substituting the error message with "nonce error". However, when ⎕FIX hits an error (TIO "Code" is ⎕FIXed) it understands that the given script was invalid and so not in its own domain. Therefore ⎕FIX throws a DOMAIN ERROR.