Post Reply 
(33s) OEIS A2516: EARLIEST SEQUENCE WITH A(A(N)) = 2N
07-31-2022, 10:06 AM
Post: #3
RE: (33s): OEIS A2516 EARLIEST SEQUENCE WITH A(A(N)) = 2N
For those who want to run the program in Free42:
Code:
00 { 52-Byte Prgm }
01▸LBL "A2516"
02 STO 00
03 1
04 2
05 GTO 02
06▸LBL 01
07 R↓
08 STO× 00
09 STO× ST Y
10▸LBL 02
11 RCL 00
12 X=0?
13 RTN
14 4
15 STO÷ 00
16 MOD
17 X≠Y?
18 X=0?
19 GTO 01
20 X<>Y
21 STO× ST Y
22 +
23 ENTER
24 +/-
25 4
26 STO÷ ST Y
27 +
28 X<>Y
29 RCL 00
30 IP
31 ×
32 +
33 ×
34 END

Thanks to Gerald H for bringing up such sequences again and again and to C.Ret for posting these excellent programs.
Both are greatly appreciated.
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 - Thomas Klemm - 07-31-2022 10:06 AM



User(s) browsing this thread: