Post Reply 
scramble prime challenge
02-14-2020, 10:30 PM
Post: #11
RE: scramble prime challenge
(02-14-2020 10:09 PM)John Keith Wrote:  Here is a brute-force HP49/50 program using ListExt commands. DIFF is the 4th program in this post. It is a faster version of the GoferLists command Diff, which is set difference or complement.

This program does not check for 2 or 5 but it does check for ineligible digits.

Code:

Spoilers...










\<< I\->NL DUP { 1. 3. 7. 9. } DIFF
  IF SIZE
  THEN DROP 0.
  ELSE DUP SIZE
    \<< NL\->I ISPRIME?
    \>> DOPERM 0. POS NOT
  END
\>>

thanks John.

What exactly does this program do, I'm not familiar with RPL.
Don
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
scramble prime challenge - Don Shepherd - 02-14-2020, 01:14 AM
RE: scramble prime challenge - Paul Dale - 02-14-2020, 03:02 AM
RE: scramble prime challenge - Albert Chan - 02-14-2020, 04:39 AM
RE: scramble prime challenge - Albert Chan - 02-14-2020, 04:02 PM
RE: scramble prime challenge - Paul Dale - 02-14-2020, 04:43 AM
RE: scramble prime challenge - ttw - 02-14-2020, 01:56 PM
RE: scramble prime challenge - John Keith - 02-14-2020, 10:09 PM
RE: scramble prime challenge - Don Shepherd - 02-14-2020 10:30 PM
RE: scramble prime challenge - John Keith - 02-15-2020, 06:59 PM
RE: scramble prime challenge - John Keith - 02-16-2020, 07:11 PM
RE: scramble prime challenge - Albert Chan - 02-15-2020, 02:14 PM
RE: scramble prime challenge - Albert Chan - 02-17-2020, 06:23 PM
RE: scramble prime challenge - Albert Chan - 02-19-2020, 12:16 AM
RE: scramble prime challenge - Allen - 02-15-2020, 11:11 PM
RE: scramble prime challenge - Allen - 02-16-2020, 02:19 PM



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