Post Reply 
(33s) OEIS A4444: Nimsum N+3
08-18-2022, 08:28 AM (This post was last modified: 08-18-2022 12:19 PM by Gerald H.)
Post: #1
(33s) OEIS A4444: Nimsum N+3
Takes a natural number from the stack & returns A4444(N) to stack.

https://oeis.org/A004444

Nth in natural order for run of four integers in natural order reversed, then next four integers in natural order reversed ….
Preserves stack.

Code:
1.    LBL B
2.    STO N
3.    CLx
4.    N+(-1)^N+2*(-1)^IDIV(N:2)
5.    RTN

B: LN = 40        CK = 25E5
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(33s) OEIS A4444: Nimsum N+3 - Gerald H - 08-18-2022 08:28 AM



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