09-09-2017, 05:54 PM
For input N , a natural number, the programme returns the Nth element in the series
https://oeis.org/A008904
NB This series does NOT become periodic.
Size: 228.5
CkSum: # 3597h
https://oeis.org/A008904
NB This series does NOT become periodic.
Size: 228.5
CkSum: # 3597h
Code:
::
CK1&Dispatch
# FF
::
'
::
DUP
ZINT 2
Z<
casedrop
ZINT 1
{
ZINT 6
ZINT 6
ZINT 12
ZINT 36
ZINT 24
ZINT 24
ZINT 24
ZINT 48
ZINT 24
ZINT 36
}
OVER
ZINT 10
FPTR2 ^ZMod
FPTR2 ^Z2BIN
#1+
NTHCOMPDROP
ZINT 3
ROT
ZINT 5
FPTR2 ^ZQUOText
DUP4UNROLL
ZINT 4
FPTR2 ^ZMod
FPTR2 ^Z2BIN
FPTR2 ^RP#
FPTR2 ^RMULText
SWAP
1GETLAM
EVAL
FPTR2 ^RMULText
ZINT 10
FPTR2 ^ZMod
;
1LAMBIND
1GETLAM
EVAL
ABND
;
;