RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
|
06-04-2019, 03:00 AM
(This post was last modified: 06-04-2019 03:05 AM by Gerson W. Barbosa.)
Post: #28
|
|||
|
|||
RE: RPL exercise - Last Digits of Primes (HP 49G, G+, 50g)
(06-01-2019 03:07 AM)Gerson W. Barbosa Wrote: Optionally, write a program that does the same for primes greater than 2 in base 8. In this case, the last digits are 1, 3, 5 and 7. Ok, that’s trivial from any of the base-10 programs. Anyway, for the sake of completeness, here is a 34-step program for the wp34s based on Dave Britten’s base-10 program for the DM42/HP-42S: Code:
1000 A -> 253 R↓ -> 254 R↓ -> 252 R↓ -> 241, that is, 241 1’s, 252 3’s, 254 5’s and 253 7’s. Running time in tenths of seconds in register 02: RCL 02 -> 730 (low-battery condition) or RCL 02 -> 469 (USB-powered) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)