Post Reply 
[HP35s] Program for prime number (Wheel Sieve and Miller-Rabin)
02-14-2019, 06:48 PM
Post: #15
RE: [HP35s] Program for prime number (brut force)
(02-12-2019 12:52 AM)Don Shepherd Wrote:  Fred, here is a prime factor finder I wrote for the 12c+, based on work done by Dave Britten. Like yours, it also excludes multiples of 2, 3, and 5 from the trial factor pool.

It determines 999,863 is prime in 2 seconds.
9,999,991 in 5 seconds
99,999,989 in 16 seconds
999,999,937 in 50 seconds

It won't work with your two larger examples.

And my work is of course just stolen from the HP-67 Math Pac 2. Smile

http://www.hpmuseum.org/software/67pacs/67factor.htm

It's a super simple (and useful) algorithm to port to pretty much any programmable calculator I happen to be using.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [HP35s] Program for prime number (brut force) - Dave Britten - 02-14-2019 06:48 PM



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