View Single Post
Old 2016-08-11, 01:17   #6
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

23·54 Posts
Default

Quote:
Originally Posted by pepi37 View Post
So real question is: how to increase chances to find prime in range: to take more K and do less range or take less K but make wide range?
Yes. Or, both. Or no, if the "less" outweighs the "more". You're asking a math question but not using quantities- so, as usual, it depends on the quantities.

A list of primality tests are independent events- so, whatever you do to increase the number of expected primes in your 'range', that should also increase your probability of finding a single prime.

If your interests include amount of time to find a prime, you're better off with more k's rather than extending to a higher range, because larger candidates take longer to test but are less likely per-test to be prime.

Last fiddled with by VBCurtis on 2016-08-11 at 01:21
VBCurtis is offline   Reply With Quote