The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(49G) OEIS A002113: Palindromes in Base 10 in Natural Order
01-21-2018, 03:19 PM
Post: #1
(49G) OEIS A002113: Palindromes in Base 10 in Natural Order
For natural number entry N the programme returns the Nth palindrome.

For info on palindromes see

https://oeis.org/A002113

For background to the programme see

http://www.hpmuseum.org/forum/thread-9922.html

Size: 166.5

CkSum: # A04h

Code:
::
  CK1&Dispatch
  # FF
  ::
    DUP
    ZINT 11
    Z<
    case
    ::
      ZINT 1
      FPTR2 ^RSUBext
    ;
    FPTR2 ^Z>S
    DUP
    CAR$
    CHR_1
    EQUAL
    OVER
    BINT2
    SUB$1#
    BINT48
    #<>
    ANDITE
    ::
      CDR$
      DUP
      '
      xSREV
      EvalNoCK
    ;
    ::
      DUP
      CDR$
      SWAP
      BINT1
      SUB$1#
      BINT49
      #-
      DUP#0=IT
      ::
        DROP
        CDR$
        BINT9
      ;
      #>$
      SWAP&$
      DUP
      '
      xSREV
      EvalNoCK
      CDR$
    ;
    &$
    FPTR2 ^S>Z
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(49G) OEIS A002113: Palindromes in Base 10 in Natural Order - Gerald H - 01-21-2018 03:19 PM



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