Post Reply 
(49G) Number of Characters in Roman representation (OEIS A006968)
09-03-2015, 12:32 PM (This post was last modified: 06-15-2017 01:44 PM by Gene.)
Post: #1
(49G) Number of Characters in Roman representation (OEIS A006968)
For integer input N the programme returns the number of letters required for the Roman representation of N, in accord with

http://oeis.org/A006968

Code:

::
  CK1&Dispatch
  BINT1
  ::
    COERCE
    BINT0
    BINT3
    ZERO_DO
    SWAP
    BINT10
    #/
    3UNROLL
    ::
      BINT4
      OVER#>
      ?SEMI
      BINT5
      #=casedrop
      BINT1
      BINT7
      #=casedrop
      BINT3
      BINT8
      #=case
      BINT4
      BINT2
    ;
    #+
    LOOP
    #+
    FPTR2 ^#>Z
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 




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