mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2008-03-26, 09:23   #12
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Suva, Fiji

2×1,021 Posts
Default

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
robert44444uk is offline   Reply With Quote
Old 2008-03-26, 11:48   #13
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

5×17×89 Posts
Default

Quote:
Originally Posted by robert44444uk View Post

The reason for curve fitting is to ensure, at least in my mind, that a formula of the kind A*n^2, which has basis in the underlying mathematics, would be appropriate. The fact that I am getting best fit curve fitting of the form a*n^1.95 and b*n^2.11 suggest that in fact, A*n^2 is probably the underlying formula, even if it does not give best fit, it would be close.

.
What are you measuring? What is n? The first thing in any mathematical
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.
R.D. Silverman is offline   Reply With Quote
Old 2008-03-26, 13:30   #14
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

5×17×89 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
What are you measuring? What is n? The first thing in any mathematical
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.
I cranked through the integral with Mathematica. Then I realized something.

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.
R.D. Silverman is offline   Reply With Quote
Old 2008-03-26, 13:42   #15
wblipp
 
wblipp's Avatar
 
"William"
May 2003
Near Grandkid

53×19 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
What are you measuring? What is n? The first thing in any mathematical effort is to define your variables! What is/are the dependent variable(s)? What is the independent variable?

...

You say that your formula has a basis in the underlying mathematics.
Please explain that basis to us.
The answers to all the questions and to the mathematical basis for a quadratic solution are in the first three messages of this thread.

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
wblipp is offline   Reply With Quote
Old 2008-03-26, 14:13   #16
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Suva, Fiji

204210 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
What are you measuring? What is n? The first thing in any mathematical
effort is to define your variables! What is/are the dependent variable(s)?
What is the independent variable?
I am looking at the first k -- call it k(n1) -- to produce a twin in the series k*2^(n1)+/1, n1 fixed, k variable.

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
robert44444uk is offline   Reply With Quote
Old 2008-03-26, 14:30   #17
R.D. Silverman
 
R.D. Silverman's Avatar
 
"Bob Silverman"
Nov 2003
North of Boston

5×17×89 Posts
Default

Quote:
Originally Posted by robert44444uk View Post
I am looking at the first k -- call it k(n1) -- to produce a twin in the series k*2^(n1)+/1, n1 fixed, k variable.

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.
O() needs no definition, it is standard notation. And I did say
"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".
R.D. Silverman is offline   Reply With Quote
Old 2008-03-26, 16:19   #18
robert44444uk
 
robert44444uk's Avatar
 
Jun 2003
Suva, Fiji

37728 Posts
Default

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
robert44444uk is offline   Reply With Quote
Old 2008-04-02, 21:19   #19
roger
 
roger's Avatar
 
Oct 2006

22×5×13 Posts
Default

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.
roger is offline   Reply With Quote
Reply



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

All times are UTC. The time now is 13:44.


Fri Jul 7 13:44:14 UTC 2023 up 323 days, 11:12, 0 users, load averages: 1.26, 1.09, 1.11

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