mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Twin Prime Search (https://www.mersenneforum.org/forumdisplay.php?f=65)
-   -   I found a sieve to search all pairs of twin primes (https://www.mersenneforum.org/showthread.php?t=24111)

 Pietro Maiorana 2019-02-25 22:32

I found a sieve to search all pairs of twin primes

1 Attachment(s)
Through the use of some sequences that make up a useful sieve to calculate all the pairs of first twins it proves that they are endless.

[ATTACH]19954[/ATTACH]

 Batalov 2019-02-25 23:25

Will the colors in this PDF make my eyes bleed?

:rolleyes:

 bbb120 2019-03-09 06:14

[QUOTE=Pietro Maiorana;509439]Through the use of some sequences that make up a useful sieve to calculate all the pairs of first twins it proves that they are endless.

[ATTACH]19954[/ATTACH][/QUOTE]

please tell me the least twin primes which great than 10^1000

 Dr Sardonicus 2019-03-09 14:09

[QUOTE=bbb120;510478]please tell me the least twin primes which great than 10^1000[/QUOTE]This may already be known, but a cursory search failed to turn it up. I did find a lot of larger pairs of twin primes, though, so a least pair greater than 10^1000 certainly exists.

Judging from, e.g. [url=https://cs.uwaterloo.ca/journals/JIS/VOL8/Dubner/dubner71.pdf]Twin Prime Statistics[/url], they could be found as follows:

1) Sieve a "suitably" long interval (10^1000, 10^1000 + N) to eliminate all numbers with "small" factors.

2) Subject any remaining pairs differing by 2, starting with the smallest, to a pseudoprime test.

3) If you're really ambitious, subject any twin pseudoprimes you find to a rigorous primality test until you get a pair of proven primes. With numbers of this size, this might take a while.

Based on asymptotic estimates and my own sloppy estimates, you'd probably have to take N on the order of 10^7 or 10^8 to stand a decent chance of success.

I have no idea what a good sieving limit for "small" factors would be.

 danaj 2019-03-09 14:40

Sigh, [B]I now realize this was a test for the OP to show how well his method works.[/B] Well, ok um you can use the rest of this as a comparison I guess.

[QUOTE=bbb120;510478]please tell me the least twin primes which great than 10^1000[/QUOTE]

10^1000 + 9705091 is the smaller of the pair.

I'm sure it's online somewhere. It took about 2 minutes for my Macbook to find it. They are ES BPSW, and then I let Pari/GP prove them, a little over 1 minute each.

The software I used have chosen 80000 * log[SUB]2[/SUB](high) as the depth, purely because empirically that seemed to work well at a variety of sizes. Each candidate that passes this sieve is subjected to MR base 2 for both low and high, then ES Lucas for both low and high. It took 2.5 seconds for a width of 1e5, 13s for 1e6, 124s for 1e7 where it found one (I just ran it multiple times with a bigger window, redoing the previous part).

 Pietro Maiorana 2019-04-16 22:11

(Start)
[URL="https://oeis.org/A100319"][COLOR="Blue"][B]A100319+1[/B][/COLOR][/URL] (Even numbers m such that at least one of m-1 and m+1 is composite)
can be obtained as the union of:

3*[URL="https://oeis.org/A005818"][COLOR="Cyan"][B]A005818[/B][/COLOR][/URL];

5*[URL="https://oeis.org/A038179"][COLOR="Teal"][B]A038179[/B][/COLOR][/URL] without 2;

7*[URL="https://oeis.org/A007310"][COLOR="DarkOrchid"][B]A007310[/B][/COLOR][/URL] without 1;

[URL="https://oeis.org/A038511"][COLOR="Sienna"][B]A038511[/B][/COLOR][/URL]

[URL="https://oeis.org/A025584"][COLOR="Lime"][B]A025584[/B][/COLOR][/URL] without 2, 3. (End)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The sequence [URL="https://oeis.org/A038511"][COLOR="Sienna"][B]A038511[/B][/COLOR][/URL] can be obtained by multiplying each term of [B][URL="https://oeis.org/A008364"][COLOR="DarkOrange"][B]A008364[/B][/COLOR][/URL] [/B], except {1}, by itself and by all subsequent terms. Rewrite the terms in ascending order.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
(Start)
To obtain [URL="https://oeis.org/A025584"][COLOR="Lime"][B]A025584[/B][/COLOR][/URL] (Primes p such that p-2 is not a prime):
Write all terms of the form [B]2k + 7[/B] and delete all terms of the form [B](6k + (-1) ^ k + 13)/2[/B] [without [URL="https://oeis.org/A121764"][COLOR="Magenta"][B]A121764[/B][/COLOR][/URL]] and all terms of [URL="https://oeis.org/A092256"][COLOR="Red"][B]A092256[/B][/COLOR][/URL]
(End)

