Post Reply 
(49G) OEIS A046034 : Numbers Composed Exclusively of Digits 2, 3, 5, 7
08-31-2017, 07:11 AM (This post was last modified: 08-31-2017 07:17 AM by Gerald H.)
Post: #1
(49G) OEIS A046034 : Numbers Composed Exclusively of Digits 2, 3, 5, 7
For integer input N the programme returns the Nth element of the series

https://oeis.org/A046034

NB The description below uses the expression

eg Z3_

for ZINT 3.

The two are however NOT the same, Z3_ at PTR 273CE having 2.5 Bytes & ZINT 3 having 6 Bytes.

The size & check sum below are for the version as printed.

Code:
::
  CK1&Dispatch
  # FF
  ::
    Z3_
    FPTR2 ^RMULText
    Z1_
    FPTR2 ^RADDext
    DUP
    FPTR2 ^Z>R
    %LN
    %4
    %LN
    %/
    %FLOOR
    COERCESWAP
    Z4_
    3PICK
    FPTR2 ^RP#
    FPTR2 ^RSUBext
    NULL$
    ROT
    ZERO_DO
    OVER
    Z3_
    Z4_
    INDEX@
    FPTR2 ^RP#
    FPTR2 ^RMULText
    FPTR2 ^ZQUOText
    DUPDUP
    FPTR2 ^RADDext
    Z1_
    FPTR2 ^RADDext
    Z8_
    FPTR2 ^ZMod
    OVER
    Z4_
    FPTR2 ^ZQUOText
    FPTR2 ^RADDext
    SWAP
    Z1_
    FPTR2 ^RSUBext
    Z4_
    FPTR2 ^IDIV2
    DROP
    FPTR2 ^RSUBext
    FPTR2 ^Z>S
    SWAP&$
    LOOP
    SWAPDROP
    FPTR2 ^S>Z
  ;
;

SIZE 200.5

CKSUM # 118Bh
Find all posts by this user
Quote this message in a reply
Post Reply 


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



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