10-03-2017, 09:39 AM
For natural number input N the programme returns the Nth element of the series
https://oeis.org/A018800
NB The sequence exhibits no gaps.
Size: 135.
CkSum: # 20661d
https://oeis.org/A018800
NB The sequence exhibits no gaps.
Size: 135.
CkSum: # 20661d
Code:
::
CK1&Dispatch
# FF
::
DUP
FPTR2 ^ISPRIME
%0<>
?SEMI
BINT7
ONE_DO
ZINT 10
FPTR2 ^RMULText
BINT10
INDEX@
FPTR2 ^RP#
ONE_DO
DUPINDEX@
FPTR2 ^#>Z
FPTR2 ^RADDext
DUP
FPTR2 ^ZPrime?
ITE
::
SWAPDROP
ZEROZERO
JSTOPSTO
ExitAtLOOP
;
::
DROP
INDEX@
BINT10
#/
DROP
#3=
case
BINT4
BINT2
;
+LOOP
LOOP
;
;