scramble prime challenge
|
02-15-2020, 06:59 PM
Post: #13
|
|||
|
|||
RE: scramble prime challenge
(02-14-2020 10:30 PM)Don Shepherd Wrote:(02-14-2020 10:09 PM)John Keith Wrote: The first 3 lines check for any digits other than 1, 3, 7, or 9 and return 0 (false) if any are present. The next 3 lines create all permutations of the digits of the given number and test if they are prime. If all are prime the program returns 1 (true) else 0 (false). The documentation for the ListExt Library (see here) explains the commands used better than I can. As Dave Britten said above, this would get very slow for numbers with more than 6 or 7 digits. Since Albert Chan has shown that there are no scramble primes with more than 3 and less than 19 digits, it's really not that practical anyway. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)