Prime numbers and primality testing is a Restricted Group with 1111 members.
 Prime numbers and primality testing

 Restricted Group,
 1111 members
Primary Navigation
Consecutive Prime Pairs and Squares
Expand Messages
 0 Attachment
Hi Everybody
I had no luck searching. Anyone come across something like the following?
(1) There is NO LIMIT to the NUMBER of PAIRS of CONSECUTIVE PRIMES which
SUM to a SQUARE integer. By "a pair of consecutive primes" is meant 2
primes "P" and "Q" with P < Q, such that there exists no prime greater
than P and less than Q.
This begs the question; How many pairs of consecutive primes that sum to
a square exist below any given integer "X"? I cooked up the formula below
which seems to be a decent approximation. Maybe someone can find a better
one:
Number of Pairs approximately equals the SQUARE ROOT of the RESULT of
dividing "X" by the SQUARE of it's natural log, SQRT [ X / (( LN(X))^ 2)
]
(2) For EVERY EVEN integer "N" NOT DIVISIBLE by 4, there is a pair of
CONSECUTIVE PRIMES whose DIFFERENCE equals N and whose SUM is a SQUARE
integer.
(3) Or wording (2) differently; For EVERY EVEN integer "N" NOT DIVISIBLE
by 4, there is a SQUARE integer "S" such that (S  N) / 2 and (S + N) / 2
are CONSECUTIVE PRIMES.
Here are some examples:
N = 2, P = 17, Q = 19, QP = 2, P+Q = 36
N = 6, P = 47, Q = 53, QP = 6, P+Q = 100
N = 10, P = 283, Q = 293, QP = 10, P+Q = 576
N = 14, P = 7193, Q = 7207, QP = 14, P+Q = 14,400
N = 18, P = 1913, Q = 1931, QP = 18, P+Q = 3844
N = 22, P = 198,439, Q = 198461, QP = 22, P+Q = 396,900
N = 26, P = 20,608,187, Q = 20,608,213, QP = 26, P+Q = 41,216,400
My gut feeling is that (1) is true but I'm of 2 minds regarding (2) and
(3). Do any record Twins sum to a square? I would appreciate comments on
this harebrained exercise. Thanks folks and regards.
Bill Sindelar 0 Attachment
w_sindelar@... wrote:> N = 2, P = 17, Q = 19, QP = 2, P+Q = 36
Seems like a good candidate for submission to the EIS...
> N = 6, P = 47, Q = 53, QP = 6, P+Q = 100
> N = 10, P = 283, Q = 293, QP = 10, P+Q = 576
> N = 14, P = 7193, Q = 7207, QP = 14, P+Q = 14,400
> N = 18, P = 1913, Q = 1931, QP = 18, P+Q = 3844
> N = 22, P = 198,439, Q = 198461, QP = 22, P+Q = 396,900
> N = 26, P = 20,608,187, Q = 20,608,213, QP = 26, P+Q = 41,216,400
Some more terms:
30: 21617+21647=43264
34: 13468033+13468067=26936100
38: 95966639+95966677=191933316
42: 293357+293399=586756
46: 68444977+68445023=136890000
50: 2345753+2345803=4691556
54: 8160773+8160827=16321600
58: 121492843+121492901=242985744
62: 6372419+6372481=12744900
66: 1034670017+1034670083=2069340100
70: 14547583+14547653=29095236
74: 24640163+24640237=49280400
78: 13572011+13572089=27144100
82: 31553527+31553609=63107136
86: 14026450007+14026450093=28052900100
90: 1808890907+1808890997=3617781904
94: 2020572403+2020572497=4041144900
98: 183284609+183284707=366569316
102: 2266664399+2266664501=4533328900
106???
110: 9693331793+9693331903=19386663696
114: 3137111993+3137112107=6274224100
118: 9473210599+9473210717=18946421316
122: 1418420261+1418420383=2836840644
126: 6471806387+6471806513=12943612900
130: 21450589873+21450590003=42901179876
134???
138: 1483272509+1483272647=2966545156
142: 31468380121+31468380263=62936760384
146: 13617450377+13617450523=27234900900
150: 15088624253+15088624403=30177248656
154???
158???
162: 7025865719+7025865881=14051731600
<more missing terms>
190: 69026930473+69026930663=138053861136 0 Attachment
Here are entries for Jack's holes:
b+a=(2*n)^2
ba=d
{a,b} are consecutive primes
[d,a,b,n]
[106, 120295124947, 120295125053, 245250]
[134, 195156281183, 195156281317, 312375]
[154, 308544401173, 308544401327, 392775]
[158, 178197335993, 178197336151, 298494] 0 Attachment
>How many pairs of consecutive primes that sum to
Some data:
>a square exist below any given integer "X"? I cooked up
>the formula below which seems to be a decent
>approximation. Maybe someone can find a better
>one:
>Number of Pairs approximately equals the SQUARE
>ROOT of the RESULT of dividing "X" by the SQUARE
>of it's natural log, SQRT [ X / (( LN(X))^ 2)
X pairs<X sqrt(X/((log(X))^2))

