Improved sieve for primes and prime twins?












3














Suppose we want to estimate the number of primes between $x$ and its square root, say for example between $10$ and $100$ with a sieve.



There are $90 $ numbers so we estimate :



$pi(10,100) = 90(1-1/2)(1-1/3)(1-1/5)(1-1/7) \
= 90 * 2 * 4 * 6 /2 / 3 / 5 / 7 = 90 * 24 / 105 = 20,57ldots$



This is very good. The true value is $21$.



However we know from The prime number theorem and from Mertens’ theorem that this is only a good estimate up to a multiplicative constant.



The problem is easily identified.



On one hand we have that divisions have remainders leading to increasing error terms.



On the other hand we have this :



$(1-1/2)(1-1/3)cdots(1-1/p_{n-1})(1-1/p_n)$ where $p_n$ is close to The square root of $x$ , leading to meaningless things ( terms ) like $x/(2*3*p_{n-1}*p_n) << 1$.



Truncating is thus the idea.



Let $omega(n)$ count the number of distinct prime factors of the integer $ n geq 2$. This $omega(n)$ is called the prime omega function.



Consider the truncated version of $(1-1/2)(1-1/3)ldots$ :



$$ pi(t,t^2 + t) = sum_{1<i<t} frac{(-1)^{omega(i)} t^2}{i} $$



Where $i$ are the squarefree integers.



How much better is this?



More precisely: is $sum_{1<i<t^2} frac{(-1)^{omega(i)} t^2}{i} $ asymptotic to $frac{t^2}{2 ln(t)} $ or are we still off by a constant factor ?



And if we are still off by a constant is it the same as Mertens’ or did we improve it - closer to $1$ - ?
How about a closed form then?



The analogue question for prime twins:



is $sum_{2<j<t^2} frac{(-2)^{omega(j)} t^2}{j} $ where $j $ are squarefree odd integers, asymptotic to $frac{t^2}{2 ln^2(t)}$ or are we still off by a constant factor?



And if we are still off by a constant is it the same as Mertens’ squared or did we improve it - closer to $1$ - ?
How about a closed form then?



I was unable to find this online or in libraries.










share|cite|improve this question
























  • can you please provide me some numerical calculation where you don't able to find its reason.
    – Adarsh Kumar
    Dec 23 '18 at 12:15
















3














Suppose we want to estimate the number of primes between $x$ and its square root, say for example between $10$ and $100$ with a sieve.



There are $90 $ numbers so we estimate :



$pi(10,100) = 90(1-1/2)(1-1/3)(1-1/5)(1-1/7) \
= 90 * 2 * 4 * 6 /2 / 3 / 5 / 7 = 90 * 24 / 105 = 20,57ldots$



This is very good. The true value is $21$.



However we know from The prime number theorem and from Mertens’ theorem that this is only a good estimate up to a multiplicative constant.



The problem is easily identified.



On one hand we have that divisions have remainders leading to increasing error terms.



On the other hand we have this :



$(1-1/2)(1-1/3)cdots(1-1/p_{n-1})(1-1/p_n)$ where $p_n$ is close to The square root of $x$ , leading to meaningless things ( terms ) like $x/(2*3*p_{n-1}*p_n) << 1$.



Truncating is thus the idea.



Let $omega(n)$ count the number of distinct prime factors of the integer $ n geq 2$. This $omega(n)$ is called the prime omega function.



Consider the truncated version of $(1-1/2)(1-1/3)ldots$ :



$$ pi(t,t^2 + t) = sum_{1<i<t} frac{(-1)^{omega(i)} t^2}{i} $$



Where $i$ are the squarefree integers.



How much better is this?



More precisely: is $sum_{1<i<t^2} frac{(-1)^{omega(i)} t^2}{i} $ asymptotic to $frac{t^2}{2 ln(t)} $ or are we still off by a constant factor ?



And if we are still off by a constant is it the same as Mertens’ or did we improve it - closer to $1$ - ?
How about a closed form then?



The analogue question for prime twins:



is $sum_{2<j<t^2} frac{(-2)^{omega(j)} t^2}{j} $ where $j $ are squarefree odd integers, asymptotic to $frac{t^2}{2 ln^2(t)}$ or are we still off by a constant factor?



And if we are still off by a constant is it the same as Mertens’ squared or did we improve it - closer to $1$ - ?
How about a closed form then?



I was unable to find this online or in libraries.










share|cite|improve this question
























  • can you please provide me some numerical calculation where you don't able to find its reason.
    – Adarsh Kumar
    Dec 23 '18 at 12:15














3












3








3


1





Suppose we want to estimate the number of primes between $x$ and its square root, say for example between $10$ and $100$ with a sieve.



There are $90 $ numbers so we estimate :



$pi(10,100) = 90(1-1/2)(1-1/3)(1-1/5)(1-1/7) \
= 90 * 2 * 4 * 6 /2 / 3 / 5 / 7 = 90 * 24 / 105 = 20,57ldots$



This is very good. The true value is $21$.



However we know from The prime number theorem and from Mertens’ theorem that this is only a good estimate up to a multiplicative constant.



