Post Reply 
(49G) Series Factors of Natural Numbers, OEIS A027750
10-22-2016, 04:28 PM (This post was last modified: 06-15-2017 01:42 PM by Gene.)
Post: #1
(49G) Series Factors of Natural Numbers, OEIS A027750
For positive integer input N the programme returns the Nth element of the series of factors of the Natural Numbers.

For info on the series see

https://oeis.org/A027750

The time characteristic of the programme is linear on the input.

Code:

::
  CK1&Dispatch
  BINT1
  ::
    "  NTH FACTOR OF NATURAL SEQUENCE"
    DispCoord1
    SetDA3Temp
    COERCE
    ZEROZERO
    BEGIN
    SWAP#1+SWAP
    OVER
    FPTR2 ^#>Z
    FPTR2 ^DIVISext
    DUPLENCOMP
    ROT#+
    DUPUNROT
    5PICK
    #<
    WHILE
    DROP
    REPEAT
    '
    Z<
    FPTR2 ^SortList
    ROTDROPSWAP
    ROT
    #1--
    NTHCOMPDROP
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 




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