1000 5 4.577865793523512502296701192
2000 7 5.883690757516975123201269824
3000 8 6.841086833412955259916418755
4000 9 7.625412910187210251756925744
5000 10 8.302110393588124420653850701
6000 10 8.903906616180473804675151587
7000 11 9.449871732046395748030319176
8000 13 9.952237709355460115448370828
9000 13 10.41938931245608022410508548
10000 13 10.85736204758129569127822297
11000 13 11.27066659481938607868522504
12000 13 11.66277593421025375550125358
13000 13 12.03642960335341649685490080
14000 13 12.39383242480716963796203103
15000 13 12.73678917411758972580809878
16000 14 13.06679869958842505605185129
17000 14 13.38512145452166014616015105
18000 14 13.69282906263810418868691592
19000 14 13.99084142163526281430986448
20000 14 14.27995496405644601507098660
21000 15 14.56086451633549063855770152
22000 16 14.83418043973118338727070929
23000 16 15.10044223812948505271843053
 Original Message 
From: w_sindelar@...
To: primenumbers@yahoogroups.com
Sent: Sunday, November 17, 2002 10:00 AM
Subject: [PrimeNumbers] Consecutive Prime Pairs and Squares
Hi Everybody
I had no luck searching. Anyone come across something like the following?
(1) There is NO LIMIT to the NUMBER of PAIRS of CONSECUTIVE PRIMES which
SUM to a SQUARE integer. By "a pair of consecutive primes" is meant 2
primes "P" and "Q" with P < Q, such that there exists no prime greater
than P and less than Q.
This begs the question; How many pairs of consecutive primes that sum to
a square exist below any given integer "X"? I cooked up the formula below
which seems to be a decent approximation. Maybe someone can find a better
one:
Number of Pairs approximately equals the SQUARE ROOT of the RESULT of
dividing "X" by the SQUARE of it's natural log, SQRT [ X / (( LN(X))^ 2)
]
(2) For EVERY EVEN integer "N" NOT DIVISIBLE by 4, there is a pair of
CONSECUTIVE PRIMES whose DIFFERENCE equals N and whose SUM is a SQUARE
integer.
(3) Or wording (2) differently; For EVERY EVEN integer "N" NOT DIVISIBLE
by 4, there is a SQUARE integer "S" such that (S  N) / 2 and (S + N) / 2
are CONSECUTIVE PRIMES.
Here are some examples:
N = 2, P = 17, Q = 19, QP = 2, P+Q = 36
N = 6, P = 47, Q = 53, QP = 6, P+Q = 100
N = 10, P = 283, Q = 293, QP = 10, P+Q = 576
N = 14, P = 7193, Q = 7207, QP = 14, P+Q = 14,400
N = 18, P = 1913, Q = 1931, QP = 18, P+Q = 3844
N = 22, P = 198,439, Q = 198461, QP = 22, P+Q = 396,900
N = 26, P = 20,608,187, Q = 20,608,213, QP = 26, P+Q = 41,216,400
My gut feeling is that (1) is true but I'm of 2 minds regarding (2) and
(3). Do any record Twins sum to a square? I would appreciate comments on
this harebrained exercise. Thanks folks and regards.
Bill Sindelar 0 Attachment
In a message dated 17/11/02 19:13:07 GMT Standard Time,
zen_ghost_floating@... writes:
> Some data:
[snip]
>
> X pairs<X sqrt(X/((log(X))^2))
> 
> 1000 5 4.577865793523512502296701192
Some more data:
x=10, count = 0 and sqrt(x/(ln(x))^2)= 1.37335973805705
x=100, count = 3 and sqrt(x/(ln(x))^2)= 2.17147240951626
x=1000, count = 5 and sqrt(x/(ln(x))^2)= 4.57786579352351
x=10000, count = 13 and sqrt(x/(ln(x))^2)=10.8573620475813
x=100000, count = 28 and sqrt(x/(ln(x))^2)=27.4671947611411
x=1000000, count = 79 and sqrt(x/(ln(x))^2)=72.3824136505420
x=10000000, count = 187 and sqrt(x/(ln(x))^2)=196.194248293865
x=100000000, count = 487 and sqrt(x/(ln(x))^2)=542.868102379065
x=1000000000, count = 1291 and sqrt(x/(ln(x))^2)=1525.955264507837
[Pascal program, runtime 2 GHzminutes]
Mike Oakes
[Nontext portions of this message have been removed] 0 Attachment
In a message dated 17/11/02 18:14:08 GMT Standard Time,
d.broadhurst@... writes:
> Here are entries for Jack's holes:
First of all, a salute to Bill for his interesting and challenging original
>
> b+a=(2*n)^2
> ba=d
> {a,b} are consecutive primes
>
> [d,a,b,n]
> [106, 120295124947, 120295125053, 245250]
> [134, 195156281183, 195156281317, 312375]
> [154, 308544401173, 308544401327, 392775]
> [158, 178197335993, 178197336151, 298494]
>
post.
I've confirmed all Jack's and David's results; here are the fillers for the
remaining hole, plus a couple of new results. The Pascal [of course] program
took 20 mins to reach d=198:
[166, 2994222618367, 2994222618533, 1223565]
[170, 185597655197, 185597655367, 304629]
[174, 3051561601163, 3051561601337, 1235225]
[178, 842500650799, 842500650977, 649038]
[182, 291708968471, 291708968653, 381909]
[186, 639252551957, 639252552143, 565355]
[190, 69026930473, 69026930663, 185778]
[194, 607554691103, 607554691297, 551160]
[198, 463850150693, 463850150891, 481586]
Mike Oakes
[Nontext portions of this message have been removed] 0 Attachment
To continue this:
{a,b} are consecutive primes
a+b=(2*n)^2
ba=d
Note that I have searched up to 2*n=25 million, so if you want to fill in the
gaps by working 'across' rather than 'up' I suggest that you start there
(though I may have made an error, of course).
Regards,
Paul.
[d,a,b,n]
[202, 276890029347, 276890029549, 372082]
[206, 1626919372697, 1626919372903, 901920]
[210, 30154276937, 30154277147, 122789]
[214, 45468601604893, 45468601605107, 4768050]
[218, 2036149891909, 2036149892127, 1008997]
[222, 328113182931, 328113183153, 405039]
[226, 270531612337, 270531612563, 367785]
[230, 16743191487167, 16743191487397, 2893371]
[234, 260219079581, 260219079815, 360707]
[238, 1361586620689, 1361586620927, 825102]
[242, 819911834447, 819911834689, 640278]
[246, 2298925473677, 2298925473923, 1072130]
[250, 2154219579717, 2154219579967, 1037839]
[254, 24567386272073, 24567386272327, 3504810]
[258, 153166734209, 153166734467, 276737]
[262, 56110845694207, 56110845694469, 5296737]
[266, ?, ?, ?]
[270, 182622155192843, 182622155193113, 9555683]
[274, 310055798080663, 310055798080937, 12451020]
[278, 173296642371989, 173296642372267, 9308508]
[282, 36483035756021, 36483035756303, 4271009]
[286, ?, ?, ?]
[290, 80129216749697, 80129216749987, 6329661]
[294, 15438179611103, 15438179611397, 2778325]
[298, 1446785551101, 1446785551399, 850525]
[302, 207301042384049, 207301042384351, 10180890]
[306, 64741275660647, 64741275660953, 5689520]
[310, 21353321620357, 21353321620667, 3267516]
[314, ?, ?, ?]
[318, ?, ?, ?]
[322, ?, ?, ?]
[326, ?, ?, ?]
[330, 15527358900323, 15527358900653, 2786338]
[334, ?, ?, ?]
[338, 232077698739209, 232077698739547, 10772133]
__________________________________________________
Virus checked by MessageLabs Virus Control Centre. 0 Attachment
> {a,b} are consecutive primes
By the way  does anybody have any thoughts on what the ABC conjecture can
> a+b=(2*n)^2
> ba=d
tell us about these?
Regards,
Paul.
__________________________________________________
Virus checked by MessageLabs Virus Control Centre. 0 Attachment
 In primenumbers@y..., "Paul Jobling" <Paul.Jobling@W...> wrote:> To continue this:
