[ prog / sol / mona ]

prog


LISP Puzzles

25 2020-04-08 10:04

The new and improved version of >>18, based on the skipped version of >>24, now generates the Hofstadter R sequence in logarithmic space. I was going to post this version but while polishing it up I hit upon another trick that can be used to bring down the runtime, so I'll add that first. Since RAM size is now irrelevant, as opposed to the limiting factor it was for >>18, here is the value of R(10^16) to extend the table from >>23:

$ python3 -m flake.hofs seq2 10000000000000000
levels: 6
10000000000000000: 50000000942720152238624116795401 0x27716B7684EB9129B5951936809

Please verify this value using other implementations.

157


VIP:

do not edit these