Post Reply 
(33s) OEIS A2516: EARLIEST SEQUENCE WITH A(A(N)) = 2N
08-21-2022, 01:05 PM
Post: #10
RE: (33s): OEIS A2516 EARLIEST SEQUENCE WITH A(A(N)) = 2N
I copied and pasted your code to EMU48 and with an input of 7 I got

[ 2 4 3 8 10 6 15 ].

Could there be a typo in your code?

As far as speed is concerned, accumulating numbers on the stack and storing them in a list or array at the end is significantly faster than using GET and PUT on an existing array. Also stack operations such as PICK and ROLL are very fast, sometimes even faster than list processing commands on later calculators.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (33s): OEIS A2516 EARLIEST SEQUENCE WITH A(A(N)) = 2N - John Keith - 08-21-2022 01:05 PM



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