HP Forums

Full Version: (49G) OEIS A228297: Generalized meta-Fibonacci sequence with parameters s=0 and k=5
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
  ;
;
Reference URL's