(49G) OEIS A046034 : Numbers Composed Exclusively of Digits 2, 3, 5, 7

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (49G) OEIS A046034 : Numbers Composed Exclusively of Digits 2, 3, 5, 7 (/thread-8939.html)



(49G) OEIS A046034 : Numbers Composed Exclusively of Digits 2, 3, 5, 7 - Gerald H - 08-31-2017 02:11 AM

For integer input N the programme returns the Nth element of the series

https://oeis.org/A046034



RE: (49G) OEIS A046034 : Numbers Composed Exclusively of Digits 2, 3, 5, 7 - Gerald H - 07-09-2021 05:01 AM

Having once again carried out my weekly review checking for improvements & none having been published I guess the programme above is perfectly perfect.

Accordingly it may now be considered the final form.

The programme below carries out the inverse transformation.

I have attempted some error checking to ensure only compatible input is processed but it's better only to input correctly conformed integers.

Not yet a multi-millionaire & time's running out.

Code:
Size: 157.5

CkSum: # 1016d

::
  CK1&Dispatch
  # FF
  ::
    FPTR2 ^Z>S
    DUP
    BINT2
    BINT3
    BINT5
    BINT7
    5ROLL
    BINT4
    ZERO_DO
    SWAP
    #>$
    NULL$
    FPTR F 1A
    DROPLOOP
    LEN$
    #0<>
    case
    FPTR2 ^DROPZ0
    ZINT 0
    SWAPDUP
    LEN$
    ZERO_DO
    DUP
    CDR$
    SWAP
    CAR$
    CHR>#
    BINT49
    #-DUP
    BINT2
    #>
    IT
    ::
      #1-DUP
      #5=
      NOT?SEMI
      #1-
    ;
    FPTR2 ^#>Z
    ROT
    ZINT 4
    FPTR2 ^RMULText
    FPTR2 ^RADDext
    SWAPLOOP
    DROP
  ;
;