There does seem to be a bit of a problem in that most of
>
> {a,b} are consecutive primes
> a+b=(2*n)^2
> ba=d
>
> (though I may have made an error, of course).
your 'primes' are not. Most noticably, one of them ends in 5.
Rick 0 Attachment
In a message dated 19/11/02 17:31:14 GMT Standard Time,
Paul.Jobling@... writes:
> Note that I have searched up to 2*n=25 million, so if you want to fill in the
I'm pretty sure the following are the correct (minimumn) continuation of my
> gaps by working 'across' rather than 'up' I suggest that you start there
> (though I may have made an error, of course).
>
previous posting up to d=278:
[202, 1107563094349, 1107563094551, 744165]
[206, 6507677491097, 6507677491303, 1803840]
[210, 120617108063, 120617108273, 245578]
[214, 45468601604893, 45468601605107, 4768050]
[218, 8144607639941, 8144607640159, 2017995]
[222, 1312455972371, 1312455972593, 810079]
[226, 1082126449687, 1082126449913, 735570]
[230, 16743191487167, 16743191487397, 2893371]
[234, 1040879204333, 1040879204567, 721415]
[238, 5446346483113, 5446346483351, 1650204]
[242, 3279647338151, 3279647338393, 1280556]
[246, 9195701895077, 9195701895323, 2144260]
[250, 8616886621957, 8616886622207, 2075679]
[254, 24567386272073, 24567386272327, 3504810]
[258, 612669151121, 612669151379, 553475]
[262, 56110845694207, 56110845694469, 5296737]
[266, 320422081004867, 320422081005133, 12657450]
[270, 182622155192843, 182622155193113, 9555683]
[274, 310055798080663, 310055798080937, 12451020]
[278, 173296642371989, 173296642372267, 9308508]
[runtime just under 12 GHzhours for the whole lot.]
There are quite a few differences with yours.
Also, running a different job, I agree with your values for d=290, 310 and
330, but not d=298.
We need an adjudicator :)
Mike Oakes
[Nontext portions of this message have been removed] 0 Attachment
mikeoakes2@... wrote:
> We need an adjudicator :)
[2, 17, 19, 3]
[6, 47, 53, 5]
[10, 283, 293, 12]
[14, 7193, 7207, 60]
[18, 1913, 1931, 31]
[22, 198439, 198461, 315]
[26, 20608187, 20608213, 3210]
[30, 21617, 21647, 104]
[34, 13468033, 13468067, 2595]
[38, 95966639, 95966677, 6927]
[42, 293357, 293399, 383]
[46, 68444977, 68445023, 5850]
[50, 2345753, 2345803, 1083]
[54, 8160773, 8160827, 2020]
[58, 121492843, 121492901, 7794]
[62, 6372419, 6372481, 1785]
[66, 1034670017, 1034670083, 22745]
[70, 14547583, 14547653, 2697]
[74, 24640163, 24640237, 3510]
[78, 13572011, 13572089, 2605]
[82, 31553527, 31553609, 3972]
[86, 14026450007, 14026450093, 83745]
[90, 1808890907, 1808890997, 30074]
[94, 2020572403, 2020572497, 31785]
[98, 183284609, 183284707, 9573]
[102, 2266664399, 2266664501, 33665]
[106, 120295124947, 120295125053, 245250]
[110, 9693331793, 9693331903, 69618]
[114, 3137111993, 3137112107, 39605]
[118, 9473210599, 9473210717, 68823]
[122, 1418420261, 1418420383, 26631]
[126, 6471806387, 6471806513, 56885]
[130, 21450589873, 21450590003, 103563]
[134, 195156281183, 195156281317, 312375]
[138, 1483272509, 1483272647, 27233]
[142, 31468380121, 31468380263, 125436]
[146, 13617450377, 13617450523, 82515]
[150, 15088624253, 15088624403, 86858]
[154, 308544401173, 308544401327, 392775]
[158, 178197335993, 178197336151, 298494]
[162, 7025865719, 7025865881, 59270]
[166, 2994222618367, 2994222618533, 1223565]
[170, 185597655197, 185597655367, 304629]
[174, 3051561601163, 3051561601337, 1235225]
[178, 842500650799, 842500650977, 649038]
[182, 291708968471, 291708968653, 381909]
[186, 639252551957, 639252552143, 565355]
[190, 69026930473, 69026930663, 185778]
[194, 607554691103, 607554691297, 551160]
[198, 463850150693, 463850150891, 481586]
[202, 1107563094349, 1107563094551, 744165]
[206, 6507677491097, 6507677491303, 1803840]
[210, 120617108063, 120617108273, 245578]
[214, 45468601604893, 45468601605107, 4768050]
[218, 8144607639941, 8144607640159, 2017995]
[222, 1312455972371, 1312455972593, 810079]
[226, 1082126449687, 1082126449913, 735570]
[230, 16743191487167, 16743191487397, 2893371]
[234, 1040879204333, 1040879204567, 721415]
[238, 5446346483113, 5446346483351, 1650204]
[242, 3279647338151, 3279647338393, 1280556]
[246, 9195701895077, 9195701895323, 2144260]
[250, 8616886621957, 8616886622207, 2075679]
[254, 24567386272073, 24567386272327, 3504810]
[258, 612669151121, 612669151379, 553475]
[262, 56110845694207, 56110845694469, 5296737]
[266, 320422081004867, 320422081005133, 12657450]
[270, 182622155192843, 182622155193113, 9555683]
[274, 310055798080663, 310055798080937, 12451020]
[278, 173296642371989, 173296642372267, 9308508]
[282, 36483035756021, 36483035756303, 4271009]
[286, 418514688865657, 418514688865943, 14465730]
[290, 80129216749697, 80129216749987, 6329661]
[294, 15438179611103, 15438179611397, 2778325]
[298, 5787149009053, 5787149009351, 1701051]
[302, 207301042384049, 207301042384351, 10180890]
[306, 64741275660647, 64741275660953, 5689520]
[310, 21353321620357, 21353321620667, 3267516]
[314, 898795625979893, 898795625980207, 21199005]
[318, 604700459089523, 604700459089841, 17388221]
[322, 423319624904017, 423319624904339, 14548533]
[330, 15527358900323, 15527358900653, 2786338]
[338, 232077698739209, 232077698739547, 10772133]
[342, 426282332831879, 426282332832221, 14599355]
[350, 1864497156600857, 1864497156601207, 30532746]
[358, 1081482149491021, 1081482149491379, 23253840]
[370, 1162071388642063, 1162071388642433, 24104682]
[378, 1041185800829861, 1041185800830239, 22816505]
[426, 2877282561661037, 2877282561661463, 37929425]
[438, 1571071646835269, 1571071646835707, 28027412]
Just the raw data; draw your own conclusions...
I'm at 16.8 GHzhours (48 hours on a 350 MHz PII)
for this so far and still running. Please somebody
stop me!!!! :^) 0 Attachment
> There are quite a few differences with yours.
I think I screwed up somehow... I have got composites in there :( So you are
> Also, running a different job, I agree with your values for
> d=290, 310 and
> 330, but not d=298.
>
> We need an adjudicator :)
problably correct.
Oh well.
Regards,
Paul.
__________________________________________________
Virus checked by MessageLabs Virus Control Centre. 0 Attachment
> Just the raw data; draw your own conclusions...
Here's some more raw data.
First col is max_n, second is count of all solutions with d=2 for n <= max_n,
third is ditto for all d combined:
n count_2 count_all X ln(X) sqrt(X)/ln(X)
10 2 3 2*10^2 5.29832 2.66917
10^2 8 14 2*10^4 9.90349 14.2800
10^3 39 104 2*10^6 14.5087 97.4738
10^4 191 631 2*10^8 19.1138 739.890
10^5 1162 5154 2*10^10 23.7190 5962.37
10^6 7617 41439 2*10^12 28.3242 49929.6
2*10^6 13693 78353 8*10^12 29.7105 95199.7
3*10^6 19299 113700 1.8*10^13 30.5214 139005.5
4*10^6 24726 148383 3.2*10^13 31.0968 181911.4
5*10^6 29996 182546 5*10^13 31.5430 224172.0
You will see that Bill's original formula (3rcol = 6th col) is not looking
too wonderful.
But his conjecture that there are (many) solutions for every d is becoming
daily more likely to be true.
Anyone for curvefitting?
Mike
[Nontext portions of this message have been removed] 0 Attachment
On 17/11/02 Bill Sindelar memorably wrote:
> How many pairs of consecutive primes that sum to
In terms of David's pithy notation:
> a square exist below any given integer "X"? I cooked up the formula below
> which seems to be a decent approximation. Maybe someone can find a better
> one:
> Number of Pairs approximately equals the SQUARE ROOT of the RESULT of
> dividing "X" by the SQUARE of it's natural log, SQRT [ X / (( LN(X))^ 2)
>
> b+a=(2*n)^2
let N(d,X) be the count of all such pairs with (2*n^2) < X, and N(X) be the
> ba=d
> {a,b} are consecutive primes,
total of N(d,X) for all d.
Then Bill's formula is N(X) ~ sqrt(X)/log(X) for X >> 1.
Max B posted some early results bearing on this conjecture, and I have just
completed counts, categorized by d, of all solutions for X <= 10^14 [runtime
c. 1 GHzweek].
The following tabulates N(X), and also the speciallyinteresting twinprime
case N(2,X):
N(X) N(2,X) X log(X) R1 R2 R3
3 2 2.0e2 5.29832 1.12394 3.9700 3.5322
14 8 2.0e4 9.90349 0.98039 5.5482 5.65928
104 39 2.0e6 14.5087 1.06695 5.8050 5.4407
631 191 2.0e8 19.1138 0.85283 4.9342 5.7857
5154 1162 2.0e10 23.7190 0.86442 4.6226 5.3476
41439 7617 2.0e12 28.3242 0.82995 4.3210 5.2063
347218 54755 2.0e14 32.9293 0.80848 4.1983 5.1928
where
R1 = N(X)/[sqrt(X)/log(X)]
R2 = N(2,X)/[sqrt(X)/log(X)^2]
R3 = R2/R1 = (N(2,X)/N(X))*log(X)
In view of the vast span of X, the ratios in each of the last 3 columns, and
the last especially, show every sign of converging asymptotically to
constants.

