HP Forums
(49G) OEIS A228297: Generalized meta-Fibonacci sequence with parameters s=0 and k=5 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (49G) OEIS A228297: Generalized meta-Fibonacci sequence with parameters s=0 and k=5 (/thread-9106.html)



(49G) OEIS A228297: Generalized meta-Fibonacci sequence with parameters s=0 and k=5 - Gerald H - 09-19-2017 06:29 AM

For natural number input N the programme returns the Nth element of the series

https://oeis.org/A228297

Code:
::
  CK1&Dispatch
  # FF
  ::
    DUPDUP
    Z5_
    FPTR2 ^ZQUOText
    FPTR2 ^RSUBext
    BEGIN
    DUPDUP
    Z0_
    SWAP
    BEGIN
    Z5_
    FPTR2 ^ZQUOText
    DUPROT
    FPTR2 ^RADDext
    SWAPDUP
    Z0_
    EQUAL
    UNTIL
    DROP
    FPTR2 ^RADDext
    3PICK
    Z<
    WHILE
    ::
      Z1_
      FPTR2 ^RADDext
    ;
    REPEAT
    SWAPDROP
  ;
;