Post Reply 
(49G) OEIS A035327
12-31-2019, 05:50 PM (This post was last modified: 12-11-2022 05:11 AM by Gerald H.)
Post: #1
(49G) OEIS A035327
Edit 2022-12-11: Programme slightly improved

For integer input N > -1 the programme returns the Nth element in the sequence

https://oeis.org/A035327

Not a masterpiece but does use ←A.

Code:
«
  « DUP 2 <
    IF
    THEN 1 
    ELSE 2 IDIV2
SWAP ←A EVAL 2 * 1
+
    END SWAP -
  » → ←A
  « ←A EVAL
  »
»

Improvements welcome.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(49G) OEIS A035327 - Gerald H - 12-31-2019 05:50 PM
RE: (49G) OEIS A035327 - John Keith - 12-31-2019, 09:11 PM



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