Post Reply 
OEIS A228297: Need Help to Find Algorithm
09-19-2017, 05:30 AM
Post: #15
RE: OEIS A228297: Need Help to Find Algorithm
Here my programme for 42S

Store 5 in variable "5".
Unreliable for input > 5*10^11.


Code:
0.    { 50-Byte Prgm }
1.    LBL “Qs0k5”
2.    ENTER
3.    ENTER
4.    RCL/ "5"
5.    IP
6.    - 
7.    LBL 00
8.    ENTER
9.    ENTER
10.    X<> 00
11.    CLX
12.    X<> 00
13.    LBL 02
14.    RCL/ "5"
15.    IP
16.    STO+ 00
17.    X≠0
18.    GTO 02
19.    X<> 00
20.    +
21.    RCL- ST Z
22.    X≥0?
23.    GTO 01
24.    SIGN
25.    -
26.    GTO 00
27.    LBL 01
28.    R↓
29.    END

& for 49G

Code:
Qs0k5

« DUPDUP 5 IQUOT -
  WHILE DUP 0 OVER
    DO 5 IQUOT DUP
ROT + SWAP DUP NOT
    UNTIL
    END DROP +
PICK3 <
  REPEAT 1 +
  END NIP
»
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: OEIS A228297: Need Help to Find Algorithm - Gerald H - 09-19-2017 05:30 AM



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