[HP35s] Program for prime number (brut force)

02172019, 05:22 AM
Post: #41




RE: [HP35s] Program for prime number (brut force)
(02162019 07:57 PM)Albert Chan Wrote:(02162019 07:09 PM)Gerald H Wrote: "Set at random Although the programme may check for 999999 as a factor it does not check for all factors upto 999999. 

02172019, 05:46 AM
Post: #42




RE: [HP35s] Program for prime number (brut force)
(02172019 04:15 AM)Thomas Klemm Wrote: Meanwhile I extended the search a bit: Thank you for the very interesting statistics, Thomas, you have done more work on that than I have for such small numbers. Indeed, as the number tested becomes smaller a single test becomes less reliable. On the 35s my interest is for numbers of the form (5 or 6 digit prime)*(5 or 6 digit prime) & for such the programme as is has been satisfactory. It would be very nice of you if you could produce statistics for numbers in that range. The programme at http://www.hpmuseum.org/forum/thread4236.html contains some useful calculations & sadly no users, if indeed there are any, have suggested improvements  perhaps you could assist? 

02172019, 04:33 PM
(This post was last modified: 02172019 04:37 PM by Gerald H.)
Post: #43




RE: [HP35s] Program for prime number (brut force)
"Although the programme may check for
999999 as a factor it does not check for all factors upto 999999." Not correct, sorry  To some degree the programme does check for all factors up to 999999. eg If you enter 55021677489 the programme very quickly finds its largest factor & returns 0 

02172019, 10:58 PM
(This post was last modified: 02172019 11:47 PM by Albert Chan.)
Post: #44




RE: [HP35s] Program for prime number (brut force)
Trivia: searching backwards, found a particular bad composite, with many SPRP nonwitnesses.
N = 999999 512881 = 881917 * 1133893 = A*B For PRP test: Total PRP nonwitnesses = gcd(A1,N1) gcd(B1,N1) = 125988 * 125988 = 15872 976144 Percent of hitting PRP nonwitness = (125988²  2) / (N3) ≈ 1.59% For SPRP test: Tried first 10 million bases, SPRP nonwitnesses = 59708 Percent of hitting SPRP nonwitness ≈ 59708/1e7 ≈ 0.60% Note: 0.60% assumed statstical trend continued all the way to N2 

02182019, 06:09 AM
Post: #45




RE: [HP35s] Program for prime number (brut force)
(02172019 10:58 PM)Albert Chan Wrote: Trivia: searching backwards, found a particular bad composite, with many SPRP nonwitnesses. A very nice example of a difficult case  But the chance of testing this number, or any other constructed to be difficult cases, when feeding the programme a random number is very small. Similarly the likelihood of finding a number as in posting #43 is very small. 

« Next Oldest  Next Newest »

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