Theoretical expectations for N(X)
Let x = 2*n^2, n >> 1.
Let n be incremented by m, to (n+m), where m << n.
Then there are m numbers of form (2*n^2) between x and 2*(n+m)^2 = 2*n^2 +
4*m*n = x + sqrt(8*x) * m.
So the probability of a number of size x being of form (2*n^2) is P1 =
1/sqrt(8*x).
Starting at the number x = 2*n^2, look at the numbers (xk) and (x+k) for k =
1,2,3,..,
stopping as soon as either is prime; by the Prime Number Theorem, the
probability of the other one being prime is approximately P2 = 1/log(x).
Assuming these two probabilities (P1 and P2) are independent,
the probability of a number of size x being BOTH of the form (2*n^2)
AND the midpoint of a pair of consecutive primes = P1*P2 =
1/[sqrt(8*x)*log(x)].
So the total number of such numbers in (1,X) = N1(X) = [1/sqrt(8)] * E1(X) =
0.353553 * E1(X),
where E1(X) = integral{1 to X} [dx/(sqrt(x)*log(x))]
Substituting x=y^2, and integrating by parts, we find E1(X) = Li(sqrt(X)),
where Li() is the logarithmic integral function.
For X >> 1, there is the asymptotic expansion:
E1(X) = (2*sqrt(X)/(log(X)) * [1 + (2*1!)/log(X) + (2^2*2!)/log(X)^2 + ... ]
and taking the first term only:
E1(X) ~ 2*sqrt(X)/log(X), and
N1(X) = [1/sqrt(8)] * E1(X) ~ 0.7071067*sqrt(X)/log(X).
Comparison with the experimental data is given in the following table:
N(X) X log(X) 2*sqrt(X)/log(X) E1(X) N(X)/N1(X)
3 2.0e2 5.29832 5.33834 10.60 0.800
14 2.0e4 9.90349 28.5600 39.2089 1.010
104 2.0e6 14.5087 194.948 233.984 1.257
631 2.0e8 19.1138 1479.78 1681.46 1.062
5154 2.0e10 23.7190 11924.7 13157.1 1.108
41439 2.0e12 28.3242 99859.2 108176.5 1.084
347218 2.0e14 32.9293 858939.3 918884.7 1.069
The above conjectural argument predicts the last column to be 1, and seems to
be in good shape.
So, here's my formula:
N(X) ~ [1/sqrt(2)]*sqrt(X)/log(X) for X >> 1.

Theoretical expectations for N(2,X)
Again, let x = 2*n^2, n >> 1.
Let n be incremented by m, to (n+m), where m << n.
Then there are m numbers of form (2*n^2) between x and 2*(n+m)^2 = 2*n^2 +
4*m*n = x + sqrt(8*x) * m.
1/3 of these are = 0 mod 6 (and 2/3 are = 2 mod 6);
so there are m/3 numbers = 0 mod 6 and of form (2*n^2) between x and x +
sqrt(8*x) * m;
so there are D/sqrt(72*m) numbers of form (2*n^2) among the (D/6) numbers = 0
mod 6 in the interval (x,x+D).
Ignoring the first pair (3,5), all twin primes are such that the first = 1
mod 6, and the second = 1 mod 6; so their mean is = 0 mod 6.
The number of such twin pairs between X and X + D is conjectured to be
N = C2*D/log(X)^2, where the "twin primes constant" C2 = 1.320323632...
Assuming that the probability (P1) of a number = 0 mod 6 being the midpoint
of a twinprime pair, and (P2) being of form (2*n^2) are independent, the
probability of a number = 0 mod 6 having BOTH properties is just the product
of these 2 individual probabilities:
P1*P2 = [(D/sqrt(72*x)) / (D/6)] * [(C2*D/log(x)^2) / (D/6)] = [6/sqrt(72*x)]
* [6*C2/log(x)^2].
So the count of such numbers in (x,x+D) = [1/sqrt(2*x)] * C2/log(x))^2] * D.
So the predicted total of such numbers in (1,X) = N2(X) = [C2/sqrt(2)] *
E2(X) = 0.933610 * E2(X),
where E2(X) = integral{1 to X} [dx/(sqrt(x)*log(x)^2)].
For X >> 1, there is the asymptotic expansion:
E2(X) = (2*sqrt(X)/(log(X)^2) * [1 + (2*2!)/log(X) + (2^2*3!)/log(X)^2 + ... ]
and taking the first term only:
E2(X) ~ 2*sqrt(X)/log(X)^2, and
N2(X) = 0.933610 * E2(X) ~ 1.86722 * sqrt(X)/log(X)^2.
Comparison with the experimental data is given in the following table:
N(2,X) X log(X) 2*sqrt(X)/log(X)^2 E2(X) N(2,X)/N2(X)
2 2.0e2 5.29832 1.00756 2.63 0.81
8 2.0e4 9.90349 2.88384 5.324 1.610
39 2.0e6 14.5087 13.4366 20.1000 2.0783
191 2.0e8 19.1138 77.4158 101.950 2.0067
1162 2.0e10 23.7190 502.750 619.268 2.0098
7617 2.0e12 28.3242 3525.58 4169.26 1.9568
54755 2.0e14 32.9293 26084.3 30012.6 1.9541
The above heuristic reasoning predicts the last column to be 1, and seems to
be out by a factor of approximately (exactly?) 2.
Either the math is wrong (very possible!) or the probabilityindependence
assumption must be false. Anyone know which?
Either way, my conjecture is:
N(2,X) = 2*N2(X) ~ C2*sqrt(8)*sqrt(X)/(log(X)^2) for X >> 1.
Mike
[Nontext portions of this message have been removed] 0 Attachment
 In primenumbers@y..., mikeoakes2@a... wrote:
<snip>
Using your table: Actual / heuristic =
0.81
1.610
2.0783
2.0067
2.0098
1.9568
1.9541
> The above heuristic reasoning predicts the last column to be 1,
> and seems to be out by a factor of approximately (exactly?) 2.
>
> Either the math is wrong (very possible!) or the
> probabilityindependence assumption must be false. Anyone
> know which?
In the twin prime case, I believe it's relatively easy to show that
the probability independence assumption is false and to come up with
a correction factor which explains the discrepancy between the actual
and heuristic results above.
When calculating the density of twin primes (6m1,6m+1) we normally
assume that 2/5 of the m values will be removed because 5 divides
either 6m1 or 6m+1. This means that the density has gone down by a
factor of 3/5 due to the prime 5. If we're saying that we want the
average of the twin primes to be 2n^2 then we can observe that 5
never divides either 2n^21 or 2n^2+1 so we need to correct 5's
influence on the density of twin primes. We can do this by increasing
the density by 5/3.
Now we perform the same calculation for the prime 7. We can see 2/7
of the m values are removed because 7 divides 6m1 or 6m+1. We can
also see that 2n^21 is divisible by 7 when n=+2 mod 7 so we can see
that the density of candidates for both instances decreases by a
factor of 5/7 due to being divisible by 7. This means that no
correction to the density is required.
For the prime 17 we can see that the density of m values decreases by
a factor of 15/17. We can see that 2n^21 is divisible by 17 when n=+
3 and 2n^2+1 is divisible by 17 when n=+5 so instead of decreasing
the number of n candidates by 15/17 we need to decrease it by 13/17
which means that the density correction needs to be 13/15.
Whether a prime increases, decreases or leaves the density unchanged
depends on its residue modulo 8. This is related to whether +2 and 2
are quadratic residues or not. So for the primes p%8==5 we increase
the density by p/(p2). For primes p%8==1 we decrease the density by
(p4)/(p2). The other primes leave the density unchanged.
A fairly simplistic calculation of the density correction seems to
indicate that it lies somewhere in the region of 1.9514 which gives
pleasing agreement with Mike's values
Richard Heylen 0 Attachment
In a message dated 01/12/02 01:58:39 GMT Standard Time,
richard_heylen@... writes:
> A fairly simplistic calculation of the density correction seems to
How nice to have one's work corrected and rounded out by another  especially
> indicate that it lies somewhere in the region of 1.9514
when the answer matches up so nicely!
Richard's line of reasoning seems both elegant and incontravertible.
Mike
[Nontext portions of this message have been removed]
Your message has been successfully submitted and would be delivered to recipients shortly.