HP Forums
(33s) OEIS A348783: An Efficient Description of Digital Content - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (33s) OEIS A348783: An Efficient Description of Digital Content (/thread-18906.html)



(33s) OEIS A348783: An Efficient Description of Digital Content - Gerald H - 09-30-2022 02:51 PM

Takes a natural number from the stack & returns A348783 (N) to stack.
Digits of index decreasing positionally.

eg For input

188904

the programme returns

1200010011

https://oeis.org/A348783

Preserves stack.

Code:
1.    LBL A
2.    STO N
3.    CLx
4.    STO C
1.    LBL B
2.    CLx
3.    ALOG(RMDR(N:10))
4.    STO+ C
5.    CLx
6.    IDIV(N:10)
7.    STO N
8.    x≠0?
9.    GTO B
10.    CLx
11.    RCL C
12.    RTN

A: LN = 12
B: LN = 62