To calculate [URL="https://oeis.org/A121764"][COLOR="Magenta"][B]A121764[/B][/COLOR][/URL] (Single, or isolated or non-twin primes of form 6n + 1)
consider all term of [URL="https://oeis.org/A092256"][COLOR="Red"][B]A092256[/B][/COLOR][/URL](n) + 2 except those in common with:
[URL="https://oeis.org/A038511"][COLOR="Sienna"][B]A038511[/B][/COLOR][/URL], 5*[URL="https://oeis.org/A038179"][COLOR="Teal"][B]A038179[/B][/COLOR][/URL], and 7*[URL="https://oeis.org/A007310"][COLOR="DarkOrchid"][B]A007310[/B][/COLOR][/URL].

[URL="https://oeis.org/A092256"][COLOR="Red"][B]A092256[/B][/COLOR][/URL] (Nonprimes of form 6k+5) is the union of:
numbers of the form [COLOR="black"][B]5*(6k + 1)[/B][/COLOR] , numbers of the form [COLOR="black"][B]7*(6k + 5)[/B][/COLOR], and terms of [URL="https://oeis.org/A038511"][COLOR="Sienna"][B]A038511[/B][/COLOR][/URL] of the form 3*k+2
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 Pietro Maiorana 2019-09-26 21:03

Each pair of odd twin primes (Oeis A077800) has an even median value.

The non-median even values ​​(complementary to Oeis A014574) are found in the sequence Oeis A100319

(Even numbers m such that at least one of m-1 and m+1 is composite)

According to my theory, A100319+1 can be divided into 5 infinite sub-sequences

a) 3*A005818; b) 5*A038179 without 2; c) 7*A007310 without 1; d) A038511; e) A025584 without 2, 3.

The first three subsequences can be rewritten respectively as:

a) 9+6*(n-1)

b) 5*(floor((41/21 - (3 mod n))^(-3*n+5)) + 3*n - 4)

c) 7/2*(6*k+(-1)^k+9)

The sequence

d) A038511 can be obtained by multiplying each term of A008364, except {1}, by itself and by all subsequent terms. Rewrite the terms in ascending order.

where A008364 is equal to

a(n) = 35n/8 + O(1). - Charles R Greathouse IV, Sep 14 2015 (see Oeis)

e) To obtain A025584 (Primes p such that p-2 is not a prime):

Write all terms of the form 2k + 7 and delete: all terms of A092256 and all terms of the form (6k + (-1) ^ k + 13)/2 [without A121764]

(Start)

A092256 (Nonprimes of form 6k+5) is the union of:

numbers of the form 5*(6k + 1), numbers of the form 7*(6k + 5), and terms of A038511 of the form 3*k+2 (End)

(Start)

To calculate A121764 (Single, or isolated or non-twin primes of form 6n + 1) consider all term of A092256+2 except those in common with:

d) A038511,
b) 5*(floor((41/21 - (3 mod n))^(-3*n+5)) + 3*n - 4),
c) 7/2*(6*k+(-1)^k+9);
(End)

QUESTION: Why did I calculate A100319 + 1 and not A100319?

ANSWER: Because some sub-sequences used in A100319 + 1 as it was possible to see in the reasoning have been re-used in the construction for a sub-sequence in A025584 (exactly Oeis A121764 Single, or isolated or non-twin primes in the form 6n + 1)

---------------------------------------------------------------------------------------------------------------------
SECOND METHOD
---------------------------------------------------------------------------------------------------------------------

Consider only the sequence A025584 (Primes p such that p-2 is not a prime):

To obtain A025584 (without 2, 3)
Write all terms of the form 2k + 7 and delete: all terms of A092256 and all terms of the form (6k + (-1) ^ k + 13)/2 [without A121764]

(Start)

A092256 (Nonprimes of form 6k+5) is the union of:

numbers of the form 5*(6k + 1),
numbers of the form 7*(6k + 5),
and terms of A038511 of the form 3*k+2
(End)

(Start)

To calculate A121764 (Single, or isolated or non-twin primes of form 6n + 1)
consider all term of A092256+2 except those in common with:

a) A038511,
b) 5*(floor((41/21 - (3 mod n))^(-3*n+5)) + 3*n - 4),
c) 7/2*(6*k+(-1)^k+9);
(End)

While A038511 can be obtained by multiplying each term of 35n/8 + O(1) , except {1}, by itself and by all subsequent terms. Rewrite the terms in ascending order.

Well, if you remove from the infinite list of prime numbers, the values of A025584 can be obtained A006512 "Greater of twin primes"

 rudy235 2019-09-26 22:55

[COLOR="White"]......[/COLOR]

 rudy235 2019-09-26 23:07

[QUOTE=danaj;510487]Sigh, [B]I now realize this was a test for the OP to show how well his method works.[/B] Well, ok um you can use the rest of this as a comparison I guess.

10^1000 + 9705091 is the smaller of the pair.

I'm sure it's online somewhere. It took about 2 minutes for my Macbook to find it. They are ES BPSW, and then I let Pari/GP prove them, a little over 1 minute each.
[/quote]

yup, there are there at factordb both proven prime in 08/2015

 All times are UTC. The time now is 01:56.