![]() |
because I would never know when all candidates end so I could never stop.
|
[QUOTE=science_man_88;230969]because I would never know when all candidates end so I could never stop.[/QUOTE]
What does that even mean? "when all candidates end" OK, maybe I need to find something easier, or at least different. How about this: you know how to calculate the odds of finding 0 primes with a given N and L. Can you create a function that reverses this? Say someone wants to sieve a range to a given L such that the range contains 0 primes with probability 1% (that is, the range is 99% likely to have primes). |
well the probability that a candidate isn't prime is the opposite to if it is so reverse the fraction:
[CODE](17:36) gp > poisson3(N,t,n) = n!/(((t/log(N))^n)*exp(-(t/log(N)))) %260 = (N,t,n)->n!/(((t/log(N))^n)*exp(-(t/log(N))))[/CODE] |
I was looking for a function that, given a probability p (and N, t, L), would give an n such that
estimatePrimes(N,t,n,L) is 1 - p. |
Submissions: 37092 * 56087[sup]2890[/sup] + 1 (13729 digits)
Prime with prime number of digits. Qualified for item 5. |
if we could reverse engineer the first to find n we won't need to use L
|
did I mention the hard part is getting the last n out of the logarithm lol
|
[QUOTE=science_man_88;231003]if we could reverse engineer the first to find n we won't need to use L[/QUOTE]
No, because you get different n depending on L. Suppose N = 10^100. If L < 2 then n is 1064: you need to pick 1064 numbers near a googol to find a prime with 99% certainty. If L = 1000, then n is 87: you don't need to pick nearly so many numbers if you know that none have prime divisors smaller than a thousand. |
Is the above the code for Charles's (grammatical error?) request?
|
[QUOTE=Charles]Suppose N = 10^100. If L < 2 then n is 1064: you need to pick 1064 numbers near a googol to find a prime with 99% certainty. If L = 1000, then n is 87: you don't need to pick nearly so many numbers if you know that none have prime divisors smaller than a thousand.
[/QUOTE] How about if I knew the numbers in question had no divisors smaller than 167772161? |
[QUOTE=3.14159;231010]How about if I knew the numbers in question had no divisors smaller than 167772161?[/QUOTE]
Maybe you can ask sm that question once he finishes the script! [SPOILER]32[/SPOILER] |
| All times are UTC. The time now is 22:56. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.