![]() |
|
|
#617 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
because I would never know when all candidates end so I could never stop.
|
|
|
|
|
|
#618 | |
|
Aug 2006
597910 Posts |
Quote:
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). Last fiddled with by CRGreathouse on 2010-09-22 at 20:04 |
|
|
|
|
|
|
#619 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
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)))) |
|
|
|
|
|
#620 |
|
Aug 2006
175B16 Posts |
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. |
|
|
|
|
|
#621 |
|
May 2010
Prime hunting commission.
24·3·5·7 Posts |
Submissions: 37092 * 560872890 + 1 (13729 digits)
Prime with prime number of digits. Qualified for item 5. Last fiddled with by 3.14159 on 2010-09-22 at 21:18 |
|
|
|
|
|
#622 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
if we could reverse engineer the first to find n we won't need to use L
|
|
|
|
|
|
#623 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
did I mention the hard part is getting the last n out of the logarithm lol
|
|
|
|
|
|
#624 | |
|
Aug 2006
3×1,993 Posts |
Quote:
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. |
|
|
|
|
|
|
#625 |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Is the above the code for Charles's (grammatical error?) request?
|
|
|
|
|
|
#626 | |
|
May 2010
Prime hunting commission.
24×3×5×7 Posts |
Quote:
|
|
|
|
|
|
|
#627 |
|
Aug 2006
597910 Posts |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Prime posting thread, part 2. (With a catch.) | 3.14159 | Miscellaneous Math | 55 | 2010-11-19 23:55 |
| Tiny range request .... 555.1M | petrw1 | LMH > 100M | 1 | 2010-07-13 15:35 |
| Other primes thread | nuggetprime | No Prime Left Behind | 32 | 2009-10-21 21:48 |
| Error: tiny factoring failed | 10metreh | Msieve | 26 | 2009-03-08 23:28 |
| Tiny error on nfsnet pages. | antiroach | NFSNET Discussion | 1 | 2003-07-08 00:27 |