![]() |
|
|
#12 |
|
Jun 2003
Suva, Fiji
2×1,021 Posts |
Looking at medians rather than averages - the median of 45 ranges of 100 is 66.3% of the average taken by adding the first ks and dividing by 100, (looks as if it could be approx 2/3rds) which would bring the formula for A down to 0.24, which is still higher than theory.
The median is a better measure. The average top value of k in each range of 100 is 546% of the average, or 824% of the median, so the rogue k are providing a skew in the calculation. The measure now for n=333333 is k=26.7G - checking up to this range would provide 50% chance of finding a twin. Unless I am doing something horribly wrong, then I think it makes more sense to check a wide range of n, and check only low values of k. Why? The 10th percentile in the blocks of 100n has an average k value of 16.5% of the median. Checking 5n values to 20% of the average k value is equivalent to checking one n to the median k value, and there is more chance a value will come up. Similar calculations at 20th, 30th percentile etc are: 10 16.5% 82.4% of effort 20 33.6% 84% of effort 30 51.6% 86% of effort 40 73.3% 91.6% of effort 50 100% 100% 60 131.1% 109.2% 70 179% 128.8% 80 239.6% 149.8% 90 341.3% 189.6% 100 824.1% 412% If the 333333 search is going as high as 90% then it appears that they are wasting a lot of effort. A better strategy, based on this analysis, would be to check 200n (333334 to 333533) up to 0.82% of the calculated k (219M). This would provide close to 100% chance checking only 43.8G of k. Oh, and checking lower values of k is faster! Last fiddled with by robert44444uk on 2008-03-26 at 10:07 |
|
|
|
|
|
#13 | |
|
"Bob Silverman"
Nov 2003
North of Boston
5×17×89 Posts |
Quote:
effort is to define your variables! What is/are the dependent variable(s)? What is the independent variable? The number of twin primes of the form k*2^n +/-1 less than N can NOT be a quadratic function of N. You say that your formula has a basis in the underlying mathematics. Please explain that basis to us. If we allow both k and n to vary, the number of twin primes less than N of the form k*2^n +/-1 will be given by the double Stieltjes integral: C * integral from 2 to N/2 integral from 2 to lg(N) of (1/log(k*2^n -1))^2 d[k] d[n] where [] designates the floor function. There will be an error term. A smaller error can be obtained by evaluating the double integral via Euler-MacLauren. The constant C will be given by a singular series. This integral has no closed form expression in terms of elementary functions, but can probably be expressed in terms of hypergeometric or polylog functions. |
|
|
|
|
|
|
#14 | |
|
"Bob Silverman"
Nov 2003
North of Boston
5×17×89 Posts |
Quote:
I confess to a mea-culpa. The actual double integral counts ALL twin primes. EVERY twin prime pair, [p, p+2] is of the form [k*2^n - 1, k*2^n+1] for SOME k. Thus, by allowing both k and n to vary we count all of the prime pairs. One needs to fix either k or n to obtain a meaningful result. |
|
|
|
|
|
|
#15 | |
|
"William"
May 2003
Near Grandkid
53×19 Posts |
Quote:
Quadratic is a reasonable approximation when the fixed n is large, so the value of ln(k*2n-1) is nearly constant. Last fiddled with by wblipp on 2008-03-26 at 13:54 |
|
|
|
|
|
|
#16 | |
|
Jun 2003
Suva, Fiji
204210 Posts |
Quote:
So k(n1)*2^(n1)+/1 is the first twin for the series n1 fixed, k variable. No k<k(n1) produces a twin. The value of k(n1) is indeterminate from a formula, otherwise twins would b rather easy to spot, but for a small range of n from say, n(a).....n(1)=n(a+49).....n(a+99), then I am purporting that the median value of k(na)....k(n1)....k(n(a+99)) is approximately 0.24*(n1)^2 and the average value approximately 0.364*(n1)^2 Hope this clarifies By the way, Bob, you did not define N or O, had to guess those ![]() Seriously, I really appreciate your interest, I intend to follow up on your comments on double Stieltje's integrals. Last fiddled with by robert44444uk on 2008-03-26 at 14:20 |
|
|
|
|
|
|
#17 | |
|
"Bob Silverman"
Nov 2003
North of Boston
5×17×89 Posts |
Quote:
"number of twin primes less than N". This defines N. The rest of your work is the same as a very well known problem, only in DISGUISE. By fixing n (or n1 in your notation), the set you are considering has the first prime of the pair in ARITHMETIC PROGRESSION. The question of when the first prime in an A.P. occurs is a very well studied problem. Here, we simply ask for first TWIN prime, when the first prime lies in a specific A.P. The theory is going to be quite similar. (trivially the second prime is also in an A.P. offset by 2 from the first) Do a web search for "first prime in arithmetic progression". |
|
|
|
|
|
|
#18 |
|
Jun 2003
Suva, Fiji
37728 Posts |
Your search - "first prime in arithmetic progression" - did not match any documents per Google, but I appreciate where you are coming from, I will look into it.
Shows one should not take things too literally Last fiddled with by robert44444uk on 2008-03-26 at 16:47 |
|
|
|
|
|
#19 |
|
Oct 2006
22×5×13 Posts |
I'm doing some work on this as well. I have compiled the data of the 5000 k and n values posted in the Twin Prime Search area, and also did some calculations with excel as to the curve of the average twin result. As he said though, they are pretty much meaningless when trying to use them as a guide.
I'll do some standard deviation calculations for the 80th, 90th, and 95th percentile so as to find a more efficient range to search. If a twin is not found, the previous area can then be checked in short time, and in any case this would have to be done to confirm it is the smallest. But this should at least shorten the time to find twins. I'll post the results in a couple hours, I think. |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Odds of prime / expected # of primes | gd_barnes | Riesel Prime Search | 16 | 2023-04-25 22:38 |
| Mersenne Primes p which are in a set of twin primes is finite? | carpetpool | Miscellaneous Math | 4 | 2022-07-14 02:29 |
| The expected number of primes | Batalov | Computer Science & Computational Number Theory | 5 | 2016-08-11 01:17 |
| Expected number of primes in OEIS A007908 | ewmayer | Probability & Probabilistic Number Theory | 6 | 2015-11-10 16:33 |
| I get 13% less primes than I expected:-( | mart_r | Math | 2 | 2010-10-29 17:31 |