![]() |
|
|
#595 | |
|
Aug 2006
3·1,993 Posts |
Quote:
Edit: Mini-Geek, your death will be swift. Last fiddled with by CRGreathouse on 2010-09-22 at 14:50 |
|
|
|
|
|
|
#596 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
I put L in the code but don't I have to check every numbers for factors below a given L ? so what do i do to the code i haven't figure it out yet lol.
|
|
|
|
|
|
#597 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
that means for the 6n+1 and 6n-1 L would be at least 5
if I did the math right that would decrease 230 to about 80-81 cuts it down quite a bit. Last fiddled with by science_man_88 on 2010-09-22 at 15:21 |
|
|
|
|
|
#598 |
|
Aug 2006
175B16 Posts |
|
|
|
|
|
|
#599 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
|
|
|
|
|
|
#600 |
|
"Forget I exist"
Jul 2009
Dumbassville
26×131 Posts |
Code:
(12:53) gp > poisson2(N,t,n,L) = ((((t/log(N))^n)*exp(-(t/log(N))))/n!)*(exp(Euler)*log(L)) %212 = (N,t,n,L)->((((t/log(N))^n)*exp(-(t/log(N))))/n!)*(exp(Euler)*log(L)) (12:53) gp > poisson2(10^100,20,0,5) %213 = 2.628049047414643169717703463 (12:53) gp > |
|
|
|
|
|
#601 | |
|
Aug 2006
10111010110112 Posts |
Quote:
Code:
estimatePrimes(N,t,n,L)={
my(lambda=...);
(lambda^n*exp(-lambda))/n!
};
addhelp(estimatePrimes, "estimatePrimes(N,t,n,L): ...");
|
|
|
|
|
|
|
#602 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
Code:
(13:23) gp > estimatePrimes(10^100,230,1,5) %217 = 0.1634366358216543572411964273 Code:
estimatePrimes(N,t,n,L)=my(lambda=(t/log(N))*(exp(Euler)*log(L)));(lambda^n*exp(-lambda))/n!; |
|
|
|
|
|
#603 |
|
"Forget I exist"
Jul 2009
Dumbassville
26·131 Posts |
I love how that change in code fits exactly the range of 80-81 I predicted.
|
|
|
|
|
|
#604 | ||
|
Aug 2006
135338 Posts |
The code looks good.
Quote:
Quote:
So 80-81 is close, but no cigar.
Last fiddled with by CRGreathouse on 2010-09-22 at 16:40 |
||
|
|
|
|
|
#605 |
|
Aug 2006
10111010110112 Posts |
So now can you write a different function that takes a limit L, base b, an exponent e, and a k-range kmin,kmax and determines
1. The expected number of candidates remaining after sieving to L? 2. The number of primes in the range? (Use your estimatePrimes function.) |
|
|
|
![]() |
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 |