The problem is easily identified.



On one hand we have that divisions have remainders leading to increasing error terms.



On the other hand we have this :



$(1-1/2)(1-1/3)cdots(1-1/p_{n-1})(1-1/p_n)$ where $p_n$ is close to The square root of $x$ , leading to meaningless things ( terms ) like $x/(2*3*p_{n-1}*p_n) << 1$.



Truncating is thus the idea.



Let $omega(n)$ count the number of distinct prime factors of the integer $ n geq 2$. This $omega(n)$ is called the prime omega function.



Consider the truncated version of $(1-1/2)(1-1/3)ldots$ :



$$ pi(t,t^2 + t) = sum_{1<i<t} frac{(-1)^{omega(i)} t^2}{i} $$



Where $i$ are the squarefree integers.



How much better is this?



More precisely: is $sum_{1<i<t^2} frac{(-1)^{omega(i)} t^2}{i} $ asymptotic to $frac{t^2}{2 ln(t)} $ or are we still off by a constant factor ?



And if we are still off by a constant is it the same as Mertens’ or did we improve it - closer to $1$ - ?
How about a closed form then?



The analogue question for prime twins:



is $sum_{2<j<t^2} frac{(-2)^{omega(j)} t^2}{j} $ where $j $ are squarefree odd integers, asymptotic to $frac{t^2}{2 ln^2(t)}$ or are we still off by a constant factor?



And if we are still off by a constant is it the same as Mertens’ squared or did we improve it - closer to $1$ - ?
How about a closed form then?



I was unable to find this online or in libraries.










share|cite|improve this question















Suppose we want to estimate the number of primes between $x$ and its square root, say for example between $10$ and $100$ with a sieve.



There are $90 $ numbers so we estimate :



$pi(10,100) = 90(1-1/2)(1-1/3)(1-1/5)(1-1/7) \
= 90 * 2 * 4 * 6 /2 / 3 / 5 / 7 = 90 * 24 / 105 = 20,57ldots$



This is very good. The true value is $21$.



However we know from The prime number theorem and from Mertens’ theorem that this is only a good estimate up to a multiplicative constant.



The problem is easily identified.



On one hand we have that divisions have remainders leading to increasing error terms.



On the other hand we have this :



$(1-1/2)(1-1/3)cdots(1-1/p_{n-1})(1-1/p_n)$ where $p_n$ is close to The square root of $x$ , leading to meaningless things ( terms ) like $x/(2*3*p_{n-1}*p_n) << 1$.



Truncating is thus the idea.



Let $omega(n)$ count the number of distinct prime factors of the integer $ n geq 2$. This $omega(n)$ is called the prime omega function.



Consider the truncated version of $(1-1/2)(1-1/3)ldots$ :



$$ pi(t,t^2 + t) = sum_{1<i<t} frac{(-1)^{omega(i)} t^2}{i} $$



Where $i$ are the squarefree integers.



How much better is this?



More precisely: is $sum_{1<i<t^2} frac{(-1)^{omega(i)} t^2}{i} $ asymptotic to $frac{t^2}{2 ln(t)} $ or are we still off by a constant factor ?



And if we are still off by a constant is it the same as Mertens’ or did we improve it - closer to $1$ - ?
How about a closed form then?



The analogue question for prime twins:



is $sum_{2<j<t^2} frac{(-2)^{omega(j)} t^2}{j} $ where $j $ are squarefree odd integers, asymptotic to $frac{t^2}{2 ln^2(t)}$ or are we still off by a constant factor?



And if we are still off by a constant is it the same as Mertens’ squared or did we improve it - closer to $1$ - ?
How about a closed form then?



I was unable to find this online or in libraries.







number-theory prime-numbers prime-twins sieve-theory truncation-error






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 21 '18 at 15:07









Henrik

6,01792030




6,01792030










asked Dec 21 '18 at 14:10









mick

5,08422064




5,08422064












  • can you please provide me some numerical calculation where you don't able to find its reason.
    – Adarsh Kumar
    Dec 23 '18 at 12:15


















  • can you please provide me some numerical calculation where you don't able to find its reason.
    – Adarsh Kumar
    Dec 23 '18 at 12:15
















can you please provide me some numerical calculation where you don't able to find its reason.
– Adarsh Kumar
Dec 23 '18 at 12:15




can you please provide me some numerical calculation where you don't able to find its reason.
– Adarsh Kumar
Dec 23 '18 at 12:15










1 Answer
1






active

oldest

votes


















1














Let $p_1 = 2$, $p_2 =3$, $p_3=5$, $p_n= $the $n$th prime number



Define 2 as the smallest prime number.



Any larger primes numbers that exist in natural numbers is not a multiple of any smaller prime number.



To generate more prime numbers use a sieve to remove multiples of smaller prime numbers.



The sieve 1 removes multiples of $p_1$



The sieve 2 removes multiples of $p_1$, and $p_2$



The sieve 3 removes multiples of $p_1$, $p_2$, and $p_3$



The sieve n removes multiples of $p_1$, $p_2$, $p_3$, .... , and $p_n$



The non-prime numbers $>1$ in the current sieve can be generated by $xy$ where $x,y$ is an element generated in the previous sieve.
Sieve n is a set of arithmetic equations where the common difference is the primorial n and the initial value is a co-prime to
the common difference. Limit the number of elements generated by sieve n to the be $p_{n+1}$. All possible co-primes to generate the next sieve can be found in the current sieve.



The sieve 1
$$n<p_2 $$
$$n=0,1,2,3,... $$
$$ p_1*n + 1 = 1,3,5$$
The sieve 2
$$n<p_3 $$
$$n=0,1,2,3,... $$
$$p_1*p_2*n + 1 = 1,7,13,19,25 $$
$$ p_1*p_2*n + 5 = 5,11,17,23,29 $$
The sieve 3
$$n<p_4$$
$$ n=0,1,2,3,... $$
$$ p_1*p_2*p_3*n + 1 = 1,31,61,91,121,151,181 $$
$$ p_1*p_2*p_3*n + 7 = 7,37,67,97,127,157,187 $$
$$ p_1*p_2*p_3*n + 11 = 11,41.71,101,131,161,191 $$
$$ p_1*p_2*p_3*n + 13 = 13,43,73,103,133,163,193 $$
$$ p_1*p_2*p_3*n + 17 = 17,47,77,107,137,167,197 $$
$$ p_1*p_2*p_3*n + 19 = 19,49,79,109,139,169,199 $$
$$ p_1*p_2*p_3*n + 23 = 23,53,83,113,143,173,203 $$
$$ p_1*p_2*p_3*n + 29 = 29,59,89,119,149,179,209 $$



Twin primes are a pair of prime numbers which differ by 2. The first few pairs of twin primes are
$(3,5) ,(5,7), (11,13) , (17,19) , (29,31) , (41,43)$.
Are there infinitely many twin primes?
In sieve 3 there are two pair of arithmetic progressions where the difference between their initial values differ by 2.
$$p_1*p_2*p_3*n + 11 = 11,41,71,101,131,161,191 $$
$$ p_1*p_2*p_3*n + 13 = 13, 43,73,103,133,163,193$$
and
$$p_1*p_2*p_3*n + 17 $$
$$ p_1*p_3*p_3*n + 19 $$



The numbers generated by a pair of arithmetic progressions which differ by 2 in sieve 3 will become more pairs of
arithmetic progressions which differ by 2 in sieve 4.



$$ p_1*p_2*p_3*p_4+11 $$
$$ p_1*p_2*p_3*p_4+13 $$



and



$$ p_1*p_2*p_3*p_4+41 $$
$$ p_1*p_2*p_3*p_4+43 $$



and



$$p_1*p_2*p_3*p_4+71 $$
$$ p_1*p_2*p_3*p_4+73 $$



and



....



Only one element in each arithmetic progression in sieve $n$ generating $p_{n+1}$ elements has the factor of $p_{n+1}$.
Therefore each pair of arithmetic progression differing by $a$ will generate $p_{n+1} -2$ arithmetic progressions differing by $a$ in the next sieve.



All that is left is to prove there exist a pair of twin prime numbers in each sieve when each sieve generates a finite number of elements.



If $f$ is a factor of a number in an arithmetic progression generated by a sieve. Then for all sequential $f$ elements generated by the arithmetic progression there exist only one element with the factor $f$.



For example
$$p_1*p_2*n+1 = 1,7,13,19,25,31,37,43,49,55,... $$
$5$ is a factor of numbers $25, 55, 85, 115,...$ and each of these numbers are exactly $5$ sequential elements apart.
$7$ is a factor of numbers $7, 49, 91, ...$ and each of these numbers are exactly $7$ sequential elements apart.
In $5*7$ sequential elements there are exaclty $7$ elements with factors of $5$ and $5$ elements with factors of $7$.



In sieve m let input n
$$ n < p_1 * p_2 * p_3 * ... *p_m $$
Generating $p_1*p_2*p_3*...*p_m$ elements per arithmetic progression.
The largest number generated in the sieve is
$$ (p_1*p_2*p_3*...*p_m +1)(p_1*p_2*p_3*...*p_m -1)$$
Therefore all non-prime numbers generated per arithmetic progression must have a factor $f$ such that $f>=3$ and $f<=p_1*p_2*p_3*...p_m -1$.
Lets take the smallest factor possible $3$ in
$$p_1*n+1 =1,3,5,7,9,... $$



only need to count the number of odd numbers $>=3$ and $<=p_1*p_2*p_3*...*p_m$ in natural numbers to count non-prime numbers in arithmetic progression generated in sieve m when input n
$$ n < p_1*p_2*p_3*...*p_m $$
because of



The first non-prime number with the factor of $3$ will be $3*q$ where $q>=3$



The next non-prime number with the factor of $3$ will be $3*(q+2)$



The next non-prime number with the factor of $3$ will be $3*(q+2+2)$



The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*q$ where $q>=3+2$



The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*(q+2)$



Therefore in two arithmetic progressions in the same sieve there exist $3$ elements generated by each arithmetic progression
sharing the same input $n$ where at most $2$ elements in sharing different n could be non-primes and the last possible $n$ input
must have prime numbers in both arithmetic progressions in the same sieve.






share|cite|improve this answer










New contributor




Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3048527%2fimproved-sieve-for-primes-and-prime-twins%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Let $p_1 = 2$, $p_2 =3$, $p_3=5$, $p_n= $the $n$th prime number



    Define 2 as the smallest prime number.



    Any larger primes numbers that exist in natural numbers is not a multiple of any smaller prime number.



    To generate more prime numbers use a sieve to remove multiples of smaller prime numbers.



    The sieve 1 removes multiples of $p_1$



    The sieve 2 removes multiples of $p_1$, and $p_2$



    The sieve 3 removes multiples of $p_1$, $p_2$, and $p_3$



    The sieve n removes multiples of $p_1$, $p_2$, $p_3$, .... , and $p_n$



    The non-prime numbers $>1$ in the current sieve can be generated by $xy$ where $x,y$ is an element generated in the previous sieve.
    Sieve n is a set of arithmetic equations where the common difference is the primorial n and the initial value is a co-prime to
    the common difference. Limit the number of elements generated by sieve n to the be $p_{n+1}$. All possible co-primes to generate the next sieve can be found in the current sieve.



    The sieve 1
    $$n<p_2 $$
    $$n=0,1,2,3,... $$
    $$ p_1*n + 1 = 1,3,5$$
    The sieve 2
    $$n<p_3 $$
    $$n=0,1,2,3,... $$
    $$p_1*p_2*n + 1 = 1,7,13,19,25 $$
    $$ p_1*p_2*n + 5 = 5,11,17,23,29 $$
    The sieve 3
    $$n<p_4$$
    $$ n=0,1,2,3,... $$
    $$ p_1*p_2*p_3*n + 1 = 1,31,61,91,121,151,181 $$
    $$ p_1*p_2*p_3*n + 7 = 7,37,67,97,127,157,187 $$
    $$ p_1*p_2*p_3*n + 11 = 11,41.71,101,131,161,191 $$
    $$ p_1*p_2*p_3*n + 13 = 13,43,73,103,133,163,193 $$
    $$ p_1*p_2*p_3*n + 17 = 17,47,77,107,137,167,197 $$
    $$ p_1*p_2*p_3*n + 19 = 19,49,79,109,139,169,199 $$
    $$ p_1*p_2*p_3*n + 23 = 23,53,83,113,143,173,203 $$
    $$ p_1*p_2*p_3*n + 29 = 29,59,89,119,149,179,209 $$



    Twin primes are a pair of prime numbers which differ by 2. The first few pairs of twin primes are
    $(3,5) ,(5,7), (11,13) , (17,19) , (29,31) , (41,43)$.
    Are there infinitely many twin primes?
    In sieve 3 there are two pair of arithmetic progressions where the difference between their initial values differ by 2.
    $$p_1*p_2*p_3*n + 11 = 11,41,71,101,131,161,191 $$
    $$ p_1*p_2*p_3*n + 13 = 13, 43,73,103,133,163,193$$
    and
    $$p_1*p_2*p_3*n + 17 $$
    $$ p_1*p_3*p_3*n + 19 $$



    The numbers generated by a pair of arithmetic progressions which differ by 2 in sieve 3 will become more pairs of
    arithmetic progressions which differ by 2 in sieve 4.



    $$ p_1*p_2*p_3*p_4+11 $$
    $$ p_1*p_2*p_3*p_4+13 $$



    and



    $$ p_1*p_2*p_3*p_4+41 $$
    $$ p_1*p_2*p_3*p_4+43 $$



    and



    $$p_1*p_2*p_3*p_4+71 $$
    $$ p_1*p_2*p_3*p_4+73 $$



    and



    ....



    Only one element in each arithmetic progression in sieve $n$ generating $p_{n+1}$ elements has the factor of $p_{n+1}$.
    Therefore each pair of arithmetic progression differing by $a$ will generate $p_{n+1} -2$ arithmetic progressions differing by $a$ in the next sieve.



    All that is left is to prove there exist a pair of twin prime numbers in each sieve when each sieve generates a finite number of elements.



    If $f$ is a factor of a number in an arithmetic progression generated by a sieve. Then for all sequential $f$ elements generated by the arithmetic progression there exist only one element with the factor $f$.



    For example
    $$p_1*p_2*n+1 = 1,7,13,19,25,31,37,43,49,55,... $$
    $5$ is a factor of numbers $25, 55, 85, 115,...$ and each of these numbers are exactly $5$ sequential elements apart.
    $7$ is a factor of numbers $7, 49, 91, ...$ and each of these numbers are exactly $7$ sequential elements apart.
    In $5*7$ sequential elements there are exaclty $7$ elements with factors of $5$ and $5$ elements with factors of $7$.



    In sieve m let input n
    $$ n < p_1 * p_2 * p_3 * ... *p_m $$
    Generating $p_1*p_2*p_3*...*p_m$ elements per arithmetic progression.
    The largest number generated in the sieve is
    $$ (p_1*p_2*p_3*...*p_m +1)(p_1*p_2*p_3*...*p_m -1)$$
    Therefore all non-prime numbers generated per arithmetic progression must have a factor $f$ such that $f>=3$ and $f<=p_1*p_2*p_3*...p_m -1$.
    Lets take the smallest factor possible $3$ in
    $$p_1*n+1 =1,3,5,7,9,... $$



    only need to count the number of odd numbers $>=3$ and $<=p_1*p_2*p_3*...*p_m$ in natural numbers to count non-prime numbers in arithmetic progression generated in sieve m when input n
    $$ n < p_1*p_2*p_3*...*p_m $$
    because of



    The first non-prime number with the factor of $3$ will be $3*q$ where $q>=3$



    The next non-prime number with the factor of $3$ will be $3*(q+2)$



    The next non-prime number with the factor of $3$ will be $3*(q+2+2)$



    The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*q$ where $q>=3+2$



    The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*(q+2)$



    Therefore in two arithmetic progressions in the same sieve there exist $3$ elements generated by each arithmetic progression
    sharing the same input $n$ where at most $2$ elements in sharing different n could be non-primes and the last possible $n$ input
    must have prime numbers in both arithmetic progressions in the same sieve.






    share|cite|improve this answer










    New contributor




    Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1














      Let $p_1 = 2$, $p_2 =3$, $p_3=5$, $p_n= $the $n$th prime number



      Define 2 as the smallest prime number.



      Any larger primes numbers that exist in natural numbers is not a multiple of any smaller prime number.



      To generate more prime numbers use a sieve to remove multiples of smaller prime numbers.



      The sieve 1 removes multiples of $p_1$



      The sieve 2 removes multiples of $p_1$, and $p_2$



      The sieve 3 removes multiples of $p_1$, $p_2$, and $p_3$



      The sieve n removes multiples of $p_1$, $p_2$, $p_3$, .... , and $p_n$



      The non-prime numbers $>1$ in the current sieve can be generated by $xy$ where $x,y$ is an element generated in the previous sieve.
      Sieve n is a set of arithmetic equations where the common difference is the primorial n and the initial value is a co-prime to
      the common difference. Limit the number of elements generated by sieve n to the be $p_{n+1}$. All possible co-primes to generate the next sieve can be found in the current sieve.



      The sieve 1
      $$n<p_2 $$
      $$n=0,1,2,3,... $$
      $$ p_1*n + 1 = 1,3,5$$
      The sieve 2
      $$n<p_3 $$
      $$n=0,1,2,3,... $$
      $$p_1*p_2*n + 1 = 1,7,13,19,25 $$
      $$ p_1*p_2*n + 5 = 5,11,17,23,29 $$
      The sieve 3
      $$n<p_4$$
      $$ n=0,1,2,3,... $$
      $$ p_1*p_2*p_3*n + 1 = 1,31,61,91,121,151,181 $$
      $$ p_1*p_2*p_3*n + 7 = 7,37,67,97,127,157,187 $$
      $$ p_1*p_2*p_3*n + 11 = 11,41.71,101,131,161,191 $$
      $$ p_1*p_2*p_3*n + 13 = 13,43,73,103,133,163,193 $$
      $$ p_1*p_2*p_3*n + 17 = 17,47,77,107,137,167,197 $$
      $$ p_1*p_2*p_3*n + 19 = 19,49,79,109,139,169,199 $$
      $$ p_1*p_2*p_3*n + 23 = 23,53,83,113,143,173,203 $$
      $$ p_1*p_2*p_3*n + 29 = 29,59,89,119,149,179,209 $$



      Twin primes are a pair of prime numbers which differ by 2. The first few pairs of twin primes are
      $(3,5) ,(5,7), (11,13) , (17,19) , (29,31) , (41,43)$.
      Are there infinitely many twin primes?
      In sieve 3 there are two pair of arithmetic progressions where the difference between their initial values differ by 2.
      $$p_1*p_2*p_3*n + 11 = 11,41,71,101,131,161,191 $$
      $$ p_1*p_2*p_3*n + 13 = 13, 43,73,103,133,163,193$$
      and
      $$p_1*p_2*p_3*n + 17 $$
      $$ p_1*p_3*p_3*n + 19 $$



      The numbers generated by a pair of arithmetic progressions which differ by 2 in sieve 3 will become more pairs of
      arithmetic progressions which differ by 2 in sieve 4.



      $$ p_1*p_2*p_3*p_4+11 $$
      $$ p_1*p_2*p_3*p_4+13 $$



      and



      $$ p_1*p_2*p_3*p_4+41 $$
      $$ p_1*p_2*p_3*p_4+43 $$



      and



      $$p_1*p_2*p_3*p_4+71 $$
      $$ p_1*p_2*p_3*p_4+73 $$



      and



      ....



      Only one element in each arithmetic progression in sieve $n$ generating $p_{n+1}$ elements has the factor of $p_{n+1}$.
      Therefore each pair of arithmetic progression differing by $a$ will generate $p_{n+1} -2$ arithmetic progressions differing by $a$ in the next sieve.



      All that is left is to prove there exist a pair of twin prime numbers in each sieve when each sieve generates a finite number of elements.



      If $f$ is a factor of a number in an arithmetic progression generated by a sieve. Then for all sequential $f$ elements generated by the arithmetic progression there exist only one element with the factor $f$.



      For example
      $$p_1*p_2*n+1 = 1,7,13,19,25,31,37,43,49,55,... $$
      $5$ is a factor of numbers $25, 55, 85, 115,...$ and each of these numbers are exactly $5$ sequential elements apart.
      $7$ is a factor of numbers $7, 49, 91, ...$ and each of these numbers are exactly $7$ sequential elements apart.
      In $5*7$ sequential elements there are exaclty $7$ elements with factors of $5$ and $5$ elements with factors of $7$.



      In sieve m let input n
      $$ n < p_1 * p_2 * p_3 * ... *p_m $$
      Generating $p_1*p_2*p_3*...*p_m$ elements per arithmetic progression.
      The largest number generated in the sieve is
      $$ (p_1*p_2*p_3*...*p_m +1)(p_1*p_2*p_3*...*p_m -1)$$
      Therefore all non-prime numbers generated per arithmetic progression must have a factor $f$ such that $f>=3$ and $f<=p_1*p_2*p_3*...p_m -1$.
      Lets take the smallest factor possible $3$ in
      $$p_1*n+1 =1,3,5,7,9,... $$



      only need to count the number of odd numbers $>=3$ and $<=p_1*p_2*p_3*...*p_m$ in natural numbers to count non-prime numbers in arithmetic progression generated in sieve m when input n
      $$ n < p_1*p_2*p_3*...*p_m $$
      because of



      The first non-prime number with the factor of $3$ will be $3*q$ where $q>=3$



      The next non-prime number with the factor of $3$ will be $3*(q+2)$



      The next non-prime number with the factor of $3$ will be $3*(q+2+2)$



      The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*q$ where $q>=3+2$



      The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*(q+2)$



      Therefore in two arithmetic progressions in the same sieve there exist $3$ elements generated by each arithmetic progression
      sharing the same input $n$ where at most $2$ elements in sharing different n could be non-primes and the last possible $n$ input
      must have prime numbers in both arithmetic progressions in the same sieve.






      share|cite|improve this answer










      New contributor




      Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





















        1












        1








        1






        Let $p_1 = 2$, $p_2 =3$, $p_3=5$, $p_n= $the $n$th prime number



        Define 2 as the smallest prime number.



        Any larger primes numbers that exist in natural numbers is not a multiple of any smaller prime number.



        To generate more prime numbers use a sieve to remove multiples of smaller prime numbers.



        The sieve 1 removes multiples of $p_1$



        The sieve 2 removes multiples of $p_1$, and $p_2$



        The sieve 3 removes multiples of $p_1$, $p_2$, and $p_3$



        The sieve n removes multiples of $p_1$, $p_2$, $p_3$, .... , and $p_n$



        The non-prime numbers $>1$ in the current sieve can be generated by $xy$ where $x,y$ is an element generated in the previous sieve.
        Sieve n is a set of arithmetic equations where the common difference is the primorial n and the initial value is a co-prime to
        the common difference. Limit the number of elements generated by sieve n to the be $p_{n+1}$. All possible co-primes to generate the next sieve can be found in the current sieve.



        The sieve 1
        $$n<p_2 $$
        $$n=0,1,2,3,... $$
        $$ p_1*n + 1 = 1,3,5$$
        The sieve 2
        $$n<p_3 $$
        $$n=0,1,2,3,... $$
        $$p_1*p_2*n + 1 = 1,7,13,19,25 $$
        $$ p_1*p_2*n + 5 = 5,11,17,23,29 $$
        The sieve 3
        $$n<p_4$$
        $$ n=0,1,2,3,... $$
        $$ p_1*p_2*p_3*n + 1 = 1,31,61,91,121,151,181 $$
        $$ p_1*p_2*p_3*n + 7 = 7,37,67,97,127,157,187 $$
        $$ p_1*p_2*p_3*n + 11 = 11,41.71,101,131,161,191 $$
        $$ p_1*p_2*p_3*n + 13 = 13,43,73,103,133,163,193 $$
        $$ p_1*p_2*p_3*n + 17 = 17,47,77,107,137,167,197 $$
        $$ p_1*p_2*p_3*n + 19 = 19,49,79,109,139,169,199 $$
        $$ p_1*p_2*p_3*n + 23 = 23,53,83,113,143,173,203 $$
        $$ p_1*p_2*p_3*n + 29 = 29,59,89,119,149,179,209 $$



        Twin primes are a pair of prime numbers which differ by 2. The first few pairs of twin primes are
        $(3,5) ,(5,7), (11,13) , (17,19) , (29,31) , (41,43)$.
        Are there infinitely many twin primes?
        In sieve 3 there are two pair of arithmetic progressions where the difference between their initial values differ by 2.
        $$p_1*p_2*p_3*n + 11 = 11,41,71,101,131,161,191 $$
        $$ p_1*p_2*p_3*n + 13 = 13, 43,73,103,133,163,193$$
        and
        $$p_1*p_2*p_3*n + 17 $$
        $$ p_1*p_3*p_3*n + 19 $$



        The numbers generated by a pair of arithmetic progressions which differ by 2 in sieve 3 will become more pairs of
        arithmetic progressions which differ by 2 in sieve 4.



        $$ p_1*p_2*p_3*p_4+11 $$
        $$ p_1*p_2*p_3*p_4+13 $$



        and



        $$ p_1*p_2*p_3*p_4+41 $$
        $$ p_1*p_2*p_3*p_4+43 $$



        and



        $$p_1*p_2*p_3*p_4+71 $$
        $$ p_1*p_2*p_3*p_4+73 $$



        and



        ....



        Only one element in each arithmetic progression in sieve $n$ generating $p_{n+1}$ elements has the factor of $p_{n+1}$.
        Therefore each pair of arithmetic progression differing by $a$ will generate $p_{n+1} -2$ arithmetic progressions differing by $a$ in the next sieve.



        All that is left is to prove there exist a pair of twin prime numbers in each sieve when each sieve generates a finite number of elements.



        If $f$ is a factor of a number in an arithmetic progression generated by a sieve. Then for all sequential $f$ elements generated by the arithmetic progression there exist only one element with the factor $f$.



        For example
        $$p_1*p_2*n+1 = 1,7,13,19,25,31,37,43,49,55,... $$
        $5$ is a factor of numbers $25, 55, 85, 115,...$ and each of these numbers are exactly $5$ sequential elements apart.
        $7$ is a factor of numbers $7, 49, 91, ...$ and each of these numbers are exactly $7$ sequential elements apart.
        In $5*7$ sequential elements there are exaclty $7$ elements with factors of $5$ and $5$ elements with factors of $7$.



        In sieve m let input n
        $$ n < p_1 * p_2 * p_3 * ... *p_m $$
        Generating $p_1*p_2*p_3*...*p_m$ elements per arithmetic progression.
        The largest number generated in the sieve is
        $$ (p_1*p_2*p_3*...*p_m +1)(p_1*p_2*p_3*...*p_m -1)$$
        Therefore all non-prime numbers generated per arithmetic progression must have a factor $f$ such that $f>=3$ and $f<=p_1*p_2*p_3*...p_m -1$.
        Lets take the smallest factor possible $3$ in
        $$p_1*n+1 =1,3,5,7,9,... $$



        only need to count the number of odd numbers $>=3$ and $<=p_1*p_2*p_3*...*p_m$ in natural numbers to count non-prime numbers in arithmetic progression generated in sieve m when input n
        $$ n < p_1*p_2*p_3*...*p_m $$
        because of



        The first non-prime number with the factor of $3$ will be $3*q$ where $q>=3$



        The next non-prime number with the factor of $3$ will be $3*(q+2)$



        The next non-prime number with the factor of $3$ will be $3*(q+2+2)$



        The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*q$ where $q>=3+2$



        The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*(q+2)$



        Therefore in two arithmetic progressions in the same sieve there exist $3$ elements generated by each arithmetic progression
        sharing the same input $n$ where at most $2$ elements in sharing different n could be non-primes and the last possible $n$ input
        must have prime numbers in both arithmetic progressions in the same sieve.






        share|cite|improve this answer










        New contributor




        Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        Let $p_1 = 2$, $p_2 =3$, $p_3=5$, $p_n= $the $n$th prime number



        Define 2 as the smallest prime number.



        Any larger primes numbers that exist in natural numbers is not a multiple of any smaller prime number.



        To generate more prime numbers use a sieve to remove multiples of smaller prime numbers.



        The sieve 1 removes multiples of $p_1$



        The sieve 2 removes multiples of $p_1$, and $p_2$



        The sieve 3 removes multiples of $p_1$, $p_2$, and $p_3$



        The sieve n removes multiples of $p_1$, $p_2$, $p_3$, .... , and $p_n$



        The non-prime numbers $>1$ in the current sieve can be generated by $xy$ where $x,y$ is an element generated in the previous sieve.
        Sieve n is a set of arithmetic equations where the common difference is the primorial n and the initial value is a co-prime to
        the common difference. Limit the number of elements generated by sieve n to the be $p_{n+1}$. All possible co-primes to generate the next sieve can be found in the current sieve.



        The sieve 1
        $$n<p_2 $$
        $$n=0,1,2,3,... $$
        $$ p_1*n + 1 = 1,3,5$$
        The sieve 2
        $$n<p_3 $$
        $$n=0,1,2,3,... $$
        $$p_1*p_2*n + 1 = 1,7,13,19,25 $$
        $$ p_1*p_2*n + 5 = 5,11,17,23,29 $$
        The sieve 3
        $$n<p_4$$
        $$ n=0,1,2,3,... $$
        $$ p_1*p_2*p_3*n + 1 = 1,31,61,91,121,151,181 $$
        $$ p_1*p_2*p_3*n + 7 = 7,37,67,97,127,157,187 $$
        $$ p_1*p_2*p_3*n + 11 = 11,41.71,101,131,161,191 $$
        $$ p_1*p_2*p_3*n + 13 = 13,43,73,103,133,163,193 $$
        $$ p_1*p_2*p_3*n + 17 = 17,47,77,107,137,167,197 $$
        $$ p_1*p_2*p_3*n + 19 = 19,49,79,109,139,169,199 $$
        $$ p_1*p_2*p_3*n + 23 = 23,53,83,113,143,173,203 $$
        $$ p_1*p_2*p_3*n + 29 = 29,59,89,119,149,179,209 $$



        Twin primes are a pair of prime numbers which differ by 2. The first few pairs of twin primes are
        $(3,5) ,(5,7), (11,13) , (17,19) , (29,31) , (41,43)$.
        Are there infinitely many twin primes?
        In sieve 3 there are two pair of arithmetic progressions where the difference between their initial values differ by 2.
        $$p_1*p_2*p_3*n + 11 = 11,41,71,101,131,161,191 $$
        $$ p_1*p_2*p_3*n + 13 = 13, 43,73,103,133,163,193$$
        and
        $$p_1*p_2*p_3*n + 17 $$
        $$ p_1*p_3*p_3*n + 19 $$



        The numbers generated by a pair of arithmetic progressions which differ by 2 in sieve 3 will become more pairs of
        arithmetic progressions which differ by 2 in sieve 4.



        $$ p_1*p_2*p_3*p_4+11 $$
        $$ p_1*p_2*p_3*p_4+13 $$



        and



        $$ p_1*p_2*p_3*p_4+41 $$
        $$ p_1*p_2*p_3*p_4+43 $$



        and



        $$p_1*p_2*p_3*p_4+71 $$
        $$ p_1*p_2*p_3*p_4+73 $$



        and



        ....



        Only one element in each arithmetic progression in sieve $n$ generating $p_{n+1}$ elements has the factor of $p_{n+1}$.
        Therefore each pair of arithmetic progression differing by $a$ will generate $p_{n+1} -2$ arithmetic progressions differing by $a$ in the next sieve.



        All that is left is to prove there exist a pair of twin prime numbers in each sieve when each sieve generates a finite number of elements.



        If $f$ is a factor of a number in an arithmetic progression generated by a sieve. Then for all sequential $f$ elements generated by the arithmetic progression there exist only one element with the factor $f$.



        For example
        $$p_1*p_2*n+1 = 1,7,13,19,25,31,37,43,49,55,... $$
        $5$ is a factor of numbers $25, 55, 85, 115,...$ and each of these numbers are exactly $5$ sequential elements apart.
        $7$ is a factor of numbers $7, 49, 91, ...$ and each of these numbers are exactly $7$ sequential elements apart.
        In $5*7$ sequential elements there are exaclty $7$ elements with factors of $5$ and $5$ elements with factors of $7$.



        In sieve m let input n
        $$ n < p_1 * p_2 * p_3 * ... *p_m $$
        Generating $p_1*p_2*p_3*...*p_m$ elements per arithmetic progression.
        The largest number generated in the sieve is
        $$ (p_1*p_2*p_3*...*p_m +1)(p_1*p_2*p_3*...*p_m -1)$$
        Therefore all non-prime numbers generated per arithmetic progression must have a factor $f$ such that $f>=3$ and $f<=p_1*p_2*p_3*...p_m -1$.
        Lets take the smallest factor possible $3$ in
        $$p_1*n+1 =1,3,5,7,9,... $$



        only need to count the number of odd numbers $>=3$ and $<=p_1*p_2*p_3*...*p_m$ in natural numbers to count non-prime numbers in arithmetic progression generated in sieve m when input n
        $$ n < p_1*p_2*p_3*...*p_m $$
        because of



        The first non-prime number with the factor of $3$ will be $3*q$ where $q>=3$



        The next non-prime number with the factor of $3$ will be $3*(q+2)$



        The next non-prime number with the factor of $3$ will be $3*(q+2+2)$



        The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*q$ where $q>=3+2$



        The first non-prime number with the factor of $3+2$ without the factor of $3$ will be $(3+2)*(q+2)$



        Therefore in two arithmetic progressions in the same sieve there exist $3$ elements generated by each arithmetic progression
        sharing the same input $n$ where at most $2$ elements in sharing different n could be non-primes and the last possible $n$ input
        must have prime numbers in both arithmetic progressions in the same sieve.







        share|cite|improve this answer










        New contributor




        Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|cite|improve this answer



        share|cite|improve this answer








        edited yesterday





















        New contributor




        Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Jan 3 at 5:25









        Zhang

        113




        113




        New contributor




        Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3048527%2fimproved-sieve-for-primes-and-prime-twins%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mario Kart Wii

            What does “Dominus providebit” mean?

            Antonio Litta Visconti Arese