What comes next?
|
10-14-2024, 06:21 AM
Post: #15
|
|||
|
|||
RE: What comes next?
(10-13-2024 08:49 PM)John Keith Wrote: Of course now you need the ISPRIME? function, which limits you to the HP 49 or later unless you want to roll your own ISPRIME?. In case of Mersenne prime numbers we can use the Lucas–Lehmer primality test. Here's an implementation for the HP-42S: Code: 00 { 32-Byte Prgm } Examples 3 XEQ "LLT" 0 5 XEQ "LLT" 0 7 XEQ "LLT" 0 11 XEQ "LLT" 1'736 13 XEQ "LLT" 0 17 XEQ "LLT" 0 19 XEQ "LLT" 0 23 XEQ "LLT" 6'107'895 29 XEQ "LLT" 458'738'443 31 XEQ "LLT" 